Difficulty
Bitcoin difficulty adjustment sets how hard it is to find a block. It changes every 2,016 blocks so that a new block arrives about every 10 minutes.
By Dimitar Zurnov · Updated 4 Nov 2026
Adapted from Learn Me a Bitcoin by Greg Walker.
Bitcoin difficulty is a number that shows how hard it is to find a valid block. The network adjusts it every 2,016 blocks, which is about two weeks. The goal is one block about every 10 minutes, however many miners are working at the time.
Why does difficulty change?
More miners make more guesses each second, so blocks come faster. When miners leave, blocks slow down. Without any change, the time between blocks would drift away from 10 minutes. The adjustment pulls the average back toward that goal.
How does the difficulty control the time between blocks?
Picture a simple game. Someone sets a target number, and you draw a random number from 1 to 100 once a minute. You win if your number is below the target.
If the target is 50, about half of the numbers win. You win about every two minutes. If the target drops to 20, about one number in five wins. Now you win about every five minutes.
A lower target makes winning rarer. Bitcoin works the same way. Miners draw hashes instead of numbers from 1 to 100, and each hash must fall below the target.
How does difficulty relate to the target?
The target is a huge number, so Bitcoin shows the difficulty instead. Difficulty is the largest possible target divided by the current target. The largest target is the one used for the first block, which has difficulty 1.
target = max target / difficulty
A higher difficulty means a lower target, so fewer hashes count. Doubling the difficulty halves the target.
Block 100,000 had a difficulty of 14,484.16. Its target was about 14,484 times smaller than the target at difficulty 1. The maximum target is 0x00000000ffff, followed by 52 zeros. Block 100,000 had 0x000000000004864c, followed by 48 zeros. Dividing the first by the second gives its difficulty.
Targets and hashes are written in hexadecimal, a base-16 system, while difficulty is written in decimal. Both are the same kind of number. The target is stored in the block header in a compact form, in the bits field.
How does the adjustment work?
Every 2,016 blocks, each node runs the same calculation, and all the nodes reach the same answer. It works in four steps:
- Measure how long the last 2,016 blocks took, using the timestamps in their headers.
- Compare that with the expected time, which is 2,016 blocks at 10 minutes each, or 14 days.
- Divide the expected time by the actual time. The result is the factor.
- Multiply the current difficulty by the factor. Keep the factor between 0.25 and 4.
Here is an example. Suppose the last 2,016 blocks took 12 days. The factor is 14 divided by 12, about 1.17. The new difficulty is about 17% higher. If the blocks had taken 28 days, the factor would be 0.5, and the difficulty would halve.
The limit of 4 keeps one period from changing the difficulty too sharply. Developers should note one detail. Bitcoin Core measures from the first block of the window to the last, which is 2,015 gaps, not 2,016. The code is in pow.cpp.
Why 2,016 blocks?
2,016 blocks is two weeks at ten minutes each. The number is fixed in the software, so every node uses the same window and reaches the same result.
Where can I find the current difficulty?
Our mining page shows the current difficulty, how far the chain has come through its current period, and an estimate of the next change. A Bitcoin Core node can report the difficulty too. Run bitcoin-cli getdifficulty.
Why can blocks be slow for a while?
Difficulty only changes every two weeks, so it cannot react to a sudden shift right away. If many miners switch off together, blocks slow down until the next change. They can take longer than 10 minutes for days. A sudden jump in hashing power has the opposite effect, and blocks come faster for a time.
If your own transaction is waiting for its block, the confirmation page explains what to expect.
What should you read next?
Next, read transactions. It explains what the transactions inside a block do, and how coins move from one owner to another.
In this section: Beginners
Something look wrong? Tell us