Skip to article
Degrees of SatoshiFollow the connections.
Degrees of Satoshi/ Encyclopedia

Encyclopedia How the network works · Entry 388

The difficulty adjustment: Bitcoin’s two-week thermostat, explained

Theme
How the network works
Sources
7 cited records
Reading time
About 7 minutes
Automated verification
Substantive update
In this article

At a glance

Key facts

Key facts for The difficulty adjustment: Bitcoin’s two-week thermostat, explained
FactDetailSource
Retarget intervalEvery 2,016 blocks[1][4]
Target timespan1,209,600 seconds, which is 14 days, for 2,016 blocks at 10 minutes each[2][4]
Maximum changeAt most 4x harder or 4x easier per adjustment: an increase of up to 300% or a decrease of up to 75%[1][4]
Starting difficulty1, at block 0, the easiest target the main network allows[6][2]
Known quirkThe retarget measures 2,015 block intervals, not 2,016, an off-by-one in the original code[4]
Dated 2021 exampleThe 3 July 2021 adjustment cut difficulty by about 28%, reported at the time as the largest decrease[7]
Where the rule livesBitcoin Core, src/pow.cpp, in the function CalculateNextWorkRequired[1]
01

Difficulty is the size of the target miners are aiming at

Mining is a guessing game. A miner assembles a block, runs its header through a hash function, and checks whether the result is at or below a number called the target. Almost every try fails, so the miner changes a field called the nonce and tries again, billions of times a second. The Bitcoin Wiki defines difficulty as a measure of how hard it is to find a hash at or below a given target: the smaller the target, the harder the game. Difficulty is expressed relative to the easiest target the network allows, so block 0, mined at that easiest setting, has a difficulty of exactly 1.

Satoshi expected hardware to get faster and interest to come and go. The white paper says the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour, and that if blocks are generated too fast, the difficulty increases. Without that rule, every improvement in mining hardware would make blocks arrive faster, the supply schedule would run ahead of plan, and the network would have less time to spread each block around before the next one appeared. Our explainer on proof of work covers the guessing game itself.

02

Every 2,016 blocks, the network checks its watch

The numbers come from two settings in Bitcoin Core’s chain parameters. The target spacing is 10 minutes, and the target timespan is 14 days. Two weeks at one block every ten minutes is 2,016 blocks, and that is the adjustment interval. The code in pow.cpp checks whether the next block’s height is a multiple of that interval; if it is not, the target stays exactly what it was.

At the boundary, the node reads the timestamps in the first and last block headers of the period just ended and subtracts one from the other. The developer documentation states the ideal value: 1,209,600 seconds. The new target is the old target multiplied by the actual timespan and divided by the ideal one. If the 2,016 blocks came in a week, the target halves and mining gets twice as hard. If they took four weeks, the target doubles and mining gets twice as easy. Every node does this arithmetic independently and gets the same answer, because it uses only data that is already in the chain.

There is a small, permanent quirk. The period is 2,016 blocks long, but the timestamps the code compares are those of the first and last blocks in the period, which are 2,015 intervals apart. The developer documentation calls it an off-by-one error in the original implementation that creates a slight skew. It cannot be fixed without changing a rule every node enforces, so it stays.

03

The 4x clamp keeps one wild fortnight from breaking the chain

Before the division, pow.cpp clamps the measured timespan. If it is less than a quarter of the ideal, it is set to a quarter; if it is more than four times the ideal, it is set to four times. In plain terms, difficulty can go up by at most 300% or down by at most 75% in a single step, and the developer documentation states the same limits in those words.

Why bother? The clamp limits how far any single measurement, honest or otherwise, can move the target. It also means a sudden collapse in mining power cannot be fixed in one go. If most miners vanished at once, blocks would slow to a crawl, and the next adjustment could only ease the target by a factor of four, so the recovery would take several periods, each of which would take longer than two weeks to complete. The clamp trades speed of recovery for protection against a wild swing.

There is one more guard. The target can never be set easier than a fixed ceiling called the proof-of-work limit, so difficulty never drops below 1 no matter how few miners remain. The main network has no exception to this; the chain parameters switch off a testing-network rule that allows minimum-difficulty blocks when the chain stalls.

04

The target adjusts after observed block timing

Difficulty is adjusted at scheduled block-height boundaries using the chain’s timing data. It reacts to past conditions rather than measuring every miner’s equipment directly.

If mining power changes sharply between adjustments, block intervals can differ from the ten-minute target. Even with unchanged power and difficulty, individual intervals vary. “About two weeks” describes the intended adjustment timescale, not an exact calendar schedule.

