DeFi Intel

What is Mining Difficulty?

Plain-English explainer · Updated 2026-07-02 · By DeFi Intel

How it works

Mining difficulty is expressed as a target value: miners must find a block hash that is numerically less than the target. The actual difficulty is inversely proportional to the target: difficulty = difficulty_1_target / current_target, where difficulty_1_target is the maximum target for a difficulty of 1. In Bitcoin, the network recalculates difficulty every 2,016 blocks (roughly two weeks) by comparing the actual time taken to mine those blocks against the expected two-week period. If blocks came faster than 10 minutes on average, difficulty increases; if slower, it decreases. This adjustment mechanism is encoded in the Bitcoin Core software and is enforced by every full node.

The primary purpose of difficulty adjustment is to keep block production stable despite fluctuations in the total hash rate. When more miners join or hardware improves, the hash rate rises; without adjustment, blocks would appear more frequently, speeding up coin issuance and potentially destabilizing security. Conversely, if miners leave, blocks would slow down. By raising or lowering the difficulty, the network ensures that new blocks are created at the intended average interval—10 minutes for Bitcoin, 2.5 minutes for Litecoin, etc. This constant cadence is fundamental for transaction confirmation times and the predictable supply schedule of the cryptocurrency.

Difficulty is stored in the block header as a compact 'bits' field, which nodes decode to the actual target. Each node independently validates that the block hash meets the target and that the difficulty adjustment follows the consensus rules. Ethereum, before its transition to proof-of-stake, used a different algorithm: difficulty adjusted every block (not every epoch) based on the time of the parent block, and included a 'difficulty bomb' to exponentially increase difficulty over time, eventually forcing the Merge. While the core concept remains the same, implementation details vary across proof-of-work blockchains, but all aim to stabilize block time and secure the network against adversarial hash power.

Why it matters

Mining difficulty is essential for the security and economic stability of proof-of-work blockchains. By maintaining a consistent block time, it ensures that the coin supply inflates according to the predetermined schedule, preventing both excessive inflation and excessive deflation. It also makes the network resilient to 51% attacks: an attacker would need to command a large fraction of the total hash rate for an extended period, which becomes exponentially more expensive as difficulty rises. Difficulty adjustment is the self-correcting feedback loop that allows permissionless mining to function without a central coordinator, making it a cornerstone of decentralized consensus.

Real-world examples

Bitcoin adjusts mining difficulty every 2,016 blocks to target a 10-minute block time, using a simple moving average algorithm. Litecoin follows a similar model with a 2.5-minute target and adjusts every 2,016 blocks as well. Ethereum, before its transition to proof-of-stake, adjusted difficulty every block and incorporated a 'difficulty bomb' to gradually increase mining difficulty and eventually force the network to switch consensus. Other prominent PoW chains like Monero and Dogecoin also employ difficulty adjustment tailored to their specific block time goals.

FAQ

How does mining difficulty affect block time?

Mining difficulty adjusts so that block times remain consistent despite changes in total network hash rate. If blocks come too quickly, difficulty increases; if too slowly, it decreases, keeping the average block interval near the target.

Does mining difficulty change on every block?

Not on every block. For example, Bitcoin adjusts every 2,016 blocks, while before the Merge, Ethereum adjusted on every block. The frequency depends on the blockchain's consensus rules.

What happens to mining difficulty if many miners leave the network?

It decreases to make it easier to find blocks, restoring the target block time. This prevents the network from stalling and ensures that new transactions can still be confirmed even with less total hash power.

Related terms

Go deeper

Browse the complete crypto glossary to explore related terms and concepts.

Browse Glossary

Entities mentioned