Height
Block height is a block's position in the bitcoin blockchain, counted from 0 at the genesis block. Learn how bitcoin block height works and what it sets.
By Dimitar Zurnov · Updated 4 Nov 2026
Adapted from Learn Me a Bitcoin by Greg Walker.
A block's height is its position in the blockchain. The genesis block, the first block ever mined, has height 0. Each new block adds 1, so a block's height equals the number of blocks before it. The short definition is on the block height page. This page covers how height is counted and which rules depend on it.
How is the height counted?
Counting starts at zero. The genesis block is block 0, the next block is block 1, and so on. A chain whose top block has height N therefore holds N + 1 blocks in total.
Our explorer shows the height of every block, and you can open any of them by its number. Block 210,000, for example, is the first block that pays the halved subsidy.
Which heights change the rules?
Height is more than a label. Several parts of bitcoin depend on it, and these are the milestones you are most likely to meet.
When does the difficulty change?
The target is recalculated every 2,016 blocks, roughly every two weeks. This keeps the average gap between blocks near 10 minutes, even when miners join or leave. The first adjustment happened at height 2,016, the second at 4,032, the third at 6,048, and so on. Our difficulty page explains what the adjustment does to the target.
When does the subsidy halve?
The block subsidy is the new bitcoin a block creates for its miner. It halves every 210,000 blocks, roughly every four years. It started at 50 BTC, fell to 25 BTC at height 210,000, and fell to 12.5 BTC at height 420,000. Block 840,000 was mined on 20 April 2024, and it set the subsidy at 3.125 BTC.
After 33 halvings, at height 6,930,000, the subsidy reaches zero. From then on, miners earn only fees. The halving page has the schedule.
Which heights affect a coinbase transaction?
From block 227,931 on, every coinbase transaction must include the height of the block that contains it. The rule comes from BIP 34. Its job is to make each coinbase unique.
Before this rule, two coinbase transactions in different blocks could end up identical, with the same outputs and the same script data. They would then share a TXID. BIP 30, from 2012, banned a transaction whose ID matched an earlier one that still had unspent outputs. BIP 34 removed the cause, because the height differs in every block.
Can a transaction depend on height?
Yes. A transaction's locktime can name a block height. If the locktime is below 500,000,000, Bitcoin reads it as a height. The transaction is then valid only in a block higher than that height. A locktime of 500,000 means the earliest block that can include the transaction is 500,001.
A relative locktime works differently. It is set in the sequence field, and it counts blocks from the block that confirmed the output being spent, not from a fixed height.
Can two blocks share a height?
No. Two blocks can be found close together and compete for the same height. If the chain reorganizes, the block at a given height can change. When you need one exact block, use its block hash.
The risk falls with depth. A block that is three or more blocks deep is very unlikely to be replaced, so its height is reliable in practice. A block near the tip can still change.
Which commands show the height?
If you run Bitcoin Core, bitcoin-cli reads the height from your node:
bitcoin-cli getblockcount
bitcoin-cli getblockhash 210000
bitcoin-cli getblockheader <hash>
getblockcountreturns the height of the top block on your chain.getblockhashreturns the hash of the block at a given height on your chain.getblockheaderreturns the header of a block, including itsheightfield.
If your node holds two blocks at one height, getblockhash returns the one on the chain your node currently follows. That answer can change after a reorg.
Summary
Height is a block's position in the chain, counted from 0. It sets when the difficulty changes and when the subsidy halves. It can also limit when a transaction becomes valid. Height is a handy reference, but only the block hash identifies one block for certain.
In this section: Blockchain
Something look wrong? Tell us