Skip to content

Step 6 / The Bitcoin Machine

What miners actually calculate.

A miner tries different headers until a result meets the target.

A miner has prepared a block with payments such as Maya’s. Before proposing it to the network, the miner needs a header whose hash passes a number check.

The miner can keep trying different headers. More attempts mean more chances, but no attempt comes with a promised win. We will start with a tiny made-up number range to see why.

Try a header and check its number

The miner calculates the block header’s hash using a method called SHA-256, applied twice. It reads the result as a number. To pass, that number must be at or below the required target.

To try again, the miner changes an adjustable number in the header called a nonce. It can change other allowed candidate data when needed. The nonce is not a password and does not sign anyone’s payment. It helps produce another header to test.

Use a small fictional model. Suppose every attempt is like an independent, equally likely draw from 000 through 999. There are 1,000 possible results. If the target is 009, the ten results from 000 through 009 pass.

Ten winners out of 1,000 give a chance of 1% per attempt. A result of 726 fails. So does 308. A result of 007 passes because it is at or below 009. These are teaching numbers, not actual Bitcoin hashes.

The interactive example below uses another small set of numbers: a prepared sequence with a target of 10 or 5. It shows how the target changes which results pass. It is separate from the 000–999 probability model.

Teaching result 36 fails the target of 10. These are predetermined small numbers, not real mining odds.

Choose “Try another header” to move through the prepared results. Tighten the target to 5 and see which results stop passing; you can loosen it to 10 again. These examples show the check, not real mining odds.

An average does not choose the winning attempt

In the 000–999 model, one out of every hundred possible results passes the target of 009. Over many independent searches, the average wait is 100 attempts. A particular search could succeed much sooner or take longer.

Lower the target to 004. Now only five results, 000 through 004, pass. Five out of 1,000 is 0.5%, and the average wait rises to 200 attempts. Making the accepted range smaller makes finding a winner harder.

Neither average promises success on attempt 100 or 200. The next attempt gets its own chance. An average describes many searches, not a schedule for one search.

Real Bitcoin uses a much larger range: its result is 256 bits long. A miner’s number of attempts per second is called its hash rate. More attempts give it more chances. A miner doing about one tenth of all attempts gets roughly one tenth of expected discoveries under similar conditions, not a guaranteed win every tenth block.

Finding a qualifying header can take enormous work. Checking its hash against the target is quick. Checking the full block still takes the separate transaction and rule checks.

Adjust the target when the pace changes

Bitcoin aims for about ten minutes between blocks on average. If miners start making more attempts per second, blocks can arrive faster while the target stays the same.

On Bitcoin’s main network, the target is recalculated every 2,016 blocks. The calculation compares the time that passed with the intended time. The size of the change is limited, so the target cannot change without bounds.

Suppose the measured period took roughly half the intended time. The blocks arrived too quickly. The next target becomes roughly half as large, leaving fewer winning results and making the search roughly twice as hard.

The simplified calculation is: new target = old target × observed time ÷ intended time. In words, multiply the old target by how long the period actually took as a share of how long it was meant to take. Real calculations also apply bounds and rounding.

This adjustment changes the expected pace. It does not make the next block arrive on a ten-minute appointment, and it does not promise when Maya’s particular payment will be selected.

An idealized steady state targets ten minutes on average.

Choose “Double the hash rate” to see the expected interval fall in this model. Then choose “Apply a retarget” to restore the intended average through a harder condition. Reset the model to compare the stages; real adjustments use measured periods and limits.

A winning result still has to obey the reward rule

A miner can claim the permitted new bitcoin plus the fees from the transactions in its block. The new part is called the block subsidy. The fees are bitcoin that already exists.

For a fictional block, suppose the allowed subsidy is 3.125 BTC and the included fees add up to 0.2 BTC. Add the two parts: 3.125 + 0.2 = 3.325 BTC. That is the maximum total claim in this example.

A node rejects a block that claims more than allowed or spends money against the rules, even if the mining hash passes. We will return to the subsidy when we examine the halving.

The idea to keep

The target sets which results pass. Hash rate tells you how many attempts are made each second. Difficulty adjustments change the target to aim for the average block pace. None promises when a particular miner or payment will succeed.

Next, we will examine what the work protects and what it cannot tell us about attacks, electricity, or investment value.

Make it yours

A moment to try it.

Take your time. Explain the reason, not only the answer.

1 of 4

In a teaching model, a result passes if it is at or below the target. The target falls from 20 to 5. What changes?

Choose the best explanation

Use examples only—never enter recovery words, keys, account details, or real balances. Loading saved answers…

Loading your saved progress…

Sources & a little more detail

Illustrative stories and example numbers teach the mechanism. They are not forecasts or live market quotes.

Keep the conversation going

Lesson discussion

Share a question, a useful example, or something that clicked.

Loading discussion…