Home / Wiki / M / Mining Difficulty

Mining Difficulty

Cryptocurrency and Digital AssetsUpdated 05 Nov 2026

Mining difficulty is a number that expresses how hard it is to find a valid block on a blockchain secured by Proof of Work (PoW). A higher difficulty means miners must, on average, try more guesses before one of them produces a winning hash. The network raises or lowers it automatically so that new blocks keep arriving at a predictable rate however much computing power joins or leaves.

Difficulty is the counterweight to hashrate, the total guessing speed of all miners. On Bitcoin (BTC) the rule targets one block every ten minutes. Without it, faster machines would simply produce blocks faster and release new coins ahead of schedule, breaking the supply plan behind the halving.

01

Mining difficulty in plain terms

Think of a dice game where you win if you roll under a certain number. If the rule is "under 10 on a ten-sided die", almost every roll wins. If it becomes "under 2", you will roll many times before winning. Mining difficulty is the game organiser moving that bar.

Now imagine more and more players joining and rolling faster. To keep the prize being handed out at the same pace, say once every ten minutes, the organiser lowers the bar. If players leave, the bar goes back up. Nobody decides this by hand: the rule that moves the bar is written into the software every participant runs.

02

Target and difficulty

Under the hood, every proof-of-work network uses a target: a 256-bit number that a block's header hash must fall below. Miners vary the nonce and other fields, hash the header with SHA256 twice, and check the result. Difficulty is simply the target expressed as a friendlier ratio:

D=TmaxTD = \frac{T_{\text{max}}}{T}

Here DD is the difficulty, TmaxT_{\text{max}} is the easiest target Bitcoin allows (the target at difficulty 1, used for the genesis block), and TT is the current target. Halving the target doubles the difficulty. The target is stored compactly in each block header in a field called "bits", so any full node can check that a block meets it.

03

How Bitcoin retargets

Bitcoin recalculates difficulty every 2,016 blocks, roughly every two weeks. The software compares how long the last 2,016 blocks actually took with the intended 1,209,600 seconds (2,016 blocks × 600 seconds) and scales the difficulty accordingly:

Dnew=Dold×1,209,600tactualD_{\text{new}} = D_{\text{old}} \times \frac{1{,}209{,}600}{t_{\text{actual}}}
  • DnewD_{\text{new}} is the difficulty for the next 2,016 blocks.
  • DoldD_{\text{old}} is the difficulty for the period just ended.
  • tactualt_{\text{actual}} is the time, in seconds, that the period actually took, measured from block timestamps.

Worked example: suppose the last period took 12 days (1,036,800 seconds) because new machines came online. Then Dnew=Dold×1,209,600÷1,036,800≈Dold×1.167D_{\text{new}} = D_{\text{old}} \times 1{,}209{,}600 \div 1{,}036{,}800 \approx D_{\text{old}} \times 1.167, a rise of about 16.7%. A single adjustment is capped at a factor of four up or down, so a sudden collapse in hashrate cannot be corrected all at once. Each retarget happens at a known block height (a multiple of 2,016), which makes the next adjustment easy to forecast.

Other networks use different rules. Many newer proof-of-work chains, including Bitcoin Cash (BCH), which has done so since 2017, adjust every block using a rolling average, which reacts faster when miners move between chains that share an algorithm.

04

What difficulty means for miners

Difficulty links the network's security to a miner's income. When difficulty rises and the coin's price does not, each unit of hashpower earns less, so older, less efficient machines are switched off. Difficulty can also be used to estimate total network hashrate, because the expected number of hashes per block is D×232D \times 2^{32} on Bitcoin.

Miners plan around difficulty in several ways:

  • Upgrade cycles. Newer Application-Specific Integrated Circuit (ASIC) models that do more hashes per joule keep a miner profitable as difficulty climbs.
  • Pooling. Higher difficulty makes solo wins rarer, which is one reason almost all miners join a mining pool; pools also set a lower internal "share difficulty" to measure each member's work.
  • Halving events. When the block reward drops, some miners shut down, hashrate falls and the next retarget lowers difficulty, partly restoring margins for those who remain.
05

Difficulty and security

Because difficulty tracks hashrate, it is a rough gauge of how costly a 51% attack would be. A chain with low difficulty relative to the hashpower available for rent is easier to attack. Difficulty also underpins probabilistic finality: the "longest chain" rule actually picks the chain with the most cumulative work, which is the sum of the difficulty of every block in it. A few blocks mined with fake, low-difficulty headers cannot outweigh a chain built with real work, which protects against double spending.

Difficulty is a feature of crypto mining only. Networks running Proof of Stake (PoS) pick block producers from staked coins and have no equivalent puzzle.

Last updated 05 Nov 2026