Sub topic 5
Bitcoin's Fixed Supply and Halving Schedule
Prerequisites and scope
This chapter assumes you know what a block is, that miners (or validators) propose blocks, and that Bitcoin's UTXO model tracks spendable outputs. You should also be able to read short Python snippets. It covers how Bitcoin creates new coins, why the total is capped just under 21 million, and what the cap means in practice. It gives no investment advice.
Where new bitcoin comes from
Bitcoin has no central issuer. New coins enter circulation through the block subsidy. This is a special transaction, called the coinbase transaction, that is the first transaction in every block. It pays the miner who found the block. The miner's total reward is:
- the block subsidy (newly created coins), plus
- the sum of transaction fees from the transactions in that block.
The subsidy is set by consensus rules that every full node checks. If a miner claims more than subsidy plus fees, nodes reject the block. The supply schedule is therefore enforced by the nodes that verify blocks, not by the miners and not by a company.
Units: satoshis
Bitcoin software stores amounts as integers. The smallest unit is the satoshi (sat), and 1 BTC = 100,000,000 sats. Integer arithmetic matters for the schedule because the subsidy is computed with a bit shift, not with floating point division.
The halving rule
The subsidy started at 50 BTC per block. It is cut in half every 210,000 blocks. This event is called a halving. At the target block interval of about 10 minutes, 210,000 blocks take roughly four years (210,000 × 10 minutes ≈ 4.0 years).
Each period of 210,000 blocks is an era. The table shows the first several eras.
| Era | Block heights | Subsidy per block |
|---|---|---|
| 0 | 0 to 209,999 | 50 BTC |
| 1 | 210,000 to 419,999 | 25 BTC |
| 2 | 420,000 to 629,999 | 12.5 BTC |
| 3 | 630,000 to 839,999 | 6.25 BTC |
| 4 | 840,000 to 1,049,999 | 3.125 BTC |
| 5 | 1,050,000 to 1,259,999 | 1.5625 BTC |
Era 4 began at block 840,000, which was mined in April 2024.
Computing the schedule
The protocol implements halving as a right shift of the integer subsidy in satoshis. A right shift by one position divides by two and drops any remainder. The following program computes the subsidy for any height and sums the total supply.
SATS_PER_BTC = 100_000_000
HALVING_INTERVAL = 210_000
INITIAL_SUBSIDY = 50 * SATS_PER_BTC
def subsidy(height):
halvings = height // HALVING_INTERVAL
if halvings >= 64:
return 0
return INITIAL_SUBSIDY >> halvings
total_sats = sum(subsidy(era * HALVING_INTERVAL) * HALVING_INTERVAL for era in range(64))
print(total_sats)
print(total_sats // SATS_PER_BTC)The program prints 2099999997690000 and then 20999999. Three details in the code are worth understanding.
height // HALVING_INTERVALgives the era number using integer division.- The check
halvings >= 64mirrors a rule in the reference implementation. Shifting a 64-bit value by 64 or more positions is undefined behavior in some languages, so the code returns zero explicitly. In practice the subsidy reaches zero long before that. - The sum multiplies each era's per-block subsidy by the 210,000 blocks in the era.
Why the total is not exactly 21 million
The total is 2,099,999,997,690,000 sats. This is 20,999,999.9769 BTC, which is 0.0231 BTC short of 21 million. The gap comes from rounding. 50 BTC is 5,000,000,000 sats. Each right shift floors the result, so after enough halvings the subsidy has fractions of a satoshi that get discarded. For example, era 6 would pay 0.78125 BTC, which is 78,125,000 sats and exact. But around era 29 the subsidy in sats is small enough that halving produces odd values, and the remainder is lost on each shift.
The subsidy reaches 1 sat in era 32 (5,000,000,000 >> 32 = 1), and in era 33 it becomes 0. After era 32, no new coins are created. By this arithmetic the last subsidy is paid around the year 2140.
The "21 million" figure is therefore a rounded description. The enforced limit is the sum computed by the integer schedule, 2,099,999,997,690,000 sats.
How much has been issued over time
Because early eras pay the most, most coins are issued early. After era 0, the supply is 10.5 million BTC, which is half of the cap. After era 1, it is 15.75 million, and after era 2, 18.375 million. Each halving cuts the new issuance in half, so about 87.5% of all coins exist after three halvings.
Inflation rate versus supply cap
The supply growth rate falls with each halving. Right after the 2024 halving, the subsidy was 3.125 BTC per block. At about 144 blocks per day, that is roughly 450 BTC per day, or about 164,000 BTC per year. With a supply near 19.7 million BTC, the annual issuance is under 1% of the existing supply. Each halving cuts that rate in half again.
Note the distinction between two claims people often mix up:
- Fixed supply cap: the total number of coins can never exceed the schedule's sum.
- Declining issuance rate: new coins arrive more slowly over time, but the circulating supply is still growing until about 2140.
Coins that are not circulating
The issued supply is not the same as the usable supply. Some coins are lost for good, for example when someone loses a private key or sends coins to an address nobody can spend from. Because the protocol cannot detect this, lost coins still count in the total issued. Estimates of lost coins vary widely, and no one can verify them. Treat any specific figure as a guess.
Also, the first coinbase output in block 0 (the genesis block) cannot be spent because of how the genesis block is built in the software. It is included in the total supply count but was never spendable.
Fees after the subsidy ends
The subsidy shrinks toward zero, so miners will eventually depend on transaction fees alone. This raises an open question about security. Proof-of-work security comes from the cost of mining, which is paid for by the block reward. If fees are too low relative to the cost of attacking the network, the security budget shrinks. Opinions differ on whether fee revenue will be enough. The chapter on scalability trade-offs returns to this theme. For now, note that the subsidy is a deliberate, declining subsidy of security, and the long-term replacement is fee income.
Edge cases and common errors
- Block times are not exact. Blocks arrive on average every 10 minutes, but hashrate changes make the real time between halvings vary. The halving is tied to block height, not to a calendar date. Dates for future halvings are estimates.
- Difficulty adjustment keeps the average steady. Every 2,016 blocks, nodes adjust the mining difficulty so that blocks keep arriving at about 10-minute intervals. This is why halvings stay near four years apart even when hashrate grows.
- Halving does not mean the price halves or doubles. The halving changes issuance only. Price depends on demand and many other factors, and this chapter makes no prediction.
- Subsidy in the code is per block, not per year. A frequent mistake is to multiply the subsidy by 365 instead of by blocks per day times days.
- Changing the cap is a consensus change. Increasing the supply would require nearly all node operators to run new software that accepts blocks the old rules reject. Such a change would split the network if people disagree, so it is considered very unlikely, but it is a social agreement as much as a technical one.
- Float arithmetic can mislead. Computing the schedule in floating point BTC can produce rounding differences. Use integer satoshis.
Summary of the monetary design
| Property | Bitcoin's value |
|---|---|
| Initial subsidy | 50 BTC |
| Halving interval | 210,000 blocks (about 4 years) |
| Target block time | 10 minutes |
| Total supply | 2,099,999,997,690,000 sats |
| Last subsidy | Era 32 (1 sat per block) |
| Approximate end of issuance | Around 2140 |
| Enforcement | Full nodes reject blocks that pay too much |
Exercise
Use the subsidy function. What is the block subsidy in satoshis at height 1,000,000, and which era is that? Then explain why the supply is 2,099,999,997,690,000 sats and not exactly 2,100,000,000,000,000.
Show answer
Height 1,000,000 // 210,000 = 4, so it is era 4. The subsidy is 5,000,000,000 >> 4 = 312,500,000 sats, which is 3.125 BTC. The total falls short of 21 million BTC because each right shift floors to a whole number of satoshis and discards fractions, so a small amount (2,310,000 sats, or 0.0231 BTC) is never issued.
Exercise
A miner claims a coinbase output of 3.2 BTC at a height in era 4, and the block contains 0.05 BTC in total fees. Would full nodes accept the block? Why?
Show answer
Yes. The maximum allowed is subsidy plus fees: 3.125 + 0.05 = 3.175 BTC. 3.2 BTC is more than 3.175, so nodes would reject it. The answer is no, the block is invalid, because the claimed output exceeds the allowed 3.175 BTC.