Bitcoin recalculates mining difficulty once every 2,016 blocks, which is about every two weeks. The software looks at how long those 2,016 blocks really took, divides by the 14 days they were supposed to take, and scales the proof-of-work target by that ratio. Blocks that arrived early make the next period harder; late blocks make it easier. The change can never exceed a factor of four in either direction.

The last adjustment happened at block 977,760 on November 27, 2026: difficulty rose 7.61%. Below, the rule is redone with that block’s real numbers, so you can follow every step and repeat it yourself.

The rule, as written in the code

Bitcoin Core’s proof-of-work code and its chain parameters set out the mainnet rule in four parts:

  • Interval. The target changes only when the next block’s height is a multiple of 2,016. Block 977,760 is 485 x 2,016, so it was a retarget block; the next one is 486 x 2,016 = 979,776.
  • Expected time. The chain parameters set the target timespan at 14 x 24 x 60 x 60 seconds (1,209,600) and the block spacing at 10 minutes. Multiply 2,016 blocks by 600 seconds and you get the same 1,209,600.
  • Measured time. The code takes the timestamp of the last block of the period and subtracts the timestamp of the block 2,015 heights earlier. That is 2,015 intervals between blocks, compared against an expectation built for 2,016. The difference is small and built into the rule.
  • Limits. The measured time is clamped to between a quarter and four times the expected time (3.5 to 56 days) before it is used. The new target is the old target multiplied by the measured time and divided by 1,209,600.

Difficulty is the inverse of the target: a smaller target means fewer valid block hashes, so more guesses are needed per block. The block header stores the target in a compact form called bits, an exponent byte followed by a three-byte mantissa. The target is the mantissa times 256 raised to the exponent minus 3.

Worked example: the November 27, 2026 retarget

All block data below comes from public block pages on mempool.space, an explorer. The blocks are 975,744, 977,759 and 977,760. The arithmetic is mine, read back against the header values.

Step Value
Period measured Blocks 975,744 to 977,759 (2,016 blocks)
Timestamp of block 975,744 1794632570 (Nov 14, 2026, 05:02 UTC)
Timestamp of block 977,759 1795756591 (Nov 27, 2026, 05:16 UTC)
Measured time 1,124,021 seconds = 13.01 days
Expected time 1,209,600 seconds = 14 days
Ratio 1,124,021 / 1,209,600 = 0.92925
Old bits (blocks of the period) 0x17021673, mantissa 0x021673 = 136,819
New bits (block 977,760) 0x1701f0a3, mantissa 0x01f0a3 = 127,139
New mantissa / old mantissa 127,139 / 136,819 = 0.92925
Difficulty before and after 134.82 trillion, then 145.09 trillion
Change 145.09 / 134.82 = 1.0761, so +7.61%

Multiplying the old target by 1,124,021 and dividing by 1,209,600 with integer arithmetic, then packing the result back into compact form, gives exactly 0x1701f0a3, the value in the header of block 977,760. Dividing the difficulty-1 target (0x1d00ffff) by each target reproduces the two difficulty figures above.

The sign is easy to remember. The blocks came in about a day early, so the target shrank by 7.1% and the difficulty grew by the inverse of that factor, 7.61%.

What the hash rate looks like

The Bitcoin Wiki gives the hash count behind a difficulty value as difficulty times 2^48 divided by 0xffff, which is close to difficulty times 2^32. At 134.82 trillion that is about 5.79 x 10^23 hash attempts per block. The 2,015 intervals averaged 558 seconds, so the network was computing roughly 1.04 x 10^21 hashes per second (about 1.04 zettahashes) over that period. This is an implied average from timestamps, not a measured figure, and miners’ clocks add noise.

The last seven adjustments

Retarget dates are the timestamps of the retarget blocks. The “days” column is the time since the previous retarget block, which is how long the period before the change took. Data: mempool.space’s difficulty-adjustments feed, read December 4, 2026.

Retarget block Date (UTC) Change Days the period took
977,760 Nov 27, 2026 +7.61% 13.01
975,744 Nov 14, 2026 -9.13% 15.41
973,728 Oct 29, 2026 +5.54% 13.28
971,712 Oct 16, 2026 +5.92% 13.22
969,696 Oct 3, 2026 -0.03% 14.01
967,680 Sep 19, 2026 +4.16% 13.44
965,664 Sep 5, 2026 +1.31% 13.82

Five of the seven periods finished early, one landed on schedule and one ran late, so difficulty mostly climbed. The 15.41-day period was the late one: it took 10% longer than planned, and the next change was almost exactly the inverse, -9.13%.

How far the clamp lets difficulty move

Time the 2,016 blocks took Share of 14 days Difficulty change
3.5 days (the floor) 25% x4.00
7 days 50% x2.00
10.5 days 75% x1.33
14 days 100% no change
21 days 150% x0.67
28 days 200% x0.50
56 days (the ceiling) 400% x0.25

This is why a sudden loss of mining power hurts for a while. If half the hash rate left and stayed away, blocks would take about 20 minutes, and the 2,016-block period would run close to 28 days before difficulty halved. Nothing on mainnet cuts the period short: the special minimum-difficulty exception in pow.cpp is enabled only for test networks.

Where the current period stands

On December 4, 2026 mempool.space showed the chain at block 978,717, about 47.5% of the way through the period that ends at block 979,776, with 1,059 blocks left. Blocks were averaging about 10.6 minutes this period, which puts the retarget around December 12, and its estimator pointed to a decrease near 5.6%. That figure is a projection: it assumes the rest of the period runs at the same pace, and it will move with every block.

Check it yourself

With a synced node, bitcoin-cli getblockhash 975744 gives a hash, and bitcoin-cli getblockheader <hash> returns the block’s time, bits and difficulty. Do the same for 977,759 and 977,760, then apply the ratio above. The same method works on any retarget block, as long as you take the first block of the period as 2,015 heights before the last. Two related pages: how block weight limits block size, and why confirmations depend on the 10-minute average.