Computing, IT, Networking & Security Crypto Mining & Blockchain Costs Bitcoin proof-of-work difficulty, 2016-block retarget

Mining Difficulty and Expected Block Time Calculator

Difficulty is a statement about work: at difficulty D, a valid block requires about D × 232 hashes on average. Divide that by your hashrate and you have the expected time to find one; divide it by the network's target block interval and you have the network's implied hashrate. This calculator does both, then adds the numbers solo miners most often get wrong — the probability of finding a block within a chosen window, the median time as opposed to the mean, and your actual share of the network.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Network difficultyRead the current value from a block explorer or from the getdifficulty RPC. It changes every 2,016 blocks on Bitcoin.100 D
Your hashrateSustained hashrate of your rig or pool, not the peak figure on the box.100 H/s
Target block interval600 seconds for Bitcoin. Use the protocol's own target if you are modelling another chain that shares this difficulty definition.600 s
Probability windowHow long you want the odds computed over — 24 hours for a daily figure, 8,766 for a year.24 h
Block reward3.125 BTC since the April 2024 halving, before transaction fees. It halves again at block 1,050,000.3.125 BTC

It returns

  • Expected time to find a block — The mean of an exponential distribution: D × 2³² ÷ hashrate, converted to days.
  • Median time to find a block — ln 2 × the mean, or about 69.3% of it. Half of all attempts succeed sooner than this.
  • Implied network hashrate — D × 2³² ÷ target block interval, in exahashes per second.
  • Your share of the network
  • Chance of at least one block in the window — 1 − e^(−t/mean). Never reaches 100%, however long the window.
  • Expected blocks per day
  • Expected coins per day — Blocks per day times the block subsidy. Transaction fees are not included.

The formula

E[t]=D232H
tmed=ln2E[t]
P=1et/E[t]

In plain text: E[t] = D · 2³² / H; H_network = D · 2³² / T; P(block in t) = 1 − e^(−t / E[t])

  • DNetwork difficulty (dimensionless)
  • HYour hashrate (hashes/s)
  • TProtocol target block interval — 600 s for Bitcoin (s)
  • E[t]Mean time to find one block (s)
  • 2³²Expected hashes per unit of difficulty, 4,294,967,296 (hashes)

Difficulty 1 corresponds to a target of 0xffff·2²⁰⁸, so the expected hashes per block is exactly D·2⁴⁸/0xffff = D·4,295,032,833. The conventional D·2³² is smaller by about 0.0015%, which is negligible next to the variance in any measured hashrate.

Updated Category Crypto Mining & Blockchain Costs Verified against published test cases Reading time 13 min

What difficulty is, in units of work

Proof of work asks miners to find a block header whose SHA-256 double hash, read as a 256-bit number, falls below a target. Because the hash output is uniform, the chance any single attempt succeeds is target ÷ 2256, and the expected number of attempts is the reciprocal.

Difficulty is that reciprocal expressed relative to the easiest allowed target. Difficulty 1 corresponds to a target of 0xffff × 2208, which needs about 4.295 billion hashes per block. So at difficulty D a block needs about D × 232 hashes, and difficulty is best read as “how many multiples of 4.295 billion hashes a block costs”.

Everything else follows arithmetically. Divide the hashes per block by your hash rate and you get your expected seconds per block. Divide it by the protocol's target interval instead — 600 seconds for Bitcoin — and you get the hashrate the whole network must be running to produce blocks at that pace, which is the only way anyone knows the network hashrate. Nobody measures it; it is inferred from the difficulty the network has settled at.

Difficulty retargets every 2,016 blocks, or roughly two weeks. The protocol compares how long those 2,016 blocks actually took against the 20,160 minutes they should have taken and scales difficulty by the ratio, clamped to a factor of four in either direction. Sustained hashrate growth therefore produces sustained difficulty growth, and an estimate made at today's difficulty is optimistic for any period longer than a fortnight.

Why the wait is exponential, and why the median matters

Each hash attempt is an independent Bernoulli trial with a tiny success probability, and the trials arrive at a constant rate. That makes block discovery a Poisson process, and the waiting time between successes an exponential distribution. Two consequences follow, and both are routinely misread.

The process is memoryless. Having hashed for six months without finding a block does not improve the odds for tomorrow by any amount. There is no accumulated progress, no partial credit, and no sense in which you are “due”. The distribution of your remaining wait is identical to the distribution you faced on day one. Pool share counting can obscure this, but the underlying process has no memory at all.

