← Mining difficulty

Version 1

Nov 28, 2026. Compare with the current version · Version history

Mining difficulty is the number that sets how hard it is for a Bitcoin miner to find a valid block; the network recalculates it every 2,016 blocks so that blocks keep arriving about ten minutes apart, whatever the total mining power.[3][5]

What difficulty measures

Bitcoin's proof of work (see Proof of work) asks miners to scan for a value that, when the block is hashed with SHA-256, gives a hash that falls below a threshold. The whitepaper describes it as a hash that "begins with a number of zero bits", where the average work needed grows exponentially with the number of zero bits and any node can check the result with a single hash.[1] The threshold is called the target: the lower the target, the fewer hashes qualify and the more attempts a miner needs on average. A block must hash to a value that does not exceed the target the consensus rules expect.[5]

Difficulty is the same quantity expressed the other way round. The Bitcoin Wiki defines it as the "difficulty_1_target" divided by the current target, where difficulty 1 traditionally stands for a hash whose leading 32 bits are zero.[6] Bitcoin Core measures the work a block represents as 2^256 divided by (target + 1), so a lower target means more expected work.[4] The genesis block, with a timestamp of 1231006505 (3 January 2009, 18:15 UTC), carries the compact target encoding 0x1d00ffff.[3] Difficulty was 1 at the genesis block, according to the block-by-block record kept by the mempool.space service.[7]

The same wiki page gives a rule of thumb for turning difficulty into an estimate of the network's total hash rate: difficulty × 2^32 ÷ 600, where 600 is the target number of seconds per block.[6] It is an estimate, not a measurement, because the network's real hash rate is never observed directly.

How the adjustment works

Satoshi Nakamoto's whitepaper says the difficulty "is determined by a moving average targeting an average number of blocks per hour", and that if blocks are produced too fast, the difficulty increases.[1] The rule actually implemented in Bitcoin Core is simpler than a moving average. The mainnet parameters set the target spacing at 10 × 60 seconds and the target timespan at 14 × 24 × 60 × 60 seconds, two weeks.[3] Two weeks is 1,209,600 seconds, which is 2,016 blocks of 600 seconds each.[5]

Difficulty changes only when the next block's height is a multiple of 2,016; every other block simply inherits its parent's target.[2] At such a boundary, the software measures how many seconds passed between the first and last block of the period, and scales the target in proportion: new target = old target × actual timespan ÷ target timespan.[2] If the period ran long, the target rises and mining gets easier; if it ran short, the target falls and mining gets harder.[2]

Two limits apply. The measured timespan is clamped to between one quarter and four times the target timespan, so a single adjustment can raise difficulty by at most a factor of four, or cut it to at most a quarter of its former level (the developer guide describes this as an increase of up to 300% or a decrease of up to 75%).[2][5] The new target also may not exceed the proof-of-work limit, the easiest target the network allows, which for mainnet begins with 32 zero bits.[2][3]

The developer guide records a known quirk: an off-by-one error in the original implementation means the timestamps used cover 2,015 block intervals, not 2,016, which produces a slight skew.[5] The code reflects this, since it counts back 2,015 blocks from the last block of the period to find the first.[2]

Test networks can relax the rule. On a network that allows minimum-difficulty blocks, a block that arrives more than twice the target spacing after its parent (more than 20 minutes) may use the minimum difficulty.[2]

Difficulty in practice

The adjustment record shows how the rule has played out. The first change came at height 32,256, in a block timestamped 30 December 2009, and took difficulty to about 1.18.[7] As of 27 November 2026, the most recent adjustment took place at height 977,760, in a block with timestamp 05:17 UTC, and set difficulty at about 145.09 trillion (145,088,938,867,954.3), up 7.6% from the previous period's 134.82 trillion.[7]

Using the rule of thumb above, a difficulty of 145.09 trillion corresponds to roughly 145.09 × 10^12 × 2^32 ÷ 600 ≈ 1.04 × 10^21 hashes per second, or about 1,039 exahashes per second.[6][7] That figure is an estimate derived from the formula, not a reported measurement.

In the record kept by mempool.space, the largest single decrease was at height 689,472, in a block timestamped 3 July 2021, when difficulty fell by about 27.9% (to a ratio of 0.7206 of the previous level). The largest increase, a factor of 4, came at height 68,544, in a block timestamped 16 July 2010, which is exactly the upper clamp described above.[2][7]

See also Bitcoin halving and Bitcoin.

Sources

  1. Satoshi Nakamoto, "Bitcoin: A Peer-to-Peer Electronic Cash System", October 2008, section 4 "Proof-of-Work": bitcoin.org/bitcoin.pdf
  2. Bitcoin Core, src/pow.cpp (functions GetNextWorkRequired and CalculateNextWorkRequired), read from the master branch on 28 November 2026: github.com/bitcoin/bitcoin/blob/master/src/pow.cpp
  3. Bitcoin Core, src/kernel/chainparams.cpp (mainnet parameters and genesis block), read from the master branch on 28 November 2026: github.com/bitcoin/bitcoin/blob/master/src/kernel/chainparams.cpp
  4. Bitcoin Core, src/chain.cpp (function GetBitsProof), read from the master branch on 28 November 2026: github.com/bitcoin/bitcoin/blob/master/src/chain.cpp
  5. Bitcoin Project, "Block Chain", Bitcoin Developer Guide: developer.bitcoin.org/devguide/block_chain.html
  6. Bitcoin Wiki, "Difficulty", read 28 November 2026: en.bitcoin.it/wiki/Difficulty
  7. mempool.space, difficulty adjustment history API (/api/v1/mining/difficulty-adjustments) and difficulty adjustment endpoint, retrieved 28 November 2026: mempool.space/api/v1/mining/difficulty-adjustments