Why Only 21 Million Bitcoin? The Cap, Line by Line

There is no line in Bitcoin’s code that says “stop at 21 million.” The cap is the sum of a schedule: every block pays a fixed reward, that reward is cut in half every 210,000 blocks, and 210,000 blocks times 50 bitcoin times one, plus one half, plus one quarter, and so on, adds up to just under 21 million. The exact total the code can ever issue is 20,999,999.9769 bitcoin.

I read the cap out of Bitcoin Core’s source, line by line, and computed the full schedule from it. Here is what the code actually says, why the total falls short of a round number, and what it would take to change it.

The function that sets the supply

The whole issuance schedule lives in one short function in src/validation.cpp. This is the current version from the Bitcoin Core repository:

CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
    int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return 0;

    CAmount nSubsidy = 50 * COIN;
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;
    return nSubsidy;
}

Taken line by line:

  • halvings is the block height divided by 210,000, rounded down. Block 839,999 is in era 4. Block 840,000 starts era 5.
  • 50 * COIN is the starting reward. COIN is 100,000,000, the number of satoshis in one bitcoin, so the reward is counted in whole satoshis, never fractions.
  • >>= halvings shifts the number right in binary, once per halving. Each shift divides by two and throws away any remainder.
  • halvings >= 64 is a guard against a C++ quirk. It is not what ends issuance; the reward reaches zero long before then.

There is a 21 million figure in the code, but it does something else. src/consensus/amount.h defines MAX_MONEY as 21,000,000 times COIN, and the comment above it calls it a sanity check: no single amount in a transaction may be larger. The supply cap itself is never written down. It falls out of the arithmetic.

Bitcoin issuance schedule, computed

Running that function for every era gives the whole schedule. The first eight eras cover more than 99.6% of all the bitcoin there will ever be.

EraStarting blockReward per blockNew bitcoin in the eraTotal issued at era end
105010,500,00010,500,000
2210,000255,250,00015,750,000
3420,00012.52,625,00018,375,000
4630,0006.251,312,50019,687,500
5 (current)840,0003.125656,25020,343,750
61,050,0001.5625328,12520,671,875
71,260,0000.78125164,062.520,835,937.5
81,470,0000.39062582,031.2520,917,968.75
112,100,0000.0488281210,253.905220,989,746.0927
33 (last)6,720,0000.000000010.002120,999,999.9769
Computed from GetBlockSubsidy() in Bitcoin Core. Rewards in BTC. Era 11 is the first era where rounding to whole satoshis shows up; era 33 pays one satoshi per block.
Bitcoin issuance schedule chart: cumulative bitcoin supply by halving era approaching the 21 million cap
Total bitcoin issued at the end of each 210,000-block era. Source: Bitcoin Core source code, computed by Modern Wealth Model.

Why the supply cap is not exactly 21 million

Look at era 11. A reward of 50 bitcoin halved ten times would be 0.048828125, but the code counts in satoshis, and 0.048828125 bitcoin is 4,882,812.5 satoshis. The right shift drops the half. From there on, every era loses a sliver to rounding.

By era 33 the reward is one satoshi. At block 6,930,000 one satoshi shifts to zero, and new issuance ends. Add every era up and the maximum is 2,099,999,997,690,000 satoshis: 20,999,999.9769 bitcoin, about 0.0231 short of 21 million.

The real number will be lower still. Bitcoin Core skips the genesis block’s transactions when it connects that block, so its 50 bitcoin reward was never spendable. BIP 30 records two early blocks, at heights 91,842 and 91,880, whose reward transactions duplicated earlier ones and overwrote them, taking another 100 bitcoin of the schedule out of reach. That is at least 150 bitcoin issued on paper that no one can ever move, before counting a single lost key.

Why 21 million and not some other number?

Satoshi never published a derivation. In an April 2009 email to Mike Hearn, he said as much:

My choice for the number of coins and distribution schedule was an educated guess.

Satoshi Nakamoto, email to Mike Hearn, April 12, 2009

I think that is the right way to read the number. 21 million is not magic. The total could have been 2.1 million or 2.1 billion, and because the unit divides into 100 million satoshis, the price per coin would simply have settled at a different level. The size of the total matters far less than the fact that it, and the path to it, was fixed before anyone could know who would benefit from changing it.

Can Bitcoin’s max supply be changed?

In the narrow sense, yes. It is software. Anyone can edit GetBlockSubsidy and compile a version that pays more.

The catch is who has to agree. Every full node checks every block against its own copy of the rules. In ConnectBlock, Bitcoin Core compares what a block’s reward transaction pays against the subsidy plus the fees in that block, and if the block pays out more, it is rejected with the error bad-cb-amount. A miner running the edited version would produce blocks that the rest of the network treats as invalid. To change the schedule, you would need the people running nodes to install the new rules on purpose.

That has been tested once, by accident. On August 15, 2010, block 74,638 contained a transaction that created 184,467,440,737.09551616 bitcoin by exploiting an overflow bug in how outputs were added up. That was a bug, not a policy change. A patched client was released within about five hours, nodes upgraded, and the chain without the bad transaction overtook the bad chain at block 74,691 the next day. The patch also added the check that no output may exceed 21 million bitcoin. Nobody kept the 184 billion.

That episode is the closest thing to an answer the record offers. When issuance broke, the network treated it as damage and repaired it, rather than as a new supply to work with.

The strongest case against a hard cap

The serious objection comes from the security budget. Miners are paid by the block reward plus fees, and the reward is heading to zero. In 2016, Miles Carlsten, Harry Kalodner, S. Matthew Weinberg, and Arvind Narayanan published “On the Instability of Bitcoin Without the Block Reward,” which modeled a fee-only world and found that mining could become unstable, with miners gaining from tactics such as re-mining a recent block that held rich fees in order to take those fees for themselves.

I take that seriously. The fee market is the open question in Bitcoin’s design, and the 21 million cap is what forces it. The cap’s credibility is the product, and the security budget is the bill for it. Whether fees alone can pay that bill is something the next several eras will test in public, a little more each halving.

Where the schedule stands now

On November 2, 2026, the chain reached block 974,282. By the subsidy schedule, blocks 0 through 974,282 can have issued at most 20,107,134.375 bitcoin, about 95.7% of the 20,999,999.9769 maximum. The next halving, to 1.5625 bitcoin per block, comes at block 1,050,000, which is 75,718 blocks away; at the ten-minute target that lands in 2028. The last satoshi of new issuance comes at block 6,929,999, almost six million blocks from now, which at the same pace is around the year 2140.

Those dates are estimates from the block target, not promises. Blocks arrive on average every ten minutes, not exactly, so the halving date drifts by days. The block numbers do not drift. That is the point of writing the schedule in blocks.

Where this fits

For further reading, the Advanced Bitcoin shelf of the Card Catalog includes Parker Lewis’s Gradually, Then Suddenly, a collection of essays on how Bitcoin’s monetary design works. That book link is an Amazon affiliate link; Modern Wealth Model may earn a commission at no cost to you.

Sources

Written by Colin Reed

Colin Reed is an operations executive and independent consultant whose career spans foodservice distribution, airline catering, last-mile delivery, and hospitality, from restaurants and bars to luxury resort food and beverage programs. He has held distribution P&L with capital authority and run enterprise system selections across warehouse management, labor management, and ERP platforms, and advises funds, corporates, and management consultancies through expert networks and research firms. On Modern Wealth Model he writes on applied AI in the physical economy, Bitcoin, and long-horizon retirement planning — and builds the calculators.

Full bio · Contact · Consulting