Skip to content
Beta
Research · Learn Crypto

How Does Bitcoin Mining Work?

Bitcoin · 5 October 2026 · 10 min read · By admin

Bitcoin mining explained: how miners build blocks, race to hash below the target, get paid in new BTC and fees, and why nodes can reject their work.

Bitcoin mining is the process that adds new blocks of transactions to the blockchain. Miners bundle pending transactions, then race to find a block header whose hash falls below a target set by the network. The winner earns newly issued BTC plus the fees in that block, and every node checks the work before accepting it.

What a miner does with each block

A miner runs software that watches the pool of unconfirmed transactions waiting on the network, often called the mempool. From that pool it picks the transactions it wants to include, usually starting with the ones that pay the highest fee per unit of block space. Our guide to blockchain transaction fees explains how that fee rate is set.

Before adding anyone else’s transactions, the miner writes one of its own. This first entry is called the coinbase transaction, and it is how the miner pays itself: it creates the new BTC allowed by the protocol and collects the fees from every other transaction in the block. The rest of the block is the selected transactions, arranged so that a single fingerprint, the Merkle root, summarizes all of them.

At this point the miner has a candidate block. It is valid in every way except one: it has no proof of work yet.

The block header and the hashing race

Mining happens on the block header, an 80-byte summary of the block. The header holds six fields:

Flow of Bitcoin mining: mempool, candidate block, hashing until below target, broadcast, node verification.
Figure: How a block moves from pending transactions to the chain.

Field What it holds
Version Which set of rules the block follows
Previous block hash The fingerprint of the block this one builds on
Merkle root A single hash committing to every transaction in the block
Timestamp Roughly when the miner started working on it
Target (bits) The threshold the block’s hash must fall below
Nonce A number the miner changes on every attempt

The miner runs the header through the SHA-256 hash function twice and looks at the result. If the number is lower than the target, the block is solved. If it is not, the miner changes the nonce and tries again. When all four billion or so nonce values are used up, the miner tweaks something else, such as a spare field inside the coinbase transaction, which changes the Merkle root and opens a fresh range of attempts.

Each hash is effectively a lottery ticket. Nobody can predict which input will produce a low enough result, so the only strategy is to try faster than everyone else. That is why the industry measures miners by hashes per second, a figure covered in our guide to Bitcoin hash rate.

How the network sets the target

If miners added more machines and nothing else changed, blocks would arrive faster and faster. Bitcoin prevents that by recalculating the target every 2,016 blocks, aiming for an average of one block every 10 minutes. When blocks have been coming too quickly, the target gets lower and the puzzle gets harder. When they have been slow, it gets easier.

The adjustment is capped at a factor of four in either direction per period, which keeps one unusual stretch from swinging the system too far. Our explainer on Bitcoin mining difficulty walks through the math.

What miners earn

A miner that solves a block collects two things:

  • The block subsidy. New BTC created by the protocol. It started at 50 BTC per block in 2009 and halves every 210,000 blocks. Since block 840,000 on April 20, 2024, it has been 3.125 BTC. Our guide to the Bitcoin halving covers the schedule.
  • Transaction fees. Whatever the transactions in the block paid to be included.

Most of the time the subsidy is the larger share, but fees can surprise. Block 840,000, the very block that cut the subsidy to 3.125 BTC, also carried about 37.6 BTC in fees, roughly 12 times the new subsidy. That was an unusual block. It is still a useful reminder that miner income depends on demand for block space as well as on the issuance schedule.

The new coins cannot be spent right away. Bitcoin’s rules require a coinbase output to wait 100 blocks before it can be moved, so that a block which later falls out of the chain cannot leave behind spent coins that never existed.

Why other nodes accept or reject a block

Finding a valid hash does not give a miner the final word. When a block is broadcast, every full node checks it independently: the hash must be below the target, every transaction must be valid, no coin can be spent twice, and the coinbase cannot claim more than the subsidy plus fees. A block that fails any of those checks is rejected, no matter how much electricity went into it.

Sometimes two miners solve a block at nearly the same moment. For a short while the network has two competing versions of the latest block. Nodes follow the chain with the most accumulated work, so as soon as the next block lands on one side, the other block becomes stale and its reward disappears. This is one reason exchanges wait for several blocks before crediting a deposit, as explained in our guide to why network confirmations matter.

Why most miners join a pool

Solo mining is a high-variance business. A miner with a tiny fraction of the network’s hashing power might, on average, find a block once every few years, and in practice could go much longer. Mining pools solve the cash-flow problem. Members point their machines at a shared block template, the pool tracks each member’s contribution through “shares” (hashes that would have been valid at an easier target), and rewards are split according to those shares, minus a pool fee.

