<p>The important thing here is, that every mining pool/solo miner is working on a <strong>different input</strong>: They have different coinbase transactions and are working on different sets of transactions. Further entropy can be added by changing the nonce and extra-nonce, by adding another transaction, or by changing the order of the transactions.</p>

<p>While there can be block inputs that won't succeed with any nonce, the complete network traverses over so many different inputs, that at some point a valid block will be discovered. </p>

<h2>Finding a block is a Poisson process</h2>

<p>Due to the hashing process being implemented as a <a href="https://en.wikipedia.org/wiki/Poisson_process" rel="noreferrer">Poisson process</a>, if the network's hashing power matches the difficulty, the expected time to find the next block is exactly <a href="https://bitcoin.stackexchange.com/q/3909/5406">10 minutes</a> at every point of time.</p>

<p>The probability of a number of <code>X</code> blocks to be found in a time frame in which you would expect to find <code>λ</code> blocks can be calculated with the following <a href="https://de.wikibooks.org/wiki/Mathematik:_Statistik:_Poissonverteilung" rel="noreferrer">formula</a>:
<img src="https://i.sstatic.net/WKAab.png" alt="Probability of a number of occurrences varying from the expected occurrences"></p>

<p>So, in order to calculate the likelihood of an interval between blocks to be longer than the mean (10 minutes in an ideal world) by a factor <code>λ</code> we get <code>p(0|λ) = exp(-λ)*(λ^0)/(0!) = exp(-λ)*1/1 = exp(-λ)</code>, e.g. the likelihood for a block interval to be</p>

<ul>
<li>more than 10 minutes is 36.8%</li>
<li>more than 20 minutes is 13.5%</li>
<li>more than 30 minutes is 5.0%</li>
<li>more than 1 hour is 0.25%</li>
<li>more than 2 hours is 0.0006%</li>
<li>more than a day is 2.89*exp(-63)</li>
</ul>

<p>While it is not impossible that longer times occur, it is extremely unlikely to happen.</p>

<h2>Additional random bits I stumbled upon while researching for this question</h2>

<p>In the last two years, the seven day average block confirmation time has never been over 15 minutes. See <a href="https://blockchain.info/charts/avg-confirmation-time?timespan=2year&amp;showDataPoints=false&amp;daysAverageString=7&amp;show_header=true&amp;scale=0&amp;address=" rel="noreferrer">Bitcoin Average Transaction Confirmation Time</a></p>

<p>In the very early days of Bitcoin, bigger fluctuations were more common due to fluctuating mining power, see for example <a href="https://bitcoin.stackexchange.com/q/2324/5406">What is the longest time gap between blocks in 2010 - 2011?</a>.</p>

<p>You can find a list of all block intervals up to Jan 2014 sorted by length here: <a href="http://paste.ubuntu.com/6780012/" rel="noreferrer">Block intervals sorted</a>.<br>
The first column denominates the blocks forming the interval, the second column gives the block interval in seconds. Source: <a href="http://www.reddit.com/r/Bitcoin/comments/1vkp1x/what_is_the_longest_time_between_blocks_in_the/cetdjwc" rel="noreferrer">runeks on reddit: What is the longest time between blocks in the history of bitcoin?</a></p>

CC BY-SA 3.0
2017-02-19T19:03:17.717Z
What do für and sonst mean in this context?
Nick ODell
CC BY-SA 3.0
2017-02-19T23:47:56.870Z
@NickODell: für = for, sonst = else. I.e. for natural numbers it's the upper formula, for negative values it's always zero.
Murch
CC BY-SA 4.0
2024-02-19T15:59:43.253Z
I'm curious about SHA-256. What properties have been proved about it (vs assumed)? Why do we feel so safe modeling it as a Poisson process?
Benjamin Grange
CC BY-SA 3.0
2014-03-03T17:45:14.963Z
2017-02-19T12:00:28.340Z
2017-04-13T12:47:36.647Z
Murch
<p>We can't know for absolute certain that a block will be found. However, we can roughly compute probabilities.</p>

<p>The current block difficulty requires approximately 63 zero bits at the start of the hash. The probability of finding a block with one hash is approximately <code>2**(-63)</code>. The probability of <em>not</em> finding a block is <code>(1 - 2**(-63))</code>. The probably, therefore, of not finding a block after <code>N</code> hash attempts is <code>(1 - 2**(-63))**N</code>.  </p>

