Why Will Bitcoin Never Reach 21 Million Coins?

In brief: There are two layers. First, each halving drops any fraction of a satoshi, so the rules allow at most 20,999,999.9769 BTC to be issued. Second, some coins were issued but can never be spent, and some rewards were never claimed at all; as of block 600,000 the part that can be proven on-chain came to about 182.68 BTC. Coins lost with their private keys may run into the millions, but they can only be estimated.
Ask most people what they know about Bitcoin's supply and they'll say 21 million, hard-coded. Both parts of that are slightly off. No line in Bitcoin Core sets the total supply to 21 million, and under the current rules the number of bitcoin that can ever be spent will always be lower. On-chain data can only tell us the minimum shortfall.
Is 21 million written into Bitcoin's code?
No. The GetBlockSubsidy function, which controls issuance, does three things: it starts the block subsidy at 50 BTC, halves it once per halving interval[1], and drops it to zero once 64 halvings have passed. The interval of 210,000 blocks lives in the chain parameter nSubsidyHalvingInterval, not in the function itself[2].
Add up 50 × 210,000 × (1 + 1/2 + 1/4 + …) and the series converges on 21 million[2]. The total comes out of that math, and it rests on one assumption: once the subsidy reaches zero, it stays at zero.
Before 2014 that assumption didn't hold. The code halved the subsidy with a right bit shift, so by the 33rd halving (around 2140) it had already reached zero. The trouble came at the 64th halving (around 2214): a 64-bit right shift is undefined behavior in C++, and on the platforms supported at the time the subsidy would have jumped back to 50 BTC and the whole issuance schedule would have started over, leaving the supply with no upper limit in theory. BIP42 added the zero-after-64-halvings rule in 2014 and closed that gap[3].
There is a constant called MAX_MONEY set to 21 million. The source comment says it is a sanity check and does not represent the money supply, but because consensus validation code uses it, its exact value is itself consensus-critical[4].
What is the most bitcoin the rules allow?
20,999,999.9769 BTC, which is 0.0231 BTC short of 21 million. That is the maximum the rules permit; the amount that can actually circulate is lower still, for reasons covered in the next section.
Bitcoin keeps its books in satoshis. One bitcoin is 100 million satoshis, and there is no half satoshi. The code halves the subsidy with a right bit shift, which divides by two and throws away the remainder[1].
For the first few halvings, 5 billion satoshis divides cleanly. At the 10th halving (block 2,100,000, around 2048 at the current block rate), the subsidy should be 4,882,812.5 satoshis. The half is dropped and miners get 4,882,812. Every later era loses a little more, and the total comes to 2.31 million satoshis[5]. After the 33rd halving the subsidy reaches zero, around the year 2140[2].

Which bitcoin can never be spent?
The figure most often cited is 150 BTC. The 50 BTC genesis reward was never added to the set of unspent outputs, so it has been unspendable from day one[6]. In late 2010, the coinbase transactions in blocks 91842 and 91880 were identical to ones in two earlier blocks. The transaction IDs matched, the new records overwrote the old ones, and 50 BTC became unspendable each time[7]. BIP30 later banned new transactions that share an ID with an earlier transaction that still has unspent outputs, with exceptions for those two historic blocks[8].
Two more categories can be proven on-chain. One is rewards miners didn't claim: a miner may take less than the block allows, but nobody can collect the difference later, so those coins were never issued. Block 501726, mined on December 30, 2017, has a coinbase output of zero, and its 12.5 BTC subsidy is gone for good[9]. The other is coins sent to unspendable scripts such as OP_RETURN outputs, which were issued but can't be spent under the rules.
According to the on-chain data firm Coin Metrics, these categories added up to about 182.68 BTC as of block 600,000, including about 28.96 BTC of unclaimed rewards and about 3.72 BTC in OP_RETURN outputs[10].
Item | Amount (BTC) | Note |
|---|---|---|
Sum of the series | 21,000,000 | 50 × 210,000 × 2 |
Halving rounding | −0.0231 | Fractions of a satoshi dropped[5] |
Genesis block reward | −50 | Never added to the UTXO set[6] |
Duplicate coinbase transactions | −100 | Two repeated transaction IDs in 2010 overwrote earlier records[7] |
Unclaimed miner rewards | about −28.96 | As of block 600,000, still growing[10] |
OP_RETURN and other unspendable outputs | about −3.72 | As of block 600,000, still growing[10] |
Cap after these deductions | at most about 20,999,817.30 | Before burn addresses and lost keys |
Another group of coins can't be spent in practice but can't be proven unspendable either: coins sent to made-up "burn addresses". Nobody knows the private keys for these addresses, yet nobody can prove the keys don't exist. Coin Metrics counted about 2,213 BTC in three such addresses[10].
Lost keys are the larger unknown. The chain can't tell a lost coin from one that simply hasn't moved in years, and estimates vary widely: one analytics firm put the figure at about 3.7 million BTC in 2020[11], while another currently estimates about 1.57 million[12]. Treat these numbers as a rough guide.
What happened when 184 billion bitcoin appeared in 2010?
An integer overflow bug created them, and they became invalid once nodes upgraded.
On August 15, 2010, a block at height 74638 (later orphaned) contained a transaction with two outputs of 92,233,720,368.54277039 BTC each, more than 184 billion BTC in total[13][14]. The validation code at the time checked that each output wasn't negative, but not whether the outputs overflowed when added together.
About five hours after the discovery, client version 0.3.10 was released. It tightened the consensus rules through a soft fork, rejecting overflow transactions and any transaction with a single output above 21 million BTC[13]. Upgraded nodes stopped accepting the block, and the corrected chain overtook the bad one at height 74691[13]. The block at height 74638 on today's main chain is a different, ordinary block.

What actually holds the supply in place is a check every full node runs when validating a block: the coinbase transaction can't pay out more than the block subsidy plus transaction fees, and a block that does is rejected with bad-cb-amount[15]. MAX_MONEY catches out-of-range amounts, and the 2010 fix was built around it[4].
How can you check Bitcoin's supply yourself?
- Run a full node with
-coinstatsindexenabled and callgettxoutsetinfo. total_amount is the value of the current unspent output set; total_unspendable_amount and the unspendables breakdown list the coins permanently excluded from it, split into the genesis block, BIP30 duplicates, unspendable scripts and unclaimed rewards[16]. Put them side by side and you can rebuild the table above. - When you write or teach, say the cap allowed by the rules is "just under 21 million." If you need the exact figure, use 20,999,999.9769.
- When you see "X% has been mined," check the denominator. When the 20 millionth bitcoin was mined in March 2026, most reports divided by 21 million and got about 95.2%[17]. Against the supply that can actually be spent, the share is higher.
- See the issuance curve on the museum's Data page, or check how long until the next halving in The Trust Machine.
FAQ
Is Bitcoin's total supply really 21 million?
No. The rules allow at most 20,999,999.9769 BTC[5]; after the coins that provably can never be spent, the figure as of block 600,000 is at most about 20,999,817.30 BTC[6][7][10].
When will the last bitcoin be mined?
Under current rules the block subsidy reaches zero around 2140. After that, miners earn only transaction fees[2].
Can Bitcoin's supply be changed?
Increasing issuance would take a hard fork, with every node switching to new software. The 2010 fix closed a bug and was a soft fork that tightened the rules[13].
How many bitcoin have been mined so far?
The 20 millionth bitcoin was mined around March 9, 2026, near block 940,000[17]. Note that total_amount from gettxoutsetinfo covers only the unspent output set and leaves out the coins proven to be permanently excluded, so it isn't the same as the amount mined[16].