The median is shorter than the mean. For an exponential distribution the median is ln 2 × the mean, about 69.3% of it. So if the expected wait is 100 days, half of all miners in that position find a block within 69.3 days — and the mean is pulled up by a long tail in which some wait several hundred. The probability of exceeding the mean is e−1 = 36.8%, and of exceeding twice the mean is e−2 = 13.5%. Quoting only the mean overstates the typical experience and understates the worst case.

The probability formula. P(at least one block within t) = 1 − e−t/E. It approaches 100% asymptotically and never reaches it: at ten times the mean you are at 99.995%, and there is no window that guarantees a block. The expected number of blocks in the window, t/E, is a different quantity and is larger than the probability whenever a second block in the same window is possible.

The constant. The literature and every mining calculator use D × 232. The exact figure implied by the maximum target is D × 248/0xffff = D × 4,295,032,833, which is 0.0015% larger. That difference is invisible next to the variance in a measured hashrate, so this calculator uses the conventional constant and records the exact one for completeness.

Worked example: 100 TH/s at difficulty 10¹⁴

Take a single modern ASIC running a sustained 100 TH/s — that is 1014 hashes per second — against a network difficulty of 1014.

  1. Hashes per block. 1014 × 4,294,967,296 = 4.294967×1023.
  2. Implied network hashrate. 4.294967×1023 ÷ 600 = 7.1583×1020 H/s, which is 715.83 EH/s.
  3. Your share. 1014 ÷ 7.1583×1020 = 1.397×10−7, or 0.00001397% — about one part in seven million.
  4. Expected seconds to a block. 4.294967×1023 ÷ 1014 = 4.294967×109 s.
  5. In years. 4.294967×109 ÷ 31,556,952 = 136.10 years.
  6. Median. 0.6931 × 136.10 = 94.35 years. Half of all miners in this position would find a block sooner than that.
  7. Chance in 24 hours. 1 − e−86,400 ÷ 4.294967×109 = 1 − e−0.0000201 = 0.00201%, or about one chance in 49,710.
  8. Expected coins per day. 86,400 ÷ 4.294967×109 = 2.0117×10−5 blocks, times 3.125 BTC = 6.287×10−5 BTC.

Step 8 is the number that matters, and it is also the number a mining pool pays you. A pool with 5% of the network finds a block roughly every 200 minutes and distributes it in proportion to contributed work, so your daily total is the same 6.287×10−5 BTC minus the pool fee. What changes is the variance, not the expectation: solo mining offers the same average with a 136-year mean wait and an all-or-nothing outcome. Convert that daily figure into money, and subtract electricity, with the crypto mining profitability calculator.

Reading the odds honestly

Read the median alongside the mean. If the expected wait is longer than the useful life of the hardware, solo mining is a lottery ticket rather than a business, and stating it that way is more honest than quoting an average nobody experiences. Conversely, if the median wait is a few days, solo mining is viable and the variance is tolerable.

Treat today's difficulty as a floor. Every figure here assumes difficulty stays where it is. It retargets every 2,016 blocks, and in a period of hashrate growth each retarget lengthens your expected wait. Any projection beyond a fortnight should either model a growth rate explicitly or be labelled as a best case.

Do not confuse the probability with the expected count. Over a window equal to the mean, the expected number of blocks is 1.0 and the probability of at least one is 63.2%. The gap is the chance of finding two or more. The two figures converge only when both are small, which is exactly the regime a small solo miner is in — and diverge when you are modelling a pool.

Sanity-check the share figure. Your percentage of the network should match what a pool dashboard shows if you are pointed at one. A wildly wrong figure almost always means a units mistake: difficulty entered in trillions when the field expects the plain number, or TH/s entered where H/s was wanted. The calculator flags shares above 50% for this reason, because a genuine majority is far less likely than a typo.

Remember what is not modelled. Transaction fees add to the block reward and vary enormously with mempool congestion. Stale and orphaned blocks lose you work that was genuinely done. Pool fees, whether a flat percentage or a pay-per-share arrangement, come off the top. And hardware does not sustain its rated hashrate through thermal throttling and firmware variation. For the full economic picture, take the expected coins per day from here and put it through the mining hardware ROI break-even calculator.

Expected time to find a block at difficulty 10¹⁴

