← GlossaryMining
What Is a Difficulty Target? How nBits Sets Mining Difficulty
The difficulty target is the threshold a block's hash must be at or below to be valid; a lower target means fewer valid hashes and so higher difficulty, and the header stores it in a compact form called nBits.
Key takeaways
- A block is valid only if its hash, read as a number, is not above the target.
- A lower target is harder to hit, so a lower target means higher difficulty.
- The target is stored in the header as a compact 4-byte field called nBits.
- Bitcoin and Litecoin retarget every 2,016 blocks, while Dogecoin's code uses a one-minute adjustment window.
Target and difficulty
Proof of work asks for a hash that, read as a very large number, is below a target. The target is the dial that controls how hard that is: the lower it is, the smaller the fraction of hashes that qualify, so the more attempts are needed on average. Difficulty is simply a convenient way of reporting this as a multiple of the easiest allowed target.
How it is stored
Block headers carry the target in a compact form called nBits. The Bitcoin developer reference documents it as an encoded value that nodes expand back into the full 256-bit target. Because the field sits in the header, every node can check that a block used the target the rules require at that height.
Keeping block times steady
Chains aim for a steady block time, so the target must move with hashrate. Bitcoin's target changes every 2,016 blocks, which is two weeks at 10 minutes a block. Litecoin's parameters set a retarget timespan of 3.5 days at a 2.5-minute spacing, which also works out to 2,016 blocks. Dogecoin's code sets a one-minute timespan after its DigiShield change, so it adjusts continuously rather than in long steps.
What it means for miners
When many new machines join, blocks arrive faster until the target tightens, and your share of rewards falls. When hashrate leaves, the target eases. Because retargeting is delayed on some chains, profitability estimates are a snapshot: the difficulty you used last month may not apply next month.
Example
If the last 2,016 blocks of a Bitcoin-style chain took one week instead of two, the next target is cut roughly in half, so about twice as many attempts are needed per block and the pace returns to the target.
Put it into practice
Model difficulty changes before you commit
Difficulty moves your income over time. The mining calculator uses current network difficulty and hashrate, so you can check Litecoin and Dogecoin results with today's numbers.
Open the mining calculator Get Scrypt for AndroidFrequently asked questions
Is difficulty the same as target?
They describe the same thing from opposite sides. Difficulty rises when the target falls.
Why do some coins adjust every block?
Faster retargeting reacts to hashrate changes sooner and limits long stretches of slow or fast blocks.
Can a miner choose the target?
No. The rules fix it from the chain's recent history, and blocks using a different target are rejected.
Written by the Scrypt Wallet team · Updated 2026-10-02. General education, not financial, tax or legal advice.