<p>The network hash rate can be statistically inferred from the difficulty and the rate at which blocks are found. It's just a more complex version of the fact that if you know that someone is flipping coins and heads comes up 800 times an hour, they're flipping about 1,600 coins an hour.</p>

CC BY-SA 3.0
2013-05-23T08:44:02.123Z
2013-05-23T08:44:02.123Z
David Schwartz
<p>The hashrate can be calculated from the expected rate of finding a block (144 a day), the actual rate of finding a block and the current difficulty.</p>

<p>So let's calculate the average hash_rate for a single day:</p>

<pre><code>expected_blocks = 144
difficulty = 11187257.461361 # this is on May 22nd 2013
blocks_found = 155 # Also May 22nd 2013
hash_rate = (blocks_found/expected_blocks*difficulty * 2**32 / 600)
</code></pre>

<p>The reason we use a day to average out the hash_rate is that taken block by block the variance would be really high and we would not get anything meaningful.</p>

<p>According to <a href="http://www.wolframalpha.com/input/?i=%28155/144%2a11187257.461361%20%2a%202%2a%2a32%20/%20600%29%20byte%20/%20second">WolframAlpha</a> this gives us an averagge hash_rate for the 22nd May 2013 of 86.19 THashes/s. Numbers of course may vary depending on how you chose your interval, which appears to be the reason numbers don't match with the ones on <a href="http://blockchain.info/charts/hash-rate">Blockchain.info</a></p>

CC BY-SA 4.0
2018-11-14T20:39:46.620Z
@glowkeeper see https://bitcoin.stackexchange.com/a/30225/60443
JBaczuk
CC BY-SA 4.0
2018-11-16T09:53:49.457Z
Thanks, @JBaczuk! Looks good! I should probably check that answer against mine (https://bitcoin.stackexchange.com/questions/79774/estimated-number-of-hashes), but I'm currently knee-deep in code, so I'll report back later, once I've done some back-of-the-envelope-calc's :)
glowkeeper
CC BY-SA 4.0
2018-10-04T13:34:44.687Z
I know this answer was given 5 years ago, but why 2**32? I'm presuming it has something to do with the 256-bit hashing function used, but some clarification would be awesome :)
glowkeeper
CC BY-SA 3.0
2013-05-23T08:56:11.917Z
2013-05-23T08:56:11.917Z
cdecker
<p>Miners work on finding blocks but don't sent anything until they find the block.</p>

<p>Considering that, how can sites like <a href="http://bitcoincharts.com/bitcoin/">bitcoincharts.com</a> display a graph of the network hash rate?</p>

CC BY-SA 3.0
2014-01-30T21:53:30.883Z
If I flip a fair coin repeatedly, and tell you that I found 1 billion heads, it's (practically) statistically certain that I flipped the coin very nearly 2 billion times. The same sort of extrapolation can determine the total network power based on the success rate.
Tim S.
<hash><charts>
How is the network hash rate calculated?
summerbulb
# How is the network hash rate calculated?

(Asked by: username_0 on 2013-05-23)

Miners work on finding blocks but don't sent anything until they find the block.

Considering that, how can sites like [bitcoincharts.com](http://bitcoincharts.com/bitcoin/) display a graph of the network hash rate?

**Tags:** hash, charts

> **Comments:**
> **username_1**: If I flip a fair coin repeatedly, and tell you that I found 1 billion heads, it's (practically) statistically certain that I flipped the coin very nearly 2 billion times. The same sort of extrapolation can determine the total network power based on the success rate.  

---

## 2 answers

### Answer by username_3 on 2013-05-23. Score: 21 | Accepted answer

The hashrate can be calculated from the expected rate of finding a block (144 a day), the actual rate of finding a block and the current difficulty.

So let's calculate the average hash\_rate for a single day:

```
expected_blocks = 144
difficulty = 11187257.461361 # this is on May 22nd 2013
blocks_found = 155 # Also May 22nd 2013
hash_rate = (blocks_found/expected_blocks*difficulty * 2**32 / 600)

```

The reason we use a day to average out the hash\_rate is that taken block by block the variance would be really high and we would not get anything meaningful.

According to [WolframAlpha](http://www.wolframalpha.com/input/?i=%28155/144%2a11187257.461361%20%2a%202%2a%2a32%20/%20600%29%20byte%20/%20second) this gives us an averagge hash\_rate for the 22nd May 2013 of 86.19 THashes/s. Numbers of course may vary depending on how you chose your interval, which appears to be the reason numbers don't match with the ones on [Blockchain.info](http://blockchain.info/charts/hash-rate)

> **Comments:**
> **username_5**: I know this answer was given 5 years ago, but why 2**32? I'm presuming it has something to do with the 256-bit hashing function used, but some clarification would be awesome :)  
> **username_4**: @username_5 see https://bitcoin.stackexchange.com/a/30225/60443  
> **username_5**: Thanks, @username_4! Looks good! I should probably check that answer against mine (https://bitcoin.stackexchange.com/questions/79774/estimated-number-of-hashes), but I'm currently knee-deep in code, so I'll report back later, once I've done some back-of-the-envelope-calc's :)  

---

### Answer by username_2 on 2013-05-23. Score: 7

The network hash rate can be statistically inferred from the difficulty and the rate at which blocks are found. It's just a more complex version of the fact that if you know that someone is flipping coins and heads comes up 800 times an hour, they're flipping about 1,600 coins an hour.


---