Hashes per block = 1014 × 232 = 4.294967×1023. Expected time is that figure divided by the hashrate; the median is 69.3% of it. Implied network hashrate at a 600-second target is 715.83 EH/s.
Your hashrateShare of networkExpected timeMedian time
100 TH/s0.0000140%136.10 years94.35 years
1 PH/s0.000140%13.61 years9.435 years
10 PH/s0.00140%497.1 days344.6 days
100 PH/s0.0140%49.71 days34.46 days
1 EH/s0.140%4.971 days3.446 days
10 EH/s1.397%11.93 hours8.27 hours
100 EH/s13.97%71.58 minutes49.62 minutes

Every row is the one above divided by ten, because expected time is inversely proportional to hashrate. That linearity is what makes pooling work: ten miners at 100 PH/s each experience the pool's 4.97-day wait rather than their own 49.7-day one, for the same expected income.

Probability of at least one block, as a multiple of the mean wait

P = 1 − e−k, where k is the elapsed time divided by the mean. These figures are independent of difficulty and hashrate — only the ratio matters.
Elapsed ÷ meanProbability of ≥ 1 blockProbability of none
0.19.516%90.484%
0.539.347%60.653%
0.693 (median)50.000%50.000%
1.063.212%36.788%
2.086.466%13.534%
3.095.021%4.979%
5.099.326%0.674%
10.099.995%0.005%

Mining for the full expected time leaves a 36.8% chance of nothing at all, and mining for twice as long still leaves 13.5%. There is no elapsed time that guarantees a block, which is the practical meaning of an exponential wait.

Pooling changes the variance, not the expectation

A pool combines many miners' hashrate so that the group finds blocks frequently, then distributes the reward in proportion to work contributed. Your expected income is unchanged, minus the pool fee. What changes is the shape of the distribution: instead of a single enormous payout at an unpredictable time, you receive small regular ones.

That distinction matters because electricity bills arrive monthly and block discoveries do not. A miner whose median wait is measured in years cannot fund operations from block rewards, however sound the expected value. Pooling converts a lottery into an income stream at the cost of a percentage.

What pooling does not do is improve your odds. Anyone offering better-than-expected returns is either taking on variance risk themselves — which is what a pay-per-share pool does, and it charges for it — or is not solvent. The arithmetic on this page is the ceiling.

What this calculation leaves out

  • Difficulty changes. Every figure assumes today's difficulty holds. Bitcoin retargets every 2,016 blocks, so a projection over months is optimistic whenever network hashrate is growing.
  • Transaction fees. The block reward here is the subsidy only. Fees can be a small fraction of it in quiet periods and a substantial addition during congestion.
  • Stale and orphaned blocks. Work on a block that loses a race is lost entirely. Propagation delay makes this more likely for miners poorly connected to the network.
  • Pool fees and payout schemes. Proportional, pay-per-share and full-pay-per-share arrangements distribute variance differently between you and the pool, and charge accordingly.
  • Real versus rated hashrate. Thermal throttling, firmware, power limits and hardware errors mean sustained hashrate is normally below the nameplate figure. Use what your dashboard reports.
  • Downtime. Expected time assumes continuous hashing. Any outage extends the wait in direct proportion.
  • The exact difficulty constant. D × 2³² is the convention; the exact value is 0.0015% larger. It has no practical effect but is worth knowing if you are reconciling against protocol source.
  • Electricity, hardware and cooling. This calculator produces coins, not profit. Profit needs the cost side as well.

Key terms

Difficulty
A dimensionless number expressing how much harder the current target is than the easiest allowed one. At difficulty D a block needs about D × 2³² hashes.
Target
The 256-bit threshold a block header hash must fall below. Difficulty and target are reciprocals scaled by the maximum target, 0xffff·2²⁰⁸.
Retarget
Bitcoin's difficulty adjustment, applied every 2,016 blocks, which scales difficulty by the ratio of expected to actual elapsed time, clamped to a factor of four in either direction.
Memoryless
The property of an exponential waiting time that the remaining wait has the same distribution however long you have already waited. There is no accumulated progress toward a block.
Stale block
A validly mined block that loses a race to another block at the same height and earns nothing. Propagation speed and pool connectivity determine how often it happens.

Where this sits among mining calculations

This calculator answers one question — how long until a block — and that question sits upstream of every other mining number. Expected coins per day feeds directly into revenue; revenue minus electricity gives margin; margin against hardware cost gives a payback period. Work through those with the mining profitability calculator and the hardware ROI break-even calculator, both of which take a hashrate and a difficulty as their starting point.

