Research·Verification

How to Verify Bitcoin’s 21 Million Supply Yourself

Your own node can sum every unspent output in existence and tell you the exact number of bitcoin that exist right now. It takes one command. The result will be slightly below what the issuance schedule predicts, and understanding why that gap exists is more instructive than the number itself.

Level
Intermediate
Reading
8 min
Published
2026-11-18
Reviewed
2026-11-29

Almost everything said about Bitcoin requires you to trust somebody. The supply cap does not. It is one of a small number of claims you can settle personally, with software you verified, against data you downloaded and checked yourself, in an afternoon. That makes it the right place to start if you want to know what verification feels like rather than what it means.

What are you actually checking?

The number of bitcoin in existence is not stored anywhere. There is no supply counter in the protocol and no field in a block that reports it. What exists is a set of unspent transaction outputs, each with an amount, and the total supply is their sum.

A full node already holds that set, because it needs it to validate the next block. Asking for the total is therefore not a lookup against an authority — it is an arithmetic operation over data your machine derived itself by replaying every block from the genesis block forward and rejecting anything that broke a rule.

That is the whole point. The answer you get is not Bitcoin’s answer. It is yours.

Verify the software before you trust its output

Auditing the supply with an unverified binary proves nothing, because the binary could simply print whatever you hoped to see. This step is the one most guides skip and the only one that makes the rest meaningful.

Bitcoin Core publishes a SHA256SUMS file listing the hash of every release artifact, and a detached signature file containing signatures from multiple independent builders. The builds themselves are reproducible: several people compile the same source in the same controlled environment and publish attestations that they got byte-identical output. You are not trusting one maintainer; you are checking that independent parties who would have to collude all produced the same binary. How to verify the Bitcoin Core you are running is the procedure in full, including the step these two paragraphs skip — deciding whose signatures you accept, and on what basis.

# After downloading the release, SHA256SUMS and SHA256SUMS.asc:
sha256sum --ignore-missing --check SHA256SUMS
gpg --verify SHA256SUMS.asc SHA256SUMS

The first command confirms the file you have is the file that was signed. The second confirms who signed it. A good result from the first and a failure from the second means you have an authentic-looking file from an unknown party, which is worse than no check at all.

Sum the set

With a synced node, the audit is one call. It walks the entire unspent output set, so it is not instant.

bitcoin-cli gettxoutsetinfo

# On a node running with -coinstatsindex, this is fast and can be asked
# about any height, which is what makes the comparison below possible.
bitcoin-cli gettxoutsetinfo hash_serialized_3 800000

The field you want is total_amount. Alongside it, txouts tells you how many unspent outputs exist and height tells you the block the answer is true as of. Record all three, because the number is only meaningful with the height attached.

Now compute what it should be

The issuance schedule is simple enough to reproduce in a few lines. The subsidy starts at 50 BTC and halves every 210,000 blocks, and critically it is computed in satoshis using integer arithmetic. Each halving truncates rather than rounding, and after 33 halvings the subsidy reaches zero.

def total_issued(height):
    total, subsidy, h = 0, 50 * 100_000_000, 0
    while h <= height and subsidy > 0:
        blocks = min(210_000, height - h + 1)
        total += blocks * subsidy
        h += blocks
        subsidy //= 2
    return total / 100_000_000

Run that for your node’s height and compare. Two things should surprise you.

The first is the ceiling. Summed to exhaustion, the schedule never reaches 21 million — the integer truncation leaves it a little short. The round number everyone quotes is an approximation of a number that is not round.

The second is that your node reports less than the schedule says. The gap is real, permanent, and worth understanding.

Why do the numbers disagree?

Coins can be destroyed, and several mechanisms have done so.

Miners have underpaid themselves. A coinbase transaction may claim up to the subsidy plus fees. Claiming less is perfectly valid, and over the years various miners have done so, through buggy software or by omitting fees entirely. Every satoshi not claimed was never created.