05

The biggest drop on record came after China’s mining ban

The clearest demonstration came in 2021. China, then home to a large share of the world’s mining, ordered mines shut, and CoinDesk reported that the crackdown cut the network’s total hash power by more than half from its record earlier that year. Blocks slowed. The adjustment on 3 July 2021 cut difficulty by 28%, reported at the time as the largest downward move in Bitcoin’s history, and CoinDesk noted that miners still running could expect their profitability to double as a result.

Nothing about the event required a decision from anyone. The rule did what the white paper described: measure, scale, wait, repeat. The story of the ban itself is in our article on China’s 2021 mining ban, and Satoshi’s early notes on difficulty and hardware are collected in the proof-of-work and difficulty correspondence hub. For how the adjustment fits with the rest of block building, see the how the blockchain works dossier.

Direct answers

Questions people ask

How often does Bitcoin difficulty adjust?

Every 2,016 blocks. At ten minutes a block that is about two weeks, but the trigger is the block count, not the calendar, so a fast or slow period shifts the date. The code checks whether the next block height is a multiple of 2,016 and leaves the target alone otherwise.

What is the maximum difficulty change in one adjustment?

A factor of four either way. Bitcoin Core clamps the measured time to between a quarter and four times the two-week ideal, so difficulty can rise by at most 300% or fall by at most 75% in a single retarget.

What happens to difficulty if miners leave?

With less hash power and an unchanged target, blocks are expected to arrive more slowly. A sufficiently slow completed period generally raises the permitted target at the next retarget, which lowers difficulty, subject to the adjustment cap and easiest-target limit. Individual intervals still vary.

Does difficulty change how many bitcoins are created?

No. The reward per block is fixed by block height, halving every 210,000 blocks, and difficulty only changes how long each block takes to find. Difficulty keeps the pace near ten minutes so the supply schedule plays out over roughly the intended years.

Why does the retarget use 2,015 blocks instead of 2,016?

Because the code measures the time between the first and last block of a 2,016-block period, which spans 2,015 gaps. The developer documentation describes this as an off-by-one error in the original implementation that causes a slight skew, and changing it would require every node to adopt a new rule.

Inspect the evidence

The answer and key facts have stable claim links. These records retain the scope and qualification when reused.

On Bitcoin mainnet, the mining target is recalculated every 2,016 blocks using the previous period’s recorded timing. The intended timespan is about two weeks, with each adjustment bounded to a factor of four and by the easiest permitted target. The rule responds to past block timing; it does not guarantee ten-minute intervals or a fixed calendar schedule.

Scope: Bitcoin. Verification: verified · 2026-10-02T18:26:58.075Z.

Link to this claim
Retarget interval: Every 2,016 blocks

Scope: Bitcoin. Verification: verified · 2026-10-02T18:26:58.075Z.

Link to this claim
Target timespan: 1,209,600 seconds, which is 14 days, for 2,016 blocks at 10 minutes each

Scope: Bitcoin. Verification: verified · 2026-10-02T18:26:58.075Z.

Link to this claim
Maximum change: At most 4x harder or 4x easier per adjustment: an increase of up to 300% or a decrease of up to 75%

Scope: Bitcoin. Verification: verified · 2026-10-02T18:26:58.075Z.

Link to this claim
Starting difficulty: 1, at block 0, the easiest target the main network allows

Scope: Bitcoin. Verification: verified · 2026-10-02T18:26:58.075Z.

Link to this claim
Known quirk: The retarget measures 2,015 block intervals, not 2,016, an off-by-one in the original code

Scope: Bitcoin. Verification: verified · 2026-10-02T18:26:58.075Z.

Link to this claim
Dated 2021 example: The 3 July 2021 adjustment cut difficulty by about 28%, reported at the time as the largest decrease

Scope: Bitcoin. Verification: verified · 2026-10-02T18:26:58.075Z.

Link to this claim
Where the rule lives: Bitcoin Core, src/pow.cpp, in the function CalculateNextWorkRequired

Scope: Bitcoin. Verification: verified · 2026-10-02T18:26:58.075Z.

Link to this claim
Revision history
  1. — Initial Bitcoin encyclopedia entry at this permanent URL.
  2. — Corrected scope or wording: hash below a given target Corrected scope or wording: result is below a number called the target Corrected key fact: Dated 2021 example Corrected scope or wording: the largest downward move in Bitcoin’s history Corrected scope or wording: Hash rate](/encyclopedia/bitcoin-hash-rate/) is the thing being measured; difficulty
  3. — Added reusable claims, explicit source locators, and matching Markdown and JSON. This publishing change does not itself establish factual verification.
  4. — Expanded explanation: The target adjusts after observed block timing. Worked examples are illustrative; source checks and independent verification are recorded separately.

