Technology
Mining difficulty: why ten minutes is not a timetable
Bitcoin aims for an average spacing of blocks of around ten minutes. The difficulty of the search adjusts in periods of 2,016 blocks, but it sets no fixed deadline for an individual block.

The illustration contains Czech text and has not been localised.
When you are waiting for a payment to be confirmed, the phrase “a new block every ten minutes” can sound like a countdown. Ten minutes, however, is a target average, not a deadline. Difficulty, that is, how demanding the search for a new block is, adjusts after a set number of blocks. When exactly the next block will be found cannot be predicted.
What is being searched for in mining
Miners vary the data in a candidate block's header. The hash of the header, a number calculated from its data, must not be higher than a set limit, called the target. The lower the limit, the fewer results qualify and the more attempts are needed on average. The principle is described in the proof-of-work documentation.
Difficulty expresses how strict the target is compared with a reference value. Success means finding a hash that does not exceed the target. Hashrate, by contrast, is the number of hashing attempts per unit of time, in other words the speed of trying. How difficulty is calculated from the target is shown by the GetDifficulty function in Bitcoin Core 29.0.
At the same difficulty, more attempts per second raise the chance of finding a block sooner, but they cannot guarantee when the next one will come.
The adjustment is governed by blocks
The main-network parameters in the Bitcoin Core reference code set the target block spacing at 600 seconds and the target period at 14 days. The quotient of the two values gives 2,016 blocks. After every 2,016 blocks, the proof-of-work requirement for the next period is recalculated.
Fourteen days is therefore not a fixed deadline in the calendar. When blocks are added faster, the end of the period arrives sooner; with slower searching, later. The formula for the length of the interval is contained in the consensus parameters.
In the recalculation, the timestamps of the first and last block of the elapsed period are compared. There are 2,016 blocks, but only 2,015 gaps between their timestamps. It is not an exact measurement of the time of each attempt by miners, nor of their electricity consumption.
A simplified model of a faster period
Take a purely illustrative situation: the length of the period entering the calculation is seven days instead of the target fourteen. The ratio is 7 / 14 = 0.5. In such a model the new limit falls to approximately half, so the difficulty roughly doubles.
At 28 days the ratio is 28 / 14 = 2. The limit roughly doubles and the difficulty falls to roughly half. In both cases we assume that the maximum permitted limit does not apply, and we neglect the rounding of the notation of the limit. These are not observed periods of the main network, nor a forecast of the next adjustment.
The implementation restricts the length of the period used in one recalculation to between a quarter and four times the target, that is, to 3.5 to 56 days. The exact procedure and the upper bound of the limit can be found in the CalculateNextWorkRequired function in the difficulty calculation code. We describe the main network; test networks also have special rules.
Difficulty and the halving of the subsidy are different events
A difficulty adjustment changes the condition for finding a block. The halving changes the block subsidy, that is, the quantity of new bitcoins that may be created at a given block height. In the main-network parameters used, the halving occurs after 210,000 blocks, not after 2,016. The calculation of the subsidy is in the GetBlockSubsidy function in Bitcoin Core.
The rules for difficulty and halving alone tell you neither the bitcoin price nor the return from mining.
What this means while waiting for a payment
The ten-minute average is no deadline for your transaction. Besides the variable time it takes to find a block, it also matters whether the particular transaction gets into the block. This second part is discussed in the article on capacity and fees.
Whether a payment has arrived is something you check by the status of the right transaction and its confirmations. Waiting in itself is no proof that you need to pay again. The exact moment of receipt of a particular payment cannot be calculated from the difficulty rule.