What is Bitcoin Mining Difficulty and How is Bitcoin Mining Difficulty Calculated?
Bitcoin's mining difficulty is a self-correcting metric which ensures that Bitcoin's block times and Bitcoin's supply issuance remain on a consistent schedule.
Bitcoin’s difficulty is the measure of how hard it is to find a block while mining Bitcoin’s blockchain. Bitcoin's difficulty is a bespoke scoring system that is measured on a scale of 1 to (theoretically) infinity (for e.g., Bitcoin began at a difficulty of 1, but at the time of writing, Bitcoin's difficulty is 27.55 trillion).
To be more specific, Bitcoin's difficulty is a measure of how difficult it is for a miner to produce a valid hash below a given 256-bit target number determined by the Bitcoin network. When a hash is equal to or below this target number, a miner successfully finds and mines a new block; therefore, the lower the target, the more difficult it is to mine a block.
Bitcoin's difficulty adjustment ensures that the network stays on track with its pre-determined supply schedule. The Bitcoin network automatically adjusts its difficulty level every 2016 blocks, a roughly 2 week period which miners refer to as a difficulty epoch. As one difficulty epoch ends, a new one begins with a difficulty adjustment to ensure that miners mine new blocks as close to a 10 minute average as possible.
When miners discover blocks faster than the 10 minute targeted average during an epoch, the Bitcoin network will increase difficulty (meaning the target number decreases in value); the inverse is true if blocks are discovered at a slower average rate than 10 minutes, and the network decreases difficulty (thus increasing the value of the target number).
As seen below, Bitcoin’s mining difficulty is an essential aspect of bitcoin which confirms that both Bitcoin’s supply issuance and block confirmation intervals remain consistent over time.
Bitcoin Mining Difficulty Calculation
Bitcoiners can easily independently determine Bitcoin's current mining difficulty using a bitcoin node. The formula for Bitcoin's difficulty is as follows:
Difficulty Level = Difficulty Target / Current Target
- Difficulty Target: Bitcoin's highest possible difficulty target (i.e., the difficulty target that Bitcoin featured when it first launched, with a difficulty of 1)
- Current Target: The 256-bit target number determined by the network.
At the beginning of every difficulty epoch, the Bitcoin network recalculates the Current Target hash. It does so by summing up the total number of minutes that miners took to mine the last 2,016 blocks, and it divides this number by the protocol's desired goal of 20,160 minutes (2,016 blocks x 10 minutes). The ratio is then multiplied by the current difficulty level to produce the new difficulty level.
It is also worth mentioning that, to prevent dramatic changes in network difficulty, the Bitcoin network will only ever alter difficulty by a factor of 4. In other words, whenever a difficulty adjustment occurs, the Bitcoin network can only increase difficulty+300% or decrease it -75%.
How Bitcoin’s Difficulty Affects Hashprice and Bitcoin Mining Profitability
Bitcoin’s price and bitcoins mining difficulty affect hashprice (Bitcoin mining profitability) in the short-run, and the block subsidy halvings affect hashprice in the long-run. For the majority of the time, Bitcoin’s price and Bitcoin’s mining difficulty are the main factors that influence hashprice.
Hashprice and mining difficulty are negatively correlated. An increase in Bitcoin’s difficulty reduces hashprice whereas a decrease in Bitcoin’s difficulty increases hashprice, because miners have to produce less work to discover blocks over the course of a new epoch with a lower difficulty.
This correlation is always true for bitcoin-denominated hashprice (as shown below), but is more nuanced when examining USD-denominated hashprice. USD-hashprice is directly affected by both Bitcoin’s difficulty and by Bitcoin’s price.
Hashrate Index Newsletter
Join the newsletter to receive the latest updates in your inbox.