Source register

Sources and references

Retrieval dates and locators are recorded individually.
  1. src/pow.cpp (GetNextWorkRequired and CalculateNextWorkRequired)Bitcoin Core, GitHub

    The consensus code: the check that the next height is a multiple of the adjustment interval, the timespan clamp to between a quarter and four times the target, the multiply-and-divide retarget, and the proof-of-work limit cap.

    Locator: The consensus code: the check that the next height is a multiple of the adjustment interval, the timespan clamp to between a quarter and four times the target, the multiply-and-divide retarget, and the proof-of-work limit cap. · Version / scope: 69142eacd1374925cc9e4ea736c21fcec16307d0 · Retrieved: 2026-10-02T15:04:17.051683+00:00Open source
  2. src/kernel/chainparams.cpp (main network parameters)Bitcoin Core, GitHub

    Sets the main network’s target timespan to 14 days, target spacing to 10 minutes, halving interval to 210,000 blocks, disables minimum-difficulty blocks, and creates the genesis block with bits 0x1d00ffff.

    Locator: Sets the main network’s target timespan to 14 days, target spacing to 10 minutes, halving interval to 210,000 blocks, disables minimum-difficulty blocks, and creates the genesis block with bits 0x1d00ffff. · Version / scope: 69142eacd1374925cc9e4ea736c21fcec16307d0 · Retrieved: 2026-10-02T15:04:11.761623+00:00Open source
  3. DifficultyBitcoin Wiki

    Community reference defining difficulty as a measure of how hard it is to find a hash below a target, the 2,016-block interval, and the hash rate approximation of difficulty times 2^32 divided by 600, about 7 MH/s at difficulty 1.

    Locator: Community reference defining difficulty as a measure of how hard it is to find a hash below a target, the 2,016-block interval, and the hash rate approximation of difficulty times 2^32 divided by 600, about 7 MH/s at difficulty 1. · Retrieved: 2026-10-02T14:48:46.409953+00:00Open source
  4. Bitcoin Developer Guide: Block Chain (Proof of Work)Bitcoin Project, developer.bitcoin.org

    States the 2,016-block interval, the 1,209,600-second ideal, the limits of a 300% increase or 75% decrease, and the off-by-one that uses timestamps from 2,015 blocks.

    Locator: States the 2,016-block interval, the 1,209,600-second ideal, the limits of a 300% increase or 75% decrease, and the off-by-one that uses timestamps from 2,015 blocks. · Retrieved: 2026-10-02T14:48:36.834850+00:00Open source
  5. Bitcoin: A Peer-to-Peer Electronic Cash SystemSatoshi Nakamoto · 2008bitcoin.org

    Section 4 states that difficulty is determined by a moving average targeting an average number of blocks per hour, and increases if blocks are generated too fast.

    Locator: Section 4 states that difficulty is determined by a moving average targeting an average number of blocks per hour, and increases if blocks are generated too fast. · Retrieved: 2026-10-02T15:04:11.761440+00:00Open source
  6. Block 0 (machine-readable block record)Blockstream explorer API

    Reports block 0 with difficulty 1.0, bits 486604799, timestamp 1231006505 and nonce 2083236893.

    Locator: Reports block 0 with difficulty 1.0, bits 486604799, timestamp 1231006505 and nonce 2083236893. · Retrieved: 2026-10-02T14:48:47.657357+00:00Open source
  7. Bitcoin Miner Profitability Could Double After Record Drop in Network DifficultyFrances Yue · 2021-07-06CoinDesk (reporting)

    Reports the 28% downward difficulty adjustment of 3 July 2021 and that China’s crackdown cut total hash power by more than half from record levels earlier in the year.

    Locator: Reports the 28% downward difficulty adjustment of 3 July 2021 and that China’s crackdown cut total hash power by more than half from record levels earlier in the year. · Retrieved: 2026-10-02T14:48:48.544241+00:00Open source
How this article was made

Research and drafting use AI assistance. A separate automated review checks claims against primary sources; no external expert or named human review is implied. Publication, substantive editing, source retrieval and verification are recorded separately. This version was independently checked by an automated reviewer on 2 October 2026.

Editorial method and corrections

Degrees of Satoshi editorial project. “The difficulty adjustment: Bitcoin’s two-week thermostat, explained.” Published 2026-09-23; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/bitcoin-difficulty-adjustment/