<p>The current <a href="https://blockchain.info/charts/hash-rate" rel="noreferrer">network hash rate</a> is about 30,000,000 GH/s, or 3e16 H/s. In 10 minutes the network can do about 1.8e19 hashes. Using this value as <code>N</code> above and <a href="https://www.wolframalpha.com/input/?i=%281-2%5E-63%29%5E%281.8%2a10%5E19%29" rel="noreferrer">working out the result</a> gives 0.14205174, which again is the probability of <em>not</em> finding a block after 10 minutes.</p>

<p>Given the above, you can extend the time and calculate some more probabilities:</p>

<blockquote>
  <p>No result in one hour => 0.00000821 = 8.21e-6<br>
  No result in one day => 8.96e-123</p>
</blockquote>

<p>It is exceedingly unlikely that no result for a block would be found after one day.</p>

CC BY-SA 3.0
2014-03-03T23:11:59.977Z
@Zaph: It's easy to work out the probability of getting a successful hash for bitcoin mining *for a single hash attempt*. That's like throwing a die and getting 1 (probability 1/6). However, the interesting part is how many times you have to throw a die to get 1 to come up at some point. You can't say for sure that you can throw a die 6 times and get a 1. You can't even say that for 10 throws, or 100 throws, or a million. For a die, the probability of throwing `N` times and *never* getting a 1 is `(5/6)**N`.
Greg Hewgill
CC BY-SA 3.0
2014-03-04T08:51:26.967Z
@GregHewgill: While my first attempt to calculate the probabilities was much along the lines of yours, I have learned by now, that block finding is a Poisson process, and my initial attempt was wrong. I have now provided what I think to be the correct probabilities and also the formula that can be used to calculate them.
Murch
CC BY-SA 3.0
2014-03-04T19:30:04.410Z
@Murch: The [Bernoulli process](https://en.wikipedia.org/wiki/Bernoulli_process) (which I have described) and the [Poisson process](https://en.wikipedia.org/wiki/Poisson_process) (which you have described) are closely related. The Poisson process models continuous time; the Bernoulli process models discrete time. Both approaches can successfully model the Bitcoin mining process.
Greg Hewgill
CC BY-SA 3.0
2014-03-03T20:33:11.467Z
2014-03-03T20:40:32.653Z
2014-03-03T20:40:32.653Z
Greg Hewgill
<p>How do we know the HASH function will produce an output that fulfills the difficulty, i.e. is below 0000...xxxx...xxx? </p>

<p>Is it possible that no proof will be found so that the HASH will produce that output 000...xxx...?</p>

CC BY-SA 3.0
2016-03-07T10:42:19.623Z
closely related: [Is it possible for the network to stop finding valid blocks?](http://bitcoin.stackexchange.com/q/9933/5406)
Murch
<hash><proof-of-work>
How can we be sure that a new block will be found?
user4691
# How can we be sure that a new block will be found?

(Asked by: username_0 on 2014-03-03)

How do we know the HASH function will produce an output that fulfills the difficulty, i.e. is below 0000...xxxx...xxx?

Is it possible that no proof will be found so that the HASH will produce that output 000...xxx...?

**Tags:** hash, proof-of-work

> **Comments:**
> **username_1**: closely related: [Is it possible for the network to stop finding valid blocks?](http://bitcoin.stackexchange.com/q/9933/5406)  

---

## 2 answers

### Answer by username_1 on 2014-03-03. Score: 14

The important thing here is, that every mining pool/solo miner is working on a **different input**: They have different coinbase transactions and are working on different sets of transactions. Further entropy can be added by changing the nonce and extra-nonce, by adding another transaction, or by changing the order of the transactions.

While there can be block inputs that won't succeed with any nonce, the complete network traverses over so many different inputs, that at some point a valid block will be discovered.

## Finding a block is a Poisson process

Due to the hashing process being implemented as a [Poisson process](https://en.wikipedia.org/wiki/Poisson_process), if the network's hashing power matches the difficulty, the expected time to find the next block is exactly [10 minutes](https://bitcoin.stackexchange.com/q/3909/5406) at every point of time.

The probability of a number of `X` blocks to be found in a time frame in which you would expect to find `λ` blocks can be calculated with the following [formula](https://de.wikibooks.org/wiki/Mathematik:_Statistik:_Poissonverteilung):
![Probability of a number of occurrences varying from the expected occurrences](https://i.sstatic.net/WKAab.png)

So, in order to calculate the likelihood of an interval between blocks to be longer than the mean (10 minutes in an ideal world) by a factor `λ` we get `p(0|λ) = exp(-λ)*(λ^0)/(0!) = exp(-λ)*1/1 = exp(-λ)`, e.g. the likelihood for a block interval to be

* more than 10 minutes is 36.8%
* more than 20 minutes is 13.5%
* more than 30 minutes is 5.0%
* more than 1 hour is 0.25%
* more than 2 hours is 0.0006%
* more than a day is 2.89\*exp(-63)

While it is not impossible that longer times occur, it is extremely unlikely to happen.

## Additional random bits I stumbled upon while researching for this question

In the last two years, the seven day average block confirmation time has never been over 15 minutes. See [Bitcoin Average Transaction Confirmation Time](https://blockchain.info/charts/avg-confirmation-time?timespan=2year&showDataPoints=false&daysAverageString=7&show_header=true&scale=0&address=)

In the very early days of Bitcoin, bigger fluctuations were more common due to fluctuating mining power, see for example [What is the longest time gap between blocks in 2010 - 2011?](https://bitcoin.stackexchange.com/q/2324/5406).

You can find a list of all block intervals up to Jan 2014 sorted by length here: [Block intervals sorted](http://paste.ubuntu.com/6780012/).  
The first column denominates the blocks forming the interval, the second column gives the block interval in seconds. Source: [runeks on reddit: What is the longest time between blocks in the history of bitcoin?](http://www.reddit.com/r/Bitcoin/comments/1vkp1x/what_is_the_longest_time_between_blocks_in_the/cetdjwc)

> **Comments:**
> **username_2**: What do für and sonst mean in this context?  
> **username_1**: @username_2: für = for, sonst = else. I.e. for natural numbers it's the upper formula, for negative values it's always zero.  
> **username_3**: I'm curious about SHA-256. What properties have been proved about it (vs assumed)? Why do we feel so safe modeling it as a Poisson process?  

---

### Answer by username_4 on 2014-03-03. Score: 6

We can't know for absolute certain that a block will be found. However, we can roughly compute probabilities.

The current block difficulty requires approximately 63 zero bits at the start of the hash. The probability of finding a block with one hash is approximately `2**(-63)`. The probability of *not* finding a block is `(1 - 2**(-63))`. The probably, therefore, of not finding a block after `N` hash attempts is `(1 - 2**(-63))**N`.

The current [network hash rate](https://blockchain.info/charts/hash-rate) is about 30,000,000 GH/s, or 3e16 H/s. In 10 minutes the network can do about 1.8e19 hashes. Using this value as `N` above and [working out the result](https://www.wolframalpha.com/input/?i=%281-2%5E-63%29%5E%281.8%2a10%5E19%29) gives 0.14205174, which again is the probability of *not* finding a block after 10 minutes.

Given the above, you can extend the time and calculate some more probabilities:

> No result in one hour => 0.00000821 = 8.21e-6  
> No result in one day => 8.96e-123

It is exceedingly unlikely that no result for a block would be found after one day.

> **Comments:**
> **username_4**: @Zaph: It's easy to work out the probability of getting a successful hash for bitcoin mining *for a single hash attempt*. That's like throwing a die and getting 1 (probability 1/6). However, the interesting part is how many times you have to throw a die to get 1 to come up at some point. You can't say for sure that you can throw a die 6 times and get a 1. You can't even say that for 10 throws, or 100 throws, or a million. For a die, the probability of throwing `N` times and *never* getting a 1 is `(5/6)**N`.  
> **username_1**: @username_4: While my first attempt to calculate the probabilities was much along the lines of yours, I have learned by now, that block finding is a Poisson process, and my initial attempt was wrong. I have now provided what I think to be the correct probabilities and also the formula that can be used to calculate them.  
> **username_4**: @username_1: The [Bernoulli process](https://en.wikipedia.org/wiki/Bernoulli_process) (which I have described) and the [Poisson process](https://en.wikipedia.org/wiki/Poisson_process) (which you have described) are closely related. The Poisson process models continuous time; the Bernoulli process models discrete time. Both approaches can successfully model the Bitcoin mining process.  

---

