Bitcoin Mining, Halving, Supply and Fees: Block Rewards, Difficulty Adjustment and the 21 Million Cap

Blockchain Developer 50 min min read Updated: Nov 17, 2026 Intermediate
Bitcoin Mining, Halving, Supply and Fees: Block Rewards, Difficulty Adjustment and the 21 Million Cap
Intermediate Topic 2 of 3

Mining in Bitcoin

  • Miners collect transactions, build a block and search for a valid nonce using SHA-256
  • The first to find one broadcasts the block. Others verify it easily
  • Winner gets the block subsidy plus fees

Halving

  • The block subsidy halves every 210,000 blocks (about every four years)
  • It started at 50 BTC in 2009 and has halved several times. After the April 2024 halving it is 3.125 BTC per block
  • Halving continues until the subsidy becomes tiny, and the supply approaches 21 million BTC, expected around the year 2140

Supply Calculation in Python

python reward = 50.0 total = 0.0 for era in range(0, 8): mined = 210000 * reward total += mined print("era", era, "reward", reward, "total so far", round(total)) reward = reward / 2
Result

era 0 reward 50.0 total so far 10500000 era 1 reward 25.0 total so far 15750000 era 2 reward 12.5 total so far 18375000 era 3 reward 6.25 total so far 19687500 era 4 reward 3.125 total so far 20343750 era 5 reward 1.5625 total so far 20671875 era 6 reward 0.78125 total so far 20835938 era 7 reward 0.390625 total so far 20917969

The total keeps getting closer to 21 million but never passes it.

Difficulty Adjustment

  • Every 2016 blocks the network checks how long they took
  • If blocks came faster than 10 minutes, difficulty goes up. If slower, it goes down
  • This keeps the block rate steady even when many miners join or leave

Hardware and Pools

ItemMeaning
CPU, GPUUsed in the early days. Now far too slow for Bitcoin
ASICChip built only for SHA-256 mining. Used today
Mining poolMiners combine power and share rewards to get steady income instead of rare big wins

Fees and the Future

  • As the subsidy shrinks, fees are expected to pay more of miners' income
  • Miners cost: hardware, electricity and cooling. Profit depends on coin price, difficulty and power cost

Practice

  1. What will the reward be after the next halving?
  2. Why does difficulty adjust?
  3. Why do small miners join pools?

Conclusion

Bitcoin's reward halves every 210,000 blocks, difficulty adjusts every 2016 blocks and supply is capped near 21 million coins.

Quick Summary: mining; halving; Python; difficulty; hardware; fees.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators