Learn
The difficulty adjustment
Next difficulty adjustment (live)
Updates every 60s · data mempool.space
Blocks to retarget
—
Estimated date
—
Estimate
Estimated change
—
Estimate; changes until the retarget block
Retarget interval
2,016 blocks
About two weeks
How the retarget works
The white paper says difficulty “is determined by a moving average targeting an average number of blocks per hour. If they’re generated too fast, the difficulty increases” (white paper, section 4).
- Bitcoin Core sets the target spacing to 10 minutes and the target timespan to two weeks (chainparams.cpp). Two weeks of 10-minute blocks is 2,016 blocks, the retarget interval.
- At each retarget, pow.cpp measures how long the last 2,016 blocks actually took and scales the target by actual ÷ expected time. Blocks too fast: harder. Too slow: easier (Bitcoin Wiki).
- The 4x clamp: pow.cpp caps the measured timespan between one quarter and four times the two-week target, so a single adjustment can’t make mining more than 4 times harder or easier.
- No one votes and no one decides. Every node computes the same result from the block timestamps.
Why it matters
- Security. Difficulty tracks the total work miners put in. More hash power means more work an attacker would need to match.
- Issuance schedule. Because blocks stay near 10 minutes on average, new bitcoin is issued on a predictable timetable no matter how much hardware joins.
- Miners joining or leaving. If miners switch off, blocks slow down until the next retarget makes mining easier; if they rush in, it gets harder. Profitability for each miner adjusts with it.
Notable history: July 2021
After China’s 2021 mining crackdown pushed a large share of hash power offline, blocks slowed sharply. On July 3, 2021 the difficulty adjusted down 27.94%, the largest downward adjustment on record (Glassnode; CNBC reported about 28%). The network kept producing blocks throughout, just more slowly until the retarget.
How it differs from the halving
- The difficulty adjustment changes how hard it is to find a block, every 2,016 blocks, up or down, depending on hash power.
- The halving cuts the new-coin reward per block in half every 210,000 blocks, on a fixed schedule that never depends on hash power. See the history timeline.
- Together they keep issuance predictable: the halving sets how much per block, the difficulty adjustment keeps the blocks coming at a steady pace.
Related
Live estimates from the open-source mempool.space API (AGPL-3.0). They change as blocks arrive.
Sources