Pools make income steadier, but they concentrate decisions about which transactions go into blocks. A handful of large pools produce a large share of all blocks, which is why the distribution of hashing power among pools is watched closely by people who follow the network’s health.

Why solo mining rarely makes sense: the numbers

Consider one modern machine producing 200 TH/s on a network running at around 600 EH/s, roughly the level of April 2024. (Illustrative figures.) The machine supplies about one three-millionth of the network’s hashing power. With about 144 blocks found a day, it would expect to find a block about once every 20,800 days, or roughly once every 57 years.

The expected income is the same whether the miner works alone or in a pool: about 15,000 satoshis a day in subsidy at 3.125 BTC per block, before fees. What changes is how that income arrives. Solo, it comes as one large reward that may never arrive in the machine’s working life. In a pool, it arrives as small, steady payments. Pools exist to turn a lottery into a salary, which is why almost all hashing power is pooled.

Hardware, electricity and where mining happens

Bitcoin mining today runs on ASICs, chips built to do nothing except compute SHA-256 hashes. Their key number is efficiency, measured in joules per terahash (J/TH): how much energy a machine burns to produce a trillion hashes. Each new generation lowers that figure, and older machines drop out once their electricity bill exceeds what they earn.

Because power is the largest ongoing cost, miners go where electricity is cheap, stranded or surplus. That is also why the energy debate around Bitcoin never fully settles: the network’s security comes from real-world spending, and how you judge that spending depends on what you think the network is worth. If you want to put numbers on a single machine, our worked example on estimating Bitcoin mining profitability shows the calculation.

From laptops to warehouses: how mining hardware changed

In Bitcoin’s first year, miners used the main processors of ordinary computers. In 2010, early participants found that graphics cards could run the same calculations far faster, and GPU mining quickly took over. Programmable chips, known as FPGAs, followed, and then application-specific integrated circuits (ASICs), chips built to do nothing but compute SHA-256 hashes as efficiently as possible.

Each step made the previous generation of hardware uncompetitive. Today, ASIC machines dominate, and the efficiency of a machine, measured in energy per unit of hashing, decides whether it is profitable. That is why mining has moved from hobbyists’ desks to large facilities located wherever electricity is cheapest.

Mining as a business

A mining operation earns the block subsidy plus fees for every block it, or its pool, finds, and pays for hardware, electricity, cooling and staff. Revenue rises with the bitcoin price and with fees; it falls with each halving and as more hashing power competes for the same rewards. Miners often track “hashprice,” the expected revenue per unit of hashing power per day, which combines the price, fees and difficulty into a single number. When hashprice falls below a machine’s running costs, that machine is switched off. See what determines Bitcoin mining profitability.

Energy: the cost that buys security

Mining’s electricity use is not a side effect; it is what makes the system work. The energy spent on hashing is what an attacker would have to match to rewrite history. How that electricity is generated, and whether the security is worth the energy, is one of the most contested questions about Bitcoin. Miners tend to seek out the cheapest power available, which can include surplus or otherwise unused energy, and some can switch off quickly when demand on a local grid peaks.

Why mining makes the ledger hard to rewrite

Every block commits to the one before it. To change a transaction buried a few blocks deep, an attacker would have to redo the proof of work for that block and every block after it, then overtake the honest chain that keeps growing in the meantime. The Bitcoin white paper describes this as a race the attacker falls further behind in with every new block, as long as honest miners control most of the hashing power.

This is the practical meaning of “proof of work.” The work is expensive to produce and trivial to verify, so the whole network can agree on one history without trusting any single miner. It also connects mining to the long-term supply question: as the subsidy keeps halving, fees have to carry more of that security budget, a shift covered in what happens when all 21 million bitcoin are mined.

For the bigger picture of how the asset and the network fit together, start with our guide to what Bitcoin is.

Common questions about Bitcoin mining

Can you still mine Bitcoin at home?

You can run a miner at home, but with a single machine you are competing against industrial operations with cheaper power. Most home miners join a pool to get regular small payouts. Whether it pays depends almost entirely on your electricity price and your hardware’s efficiency.

How long does it take to mine one bitcoin?

Mining does not produce coins one at a time. The network produces a block about every 10 minutes, and that block pays a fixed subsidy, currently 3.125 BTC, plus fees. How much of that a given miner earns depends on its share of the network’s total hashing power.

What happens to mining when the subsidy runs out?

The subsidy falls toward zero around the year 2140. After that, miners are paid only through transaction fees. Whether fees will be enough to keep the network secure is an open debate among researchers and developers.

This article is educational content and does not constitute financial, investment, legal or tax advice. Digital assets are volatile and you may lose the amount you invest.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *