BITCOIN MAINNETLive explorer status
PROOF OF WORK

The nonce

The nonce is a 4-byte number in the block header that miners change on every attempt. Learn why it runs out so fast and what miners change next.

A number to change

The The block header has a 4-byte field called the nonce ("number used once"). Miners set it to 0, hash the header, check the result, then try 1, 2, 3… Each change gives a completely different hash.

Changing only the nonce gives a completely new hash each timeGoal: a hash starting with 000 (about 1 in 4,096)nonce 0971e5fcbf078b8c1fc2c83e3a1a7b62c861b4336…✗nonce 1e3d25920d037750f5b90c95c89c476b28b1f6dae…✗nonce 22adbf72d3ff314ed42dc28318c3cf49411f89f25…✗nonce 3c4ae85b70d5e1f7bd753cf22c5c99684b9435a21…✗… 9,762 more tries …nonce 9,766000872f18c4604a0dda31cbadee1a914a9865cc6…✓
Changing only the nonce gives a completely new hash each time

When the nonce runs out

4 bytes allow about 4.3 billion values. Modern machines try that many in well under a second. When they run out, miners change something else:

Then the nonce search starts again.

EXAMPLE

The genesis block's nonce

Block 0 has nonce 2,083,236,893. Its target was the easiest Bitcoin has ever had, yet it still took about two billion tries.

How fast do miners use up the nonce?

Machine speedTime to try all 4.3 billion nonces
1 GH/s (an early GPU)about 4 seconds
100 TH/s (one modern ASIC)about 0.00004 seconds
800 EH/s (the whole network)far less than a nanosecond

That's why the extra nonce in the coinbase transaction is essential.

Is the winning nonce special?

No. It's just the number that happened to produce a low enough hash with that exact header. Change any other field and a different nonce would be needed.

Share this guide
Share on X ↗

Key takeaways

  • The nonce is a 4-byte header field miners change on each attempt.
  • Its 4.3 billion values run out quickly on modern hardware.
  • Miners then change the extra nonce, time or version bits.

Common questions

Is there a correct nonce?

Many nonces might work, and often none does for a given header. Miners just need any combination that produces a hash below the target.

Why is it called a nonce?

It's short for 'number used once', a common cryptography term.

What does nonce stand for?

Number used once.

Where can I see a block's nonce?

It's in the block header; MyBitcoinExplorer's API returns it in a block's full details.