Bitcoin mining is the process that adds new blocks to the blockchain, secures the network against tampering and issues new bitcoin. The name suggests digging for gold, but mining is really a global competition to solve a computational puzzle, run on specialized machines that do nothing else. This article explains how that competition works, why it is designed the way it is, and what it costs.
What miners actually do
Miners perform two jobs at once:
- They order transactions. A miner gathers valid transactions waiting in its mempool, chooses which ones to include (usually those paying the highest fee rate), and packs them into a candidate block.
- They secure the history. To add that block, the miner must prove it spent real resources by finding a valid proof of work. This cost is what makes rewriting past blocks impractical.
In return, the miner who finds a valid block collects the block reward.
Proof of work in plain terms
Every block has a small header that summarizes its contents. Miners run this header through the SHA-256 hash function (twice, in fact) to produce a 256-bit number. The output of a hash function is unpredictable: change one character of the input and the result changes completely.
The network sets a target. A block is valid only if its header hash is below that target. Think of it as rolling a die with trillions of sides and needing a number below a certain value. The only strategy is to roll again and again:
- The miner changes a field called the nonce and hashes again.
- When the nonce runs out, it changes other data, such as a value in the coinbase transaction or the timestamp, and keeps going.
- Modern machines make trillions of attempts per second.
Finding a valid hash is extremely hard, but checking one is trivial: any node can verify it with a single calculation. That asymmetry is the heart of proof of work. The combined guessing speed of all miners is called the hashrate, which you can follow on our network page.
The difficulty adjustment
If more miners join, blocks would be found faster; if miners leave, slower. Bitcoin corrects for this automatically.
Every 2,016 blocks, each node looks at how long those blocks took to produce. The goal is about 10 minutes per block, or two weeks for 2,016 blocks.
- If the blocks came faster than that, the difficulty rises (the target gets lower).
- If they came slower, the difficulty falls.
- A single adjustment cannot change the difficulty by more than a factor of four in either direction.
This feedback loop keeps the supply schedule on track whatever happens to the hashrate. It is also why the dates of future halvings can only be estimated: blocks average 10 minutes, but rarely hit it exactly.
From CPUs to ASICs
Mining hardware has gone through several generations:
| Period | Hardware | Notes |
|---|---|---|
| 2009 | CPUs | Satoshi and early users mined on ordinary computers |
| From 2010 | GPUs | Graphics cards proved far faster at hashing |
| From 2011 | FPGAs | Programmable chips, more energy efficient |
| From 2013 | ASICs | Chips designed only for Bitcoin's SHA-256 |
Today, practically all Bitcoin mining uses ASICs (application-specific integrated circuits). They are vastly more efficient than general-purpose hardware but can do only one thing. Their efficiency is measured in joules per terahash (J/TH): how much energy it takes to compute a trillion hashes. Each new generation lowers that figure, which steadily pushes older machines out of profitability.
Mining pools
The chance that a single machine finds a block is tiny. A small miner might wait many years for a block, or never find one at all. Mining pools solve this by combining the hashrate of many miners and sharing the rewards.
- Each miner submits "shares": solutions that meet an easier target, which prove how much work they are contributing.
- When anyone in the pool finds a real block, the reward is split according to the work contributed, minus a pool fee.
- Common payout methods include pay-per-share variants, where the pool pays a steady amount per share and absorbs the luck, and schemes that pay based on recent shares when blocks are actually found.
Pools turn mining into a steadier income. They also raise a centralization concern, because pool operators traditionally decide which transactions go into blocks. Miners can switch pools quickly, which limits a pool's power, and newer protocols aim to let individual miners choose transactions themselves.
The block reward: subsidy plus fees
The miner who finds a block pays itself through a special first transaction in the block, called the coinbase transaction (no relation to the exchange of the same name). It may claim:
Block reward = block subsidy + all transaction fees in the block
- The subsidy is newly created bitcoin. It started at 50 BTC per block and is cut in half every 210,000 blocks. You can see the current value on our halving page.
- The fees are the leftover amounts from every transaction in the block. They depend on demand for block space; see Bitcoin transaction fees.
Newly mined coins cannot be spent until 100 more blocks have been added on top. This rule protects the network in case the block is later replaced by a competing one.
The energy debate
Proof of work deliberately consumes energy: that cost is what makes attacking the network expensive. How much energy it uses, and whether that is justified, is one of the most contested topics around Bitcoin. Estimates vary widely depending on the method used.
Concerns raised by critics:
- Total electricity use is large, comparable to that of some countries.
- Where the power comes from fossil fuels, mining adds to carbon emissions.
- ASICs become obsolete within a few years, creating electronic waste.
- Mining facilities can strain local grids and generate noise.
Arguments made by supporters:
- Miners seek the cheapest electricity, which is often surplus, curtailed or stranded power, including hydro, wind and solar that would otherwise go unused.
- Some miners use gas that would otherwise be flared or vented at oil fields.
- Because mining can be switched off within seconds, miners can act as flexible demand and help balance grids during peaks.
- The waste heat from mining can be reused for heating buildings, greenhouses and water.
- Whether the energy is "worth it" depends on how much one values a monetary network that is open and not controlled by any authority.
Both sides agree on one point: the energy mix of mining matters, and it differs a lot from one region to another.
Can you mine at home?
You can, but it is rarely profitable today. Here is why:
- Electricity price. Industrial miners negotiate very low power rates. Typical household electricity costs several times more, and electricity is the largest ongoing cost of mining.
- Hardware efficiency. Large operations buy the newest, most efficient machines in bulk. Older or second-hand machines consume more energy per hash.
- Competition. Your share of the rewards equals your share of the total hashrate, which is enormous.
- Noise and heat. ASICs are loud, often as loud as a vacuum cleaner, and produce a lot of heat, which makes them hard to run in a home.
- Price and fee uncertainty. Revenue depends on the bitcoin price, fee levels and future difficulty, none of which you control.
Some people mine at home anyway: to heat a room with the waste heat, to support the network, to earn bitcoin without buying it, or as a hobby with small devices that try for a full block on their own (solo mining), which is essentially a lottery ticket. Before buying anything, run the numbers with our mining calculator, using your real electricity price.
Summary
- Mining orders transactions into blocks and secures them with proof of work.
- The difficulty adjusts every 2,016 blocks to keep blocks about 10 minutes apart.
- Nearly all mining uses ASICs, and most miners join pools to smooth their income.
- Miners earn the block subsidy plus transaction fees.
- The energy question has strong arguments on both sides.
- Home mining is usually unprofitable, unless your electricity is unusually cheap or you value the heat.