It is also a useful lens on what proof of work actually is. The network is running roughly D × 232 ÷ 600 hashes every second purely to make history expensive to rewrite, and the cost of that computation is the security budget. The same arithmetic that gives a solo miner their odds gives an attacker the cost of a reorganisation, which is why the share-of-network figure is the one security analyses concentrate on.

The underlying mathematics is shared with two neighbouring calculations. Exhaustive key search has the identical structure — a fixed probability per trial and an exponential waiting time — and the key brute-force time calculator uses the same expected-attempts reasoning. And the birthday bound in the hash collision probability calculator shows the other way a hash function's output space can be searched, which costs the square root rather than the full space. Mining is a preimage-style search, so no such shortcut applies.

Proof of stake, used by several major chains, has no difficulty and no hashing, so none of this arithmetic transfers to it. Where you need a fee estimate for such a chain rather than a mining estimate, the Ethereum gas fee calculator models the relevant cost.

Frequently asked questions

How long does it take to mine one Bitcoin at 100 TH/s?

At a difficulty of 1014, a 100 TH/s rig has an expected wait of about 136 years for a single block, which pays 3.125 BTC. Expressed as a rate that is about 6.3×10−5 BTC a day, so accumulating one whole coin takes roughly 43 years of continuous hashing at constant difficulty. Mining in a pool produces the same average as small daily payments instead of one improbable windfall.

How is network hashrate calculated from difficulty?

Network hashrate = difficulty × 232 ÷ target block interval. At difficulty 1014 and Bitcoin's 600-second target that is 1014 × 4,294,967,296 ÷ 600 = 7.16×1020 H/s, or about 716 EH/s. Nobody measures network hashrate directly; it is inferred this way, which is why published figures differ slightly depending on the averaging window each source uses.

Why is the median time shorter than the expected time?

Because the waiting time is exponentially distributed, and that distribution is skewed: a long tail of unlucky waits pulls the mean above the median. The median is ln 2 × the mean, about 69.3% of it. So with a 100-day expected wait, half of all miners find a block within 69.3 days while the unlucky minority waits far longer. The probability of exceeding the mean is 36.8%.

Does mining for longer improve my chances?

It improves the chance of having found a block by a given date, but not the chance for the next hour. The process is memoryless: hashes are independent trials, nothing accumulates, and the distribution of your remaining wait is the same after six months as it was on day one. There is no sense in which a block becomes overdue, and no strategy based on that idea has any effect.

How often does Bitcoin difficulty change?

Every 2,016 blocks, which is about two weeks at the target ten-minute interval. The protocol compares the time those blocks actually took with the 20,160 minutes they should have taken and multiplies difficulty by the ratio, clamped to a maximum change of four times in either direction. Rising network hashrate therefore drives difficulty up, which lengthens the expected wait for a fixed rig.

Is solo mining ever worth it?

It depends on whether the median wait is short enough that you can carry the variance. At a scale where the median is measured in days, solo mining keeps the full reward and avoids pool fees. At a scale where it is measured in years, the expected value is identical to pooling but the outcome is all-or-nothing, and electricity bills arrive monthly whether or not a block does. Compute the median before deciding, not the mean.

Why is the constant 2³² and not something else?

Because difficulty 1 corresponds to the maximum target 0xffff·2208, and the expected number of hashes to fall below it is 2256 ÷ target = 248 ÷ 0xffff = 4,295,032,833. Every calculator rounds that to 232 = 4,294,967,296, which is 0.0015% smaller. The difference is far below the uncertainty in any measured hashrate, so the convention is harmless — but it is a real approximation rather than an exact identity.

Does this work for other proof-of-work coins?

Only where the chain defines difficulty the same way Bitcoin does and uses the same hash-per-attempt model, in which case you change the target block interval and the reward. Chains using different difficulty units, different hash functions with different work-per-hash, or memory-hard algorithms need their own conversion factor. Proof-of-stake chains have no difficulty and none of this applies to them at all.

Why does my pool report a different share of the network than this?

Usually because the pool is comparing your hashrate against a rolling average of measured network hashrate rather than against the figure implied by the current difficulty. Those differ because block times fluctuate: a run of fast blocks makes the measured rate look higher than the difficulty implies, and the gap closes at the next retarget. A large discrepancy, though, is more often a units error — check that difficulty and hashrate are both in the units the field expects.

References