Two coinbases were duplicated. Early in Bitcoin’s history, two coinbase transactions were created that were byte-identical to earlier ones. Because a transaction is identified by its hash, the later ones overwrote the earlier entries in the output set, and the overwritten coins became unspendable. BIP 30 made duplicate transactions invalid so it cannot recur; the coins remain gone.

Provably unspendable outputs are not counted. An output whose script begins with OP_RETURN can never be spent, and a node recognises this and omits it from the unspent output set entirely rather than carrying it forever. Anything sent to such an output is subtracted from the supply your node reports.

Find the discrepancy on your own node before reading anyone’s explanation of it. Comparing your figure against the schedule at a few different heights will show you roughly when each loss occurred, which is a far better lesson than being told the totals.

The same method, applied to your own coins

Auditing the global supply is a rehearsal. The procedure that matters is the one where the balance in question is yours, and it uses the same set.

Most wallets do not check. A light wallet asks a server which outputs belong to your addresses and displays the answer, which means two things at once: you are trusting that server’s view of the chain, and you have told it every address you own. That second cost is the larger one, because it links your addresses to each other and to an IP address, permanently, in someone else’s logs.

A node can answer the same question without anyone being asked. Modern wallets describe their addresses with an output descriptor — a compact string recording the script type, the extended public key and the derivation path — and a descriptor is enough to find coins without being able to spend them.

# Scan the unspent output set for everything a descriptor can claim.
# Public keys only: nothing here can sign.
bitcoin-cli scantxoutset start \
  '[{"desc":"wpkh([abcd1234/84h/0h/0h]xpub6.../0/*)","range":[0,1000]}]'

The scan walks the same set the supply audit summed and reports the outputs that match, their amounts, and the height it checked at. Nothing left your machine, and no server learned which addresses you asked about.

Two details decide whether the answer is complete. The range must extend past the highest index your wallet has actually used, or outputs beyond it are silently missed. And the descriptor must include the change path as well as the receive path, which is usually a second descriptor ending /1/*. A balance that looks wrong is most often one of those two, not a missing coin.

What does this prove, and what does it not?

It proves that, under the consensus rules your software enforces, exactly this many bitcoin exist as of this block. That is a strong statement and it is yours rather than borrowed.

It does not prove the supply will stay capped. The cap is a rule in software, and software can be changed by the people who run it. What the audit establishes is that the rule is currently being followed and that deviation would be immediately visible to anyone doing what you just did — which is a much better guarantee than a promise, and a weaker one than a law of nature.

One caveat applies to how you are running the node. A pruned node still validated every block on the way down and still holds the complete unspent output set, so this audit is exactly as valid on one. What it has discarded is the block data, which means it cannot repeat the validation later or serve history to anyone else. The result is yours; the ability to reproduce it from scratch is not.

It also says nothing about how many coins are reachable. Lost keys do not remove outputs from the set; those coins are still counted as existing, because no node can tell the difference between a key that is lost and one that is simply not being used. Every estimate of “lost” supply is an inference from spending behaviour, not a measurement.

What remains uncertain

How much supply is permanently unreachable. Published estimates vary widely and rest on heuristics about dormancy that cannot distinguish a lost key from a patient owner. Anyone quoting a precise figure is quoting a model.

Whether the cap survives a sufficiently long time horizon. Nothing in the mechanism prevents a future set of participants from adopting different rules. The argument for durability is social and economic rather than cryptographic, and it should be made in those terms.

What the audit will cost to run as the output set grows. The set has grown steadily, and the time and memory this procedure needs grows with it. Whether ordinary hardware can still do this in twenty years is a live question that touches directly on who gets to verify.

Whether reproducible builds are as strong as they appear. They establish that independent parties compiled the same source into the same binary. They do not establish that the source does what it claims, and the number of people reviewing consensus-critical changes closely is smaller than the number relying on them.

Sources

Nearby