In the summer of 2021, a large share of the machines securing Bitcoin went dark within a few weeks, as Chinese authorities moved against bitcoin mining and many farms there shut down. A payment network losing that much capacity would usually be front-page chaos.
Bitcoin slowed down, then corrected itself. On July 3, 2021, at block 689,472, the network cut its mining difficulty by 27.9 percent, the largest single drop in its history. Across four retargets from May to July, difficulty fell about 45 percent in total. Blocks went back to arriving about every 10 minutes. No one called a meeting.
The mechanism behind that recovery is a few lines of code that have run every two weeks or so since 2009. It is the reason Bitcoin's supply schedule is a schedule at all.
Why Ten Minutes Needs Defending
Mining is a guessing game: miners hash block headers until one lands below a target number, as explained in How Bitcoin Mining Actually Works. The more machines guessing, the sooner someone wins. If the target never moved, every new mining machine would make blocks come faster.
That would break two things. First, the issuance schedule. The halving is triggered every 210,000 blocks, so faster blocks would release new bitcoin faster than planned. Second, network health. Blocks need time to spread across the world; when they come too quickly, more miners end up building on competing blocks and wasting work.
The whitepaper anticipated this in section 4, where the proof-of-work difficulty "is determined by a moving average targeting an average number of blocks per hour. If they're generated too fast, the difficulty increases."
The Rule, in Plain Terms
Bitcoin Core sets two numbers: a target spacing of 10 minutes per block and a target timespan of two weeks. Divide one by the other and you get the retarget interval: 2,016 blocks.
At every block height divisible by 2,016, each node looks back over the previous period, measures how long it actually took, and scales the target:
- Took less than two weeks? Hashpower grew. The target gets smaller, so a valid hash is harder to find.
- Took more than two weeks? Hashpower shrank. The target gets bigger, so valid hashes are easier.
The math is a simple ratio: new target equals old target times actual time divided by two weeks. Difficulty is just a friendlier way of expressing the target: how many times harder the current target is than the easiest one ever allowed. The genesis block had a difficulty of 1. On October 7, 2026, mempool.space reported about 132.7 trillion.
Analogy: Think of a thermostat that checks the room every two weeks. If the room ran hot, it turns the heat down by exactly the right proportion; if it ran cold, it turns it up. It never reacts to a single gust through an open door, only to the average over the whole period.
The Guardrails: Never More Than 4x
The code limits how far one retarget can go. Before scaling, Bitcoin Core clamps the measured time to between a quarter of two weeks (3.5 days) and four times two weeks (8 weeks). So a single adjustment can make mining at most 4 times harder or 4 times easier.
That limit has been reached exactly once in the upward direction. On July 16, 2010, at block 68,544, difficulty jumped from about 45.4 to about 181.5, a full 4x. New miners were flooding into a tiny network: the 2,016 blocks before that retarget took only about three days, so the clamp kicked in.
There is also a well-known quirk. The code measures time from the first block of the period to the last, which spans 2,015 gaps rather than 2,016. It has been there since the original release, it biases the average very slightly toward faster blocks, and changing it would require every node to adopt new rules. So it stays.
The Biggest Swings on Record
| Date | Block | Change | Note |
|---|---|---|---|
| July 13, 2010 | 66,528 | +93% | Difficulty nearly doubles three days before the record |
| July 16, 2010 | 68,544 | +300% (4x) | The upper limit, reached once |
| May 26, 2011 | 127,008 | +78% | Largest increase since 2010 |
| October 31, 2011 | 151,200 | 18% down | Second-largest drop on record |
| November 3, 2020 | 655,200 | 16% down | Third-largest drop on record |
| July 3, 2021 | 689,472 | 28% down | Largest drop, as mining left China |
Changes are calculated from mempool.space's record of every retarget. Note how the swings shrink over time. A network running close to 1,000 exahashes per second, spread across many countries, rarely moves 20 percent in two weeks.
What Difficulty Does Not Do
Difficulty does not respond to price directly. It responds only to how fast blocks were found, which follows how many machines were running, which follows whether mining was profitable. Price can move in minutes; difficulty catches up over weeks.
It also does not make blocks exactly 10 minutes apart. Finding a block is random, so individual gaps range from seconds to over an hour. The adjustment targets the average, not each block.
And between retargets, nothing changes. If half the hashpower vanished the day after an adjustment, the remaining miners would grind through the rest of that period at roughly 20 minutes per block until the next retarget caught up. Every block header records the target it was mined under, in its nBits field, as described in What's Inside a Bitcoin Block.
What This Means for You
- The schedule survives shocks. Hashpower can collapse or surge and new issuance stays on its long-run timeline, within a few percent.
- Hashrate headlines are not alarms. A big drop in mining means slower blocks for a few days, then an adjustment. The 2021 exodus is the proof.
- Ten minutes is an average. Some confirmations take a minute, some take an hour. If you are waiting on your first purchase to arrive, the first-buy guide covers what to expect.
- Difficulty is public. Any block explorer shows the current difficulty and an estimate for the next change, so you can watch the mechanism work in real time.
No central bank sets this dial. Two weeks of arithmetic does.