How Bitcoin Mining Difficulty Adjustment Works

Bitcoin changes its mining target every 2,016 blocks. A worked example shows why a 20-day period implies roughly 30% lower difficulty—and why that adjustment does not guarantee restored security.

How Bitcoin Mining Difficulty Adjustment Works

Affiliate links: Bitcoin News may earn a commission when you buy through them, at no extra cost to you.

Bitcoin adjusts its proof-of-work target every 2,016 blocks using timestamps from the preceding period. The adjustment helps block timing adapt to changes in mining power, but a return toward the expected interval does not prove that the network’s earlier security conditions have returned.

How Bitcoin mining difficulty adjustment works

Miners repeatedly calculate hashes as they compete to produce a valid block. A block’s hash must be at or below the numerical target to satisfy Bitcoin’s proof-of-work requirement.[1] A lower target makes a valid hash harder to find; a higher target makes it easier. Difficulty expresses how hard that task is, while hashrate describes the rate at which miners perform hash calculations.[1]

If miners leave and total hashrate falls, blocks tend to take longer to find at the existing difficulty. If mining power rises and the measured period is shorter, the adjustment moves in the other direction.

Bitcoin compares the first and last block-header timestamps in the preceding 2,016-block period with a target span of 1,209,600 seconds, or two weeks.[1] An off-by-one detail means the timestamps cover 2,015 block intervals, rather than 2,016.[1] Two weeks is a target span, not a calendar deadline: the adjustment happens at a block boundary.

That distinction matters after a sudden drop in mining power. If hashrate halves at the start of a period and stays there, blocks would average roughly 20 minutes at the old difficulty, and the period would take roughly 28 days before difficulty could adjust.[1] Actual block times vary, so the wait would not be exact.

After an adjustment, the average interval tends toward 10 minutes if hashrate stays broadly stable. Individual block intervals remain random, and another change in mining power can move the average away from the target.

A 20-day retarget means roughly 30% lower difficulty

Suppose the preceding span is exactly 20 days. This is a calculated example, not an observed retarget:

  1. Compare the actual span with the target span.
  2. Use that comparison to calculate the new target.
  3. Express the target change in terms of difficulty.

The percentage change in difficulty is not the same as the percentage change in the target.

In one adjustment, difficulty can rise to at most four times its prior value or fall to at least one-quarter of it, subject to the proof-of-work limit and rounding.[2] The 20-day example is illustrative. It follows the Bitcoin Core implementation, rather than treating elapsed time as a direct percentage change in difficulty.

The 2021 mining shock shows adaptation, not a reset

Glassnode reported in July 2021 that Bitcoin difficulty had decreased by 27.94%.[3] It estimated that hashrate had fallen from a typical April–May peak around 180 exahashes per second (EH/s) to a local low of 65 EH/s on June 28.[3] Those were estimates based on block timing and difficulty, using a 24-hour moving average, not direct counts of mining machines.[3]

The higher target made blocks easier for the miners who remained. Glassnode argued that the adjustment improved their profitability, although its analysis involved assumptions about operating costs.[3] The episode shows the network adapting to a loss of mining power; the adjustment itself does not establish that the earlier mining fleet, its distribution or its security contribution returned.

Steadier block timing is not proof of restored security

An easier target can restore the expected pace of block production with less total mining power. That helps the network keep processing transactions, but it does not reveal how much power an attacker could acquire or control relative to honest miners. An actor controlling a majority of mining power could attempt to reorganize the chain, so both the amount of mining power and its distribution matter to the cost and feasibility of an attack.

There is a credible case for resilience. Researchers Rodney Garratt and Maarten van Oordt argue that the fixed costs of specialized mining hardware can make mining power less responsive to adverse price shocks, although the result can change if equipment can move between cryptocurrencies.[4] That mechanism can help keep miners on the network, alongside the adjustment that makes mining easier after a shock.

Sedlmeir, Zhou and Fridgen reach a less reassuring conclusion under different conditions: their theory and simulations show how halvings and delayed difficulty adjustment can produce fluctuations in hashrate and difficulty that lower the cost of a majority attack.[5] This is a modeled risk, not evidence that such an attack occurred. The studies examine different mechanisms, so the fixed-cost argument does not cancel the modeled risk or demonstrate that an earlier level of security has been restored.

Check the current target on a Bitcoin Core node

A synced Bitcoin Core node reports values at the time you run the command. This example uses Bitcoin Core 32; if you run a different version, check that version’s RPC documentation because its response fields may differ.[6]

  1. Run bitcoin-cli getmininginfo and inspect the response’s current difficulty field.[6] The getmininginfo RPC documentation describes the response.
  2. Find the next object. Its height, difficulty, target and nBits fields describe the next block; nBits is the compact representation of the target.[6]
  3. Divide the next-block height by 2,016. If it is evenly divisible, consult the next-block fields for that block. Otherwise, they describe the next block’s required value, not a forecast of a later adjustment.[2][6]

A later retarget depends on the timestamp span available at its own boundary. A next-block value outside that boundary cannot tell you what the later adjustment will be.

Sources

  • [1] Bitcoin Developer Guide, “Block Chain”: https://developer.bitcoin.org/devguide/block_chain.html?highlight=fork
  • [2] Bitcoin Core, “src/pow.cpp,” v32.1: https://github.com/bitcoin/bitcoin/blob/v32.1/src/pow.cpp
  • [6] Bitcoin Core, “getmininginfo,” version 32.0.0 RPC documentation: https://bitcoincore.org/en/doc/32.0.0/rpc/mining/getmininginfo/
  • [3] Glassnode, “The Week On-chain (Week 27, 2021)”: https://research.glassnode.com/the-week-on-chain-week-27-2021/
  • [5] Sedlmeir, Zhou and Fridgen, “Mining Instability and Security Implications of Bitcoin Halving”: https://orbilu.uni.lu/handle/10993/64697
  • [4] Garratt and van Oordt, “Why Fixed Costs Matter for Proof-of-Work–Based Cryptocurrencies,” Management Science: https://pubsonline.informs.org/doi/10.1287/mnsc.2023.4901
Was this useful?
No ratings yet4 views

References

  1. 1.Block Chain — Bitcoin — developer.bitcoin.org
  2. 2.bitcoin/src/pow.cpp at v32.1 · bitcoin/bitcoin · GitHub — github.com
  3. 3.The Week On-chain (Week 27, 2021) — research.glassnode.com
  4. 4.Why Fixed Costs Matter for Proof-of-Work–Based Cryptocurrencies | Management Science — pubsonline.informs.org
  5. 5.Mining Instability and Security Implications of Bitcoin Halving — orbilu.uni.lu
  6. 6.Bitcoin Core :: getmininginfo (32.0.0 RPC) — bitcoincore.org

Join the mailing list

Get new posts from Bitcoin News

Be the first to know when fresh articles are published.

No emails will be sent yet. Your signup is saved for future updates.

Comments (0)

Leave a comment

No comments yet. Be the first to comment!

Bitcoin News

Quick Links

© 2026 Bitcoin News. All rights reserved.

The information on this site is for informational and educational purposes only and does not constitute financial, investment, or trading advice. Cryptocurrency markets are volatile and carry significant risk; consult a licensed professional before making investment decisions. Bitcoin News is not responsible for losses resulting from reliance on this content.