<p>As RedGrittyBrick already wrote, the difficulty to create new blocks is adjusted every 2016 blocks. The difficulty provides an expected amount of hashes performed to find a block, which allows a general estimate how much hashrate exists on the network. Additionally, some websites compare the number of published blocks with the expected number of blocks found to provide a higher resolution than whole difficulty periods. Since blocks are found in a random process, these charts often jump around a lot as even a constant hashrate can have a large variance of blocks found per day.</p>
<p>As an example, let's take a look at this chart of Blocks per Day for the last three months. The blocks found range from 89 on 2022-12-24 to 180 on 2023-01-06.  <a href="https://i.sstatic.net/OaqGk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OaqGk.png" alt="enter image description here" /></a><br />
<sup>via <a href="https://transactionfee.info/charts/blocks-per-day/?start=2022-10-12&amp;end=2023-01-11" rel="nofollow noreferrer">transactionfee.info</a></sup></p>
<p>Meanwhile, the self-reported hashrate of mining pools in the last three months looks like this: <a href="https://i.sstatic.net/e3tZm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/e3tZm.png" alt="enter image description here" /></a><br />
<sup>via <a href="https://miningpoolstats.stream/bitcoin" rel="nofollow noreferrer">miningpoolstats.stream</a></sup></p>
<p>While we do see a drop in the self-reported hashrate on Christmas Eve (partially explained by an <a href="https://news.abplive.com/business/crypto/bitcoin-s-hash-rate-down-texas-restricted-hash-power-miners-massive-winter-freeze-1571915" rel="nofollow noreferrer">extreme winter freeze in Texas that had miners yield power for heating homes</a>) that aligns with the lowest block count, the self-reported hashrate ranges between 200 EH/s and 287 EH/s while the block count maximum is double the minimum.</p>
<p>This is underscored when we compare the self-reported figures with miningpoolstats.stream's estimated hashrate on the network:<a href="https://i.sstatic.net/dE68E.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dE68E.png" alt="enter image description here" /></a><br />
<sup>via <a href="https://miningpoolstats.stream/bitcoin" rel="nofollow noreferrer">miningpoolstats.stream</a></sup></p>
<p><strong>So, the hashrate can be estimated from the difficulty of the blocks and the count of blocks found, but the random process makes it easy estimate much larger swings than seem to be present in the actual hashrate.</strong></p>

CC BY-SA 4.0
2023-01-12T21:40:44.943Z
Great data! The shorter the sampling period, the more noise is in the result. I guess anything less than a day does not make sense, and even one day is too short. From the swings in this graph I guess the websites that I've seen use approx. one day as sampling period (e,g, https://www.coinwarz.com/mining/bitcoin/hashrate-chart).
OptOut
CC BY-SA 4.0
2023-01-12T12:50:15.313Z
2023-01-12T18:23:31.727Z
2023-01-12T18:23:31.727Z
Murch
<p>The total network hashrate can be estimated from the network difficulty recorded in the block headers over a reasonable sample period.</p>
<p>There is a relationship between the two because the difficulty is adjusted every 2016 blocks (about two weeks at 10 minutes per block) with the aim of keeping block production rate near constant as total network hashrate changes.</p>
<p>See <a href="https://bitcoin.stackexchange.com/q/14086/13866">How can I calculate network hashrate for a given range of blocks where difficulty changes somewhere within the range?</a> for calculation</p>

CC BY-SA 4.0
2023-02-07T19:01:51.930Z
When you say `network difficulty recorded in the block headers` here are you referring to the difficulty of the solution accepted by the network (over a sample period)?
Poseidon
CC BY-SA 4.0
2023-02-07T19:26:36.063Z
@Poseidon, yes I was referring to the fifth data item described at https://en.bitcoin.it/wiki/Protocol_documentation#block : *"bits" ... "The calculated difficulty target being used for this block "* -- Looking at a period spanning a recalculation would give you an idea which direction the hashrate is trending. Murch's answer describes ways to get greater precision.
RedGrittyBrick
CC BY-SA 4.0
2023-02-07T19:28:28.447Z
Ok thank you, I find this relevant because the bits is just the target difficulty while the network accepted solution difficulty represents the actual difficulty solved by a miner. They are relatively similar though.
Poseidon
CC BY-SA 4.0
2023-01-12T12:22:48.873Z
2023-01-12T12:24:44.507Z
2023-01-12T12:24:44.507Z
RedGrittyBrick
<p>Where does <a href="https://bitinfocharts.com/comparison/hashrate-price-btc.html#1y" rel="nofollow noreferrer">the data</a> come from?</p>
<p><a href="https://i.sstatic.net/3wACo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3wACo.png" alt="enter image description here" /></a></p>

<hashpower>
How is the hashrate calculated?
Pedro
# How is the hashrate calculated?

(Asked by: username_0 on 2023-01-12)

Where does [the data](https://bitinfocharts.com/comparison/hashrate-price-btc.html#1y) come from?

[![enter image description here](https://i.sstatic.net/3wACo.png)](https://i.sstatic.net/3wACo.png)

**Tags:** hashpower


---

## 2 answers

### Answer by username_1 on 2023-01-12. Score: 4

As username_3 already wrote, the difficulty to create new blocks is adjusted every 2016 blocks. The difficulty provides an expected amount of hashes performed to find a block, which allows a general estimate how much hashrate exists on the network. Additionally, some websites compare the number of published blocks with the expected number of blocks found to provide a higher resolution than whole difficulty periods. Since blocks are found in a random process, these charts often jump around a lot as even a constant hashrate can have a large variance of blocks found per day.

As an example, let's take a look at this chart of Blocks per Day for the last three months. The blocks found range from 89 on 2022-12-24 to 180 on 2023-01-06. [![enter image description here](https://i.sstatic.net/OaqGk.png)](https://i.sstatic.net/OaqGk.png)  
via [transactionfee.info](https://transactionfee.info/charts/blocks-per-day/?start=2022-10-12&end=2023-01-11)

Meanwhile, the self-reported hashrate of mining pools in the last three months looks like this: [![enter image description here](https://i.sstatic.net/e3tZm.png)](https://i.sstatic.net/e3tZm.png)  
via [miningpoolstats.stream](https://miningpoolstats.stream/bitcoin)

While we do see a drop in the self-reported hashrate on Christmas Eve (partially explained by an [extreme winter freeze in Texas that had miners yield power for heating homes](https://news.abplive.com/business/crypto/bitcoin-s-hash-rate-down-texas-restricted-hash-power-miners-massive-winter-freeze-1571915)) that aligns with the lowest block count, the self-reported hashrate ranges between 200 EH/s and 287 EH/s while the block count maximum is double the minimum.

This is underscored when we compare the self-reported figures with miningpoolstats.stream's estimated hashrate on the network:[![enter image description here](https://i.sstatic.net/dE68E.png)](https://i.sstatic.net/dE68E.png)  
via [miningpoolstats.stream](https://miningpoolstats.stream/bitcoin)

**So, the hashrate can be estimated from the difficulty of the blocks and the count of blocks found, but the random process makes it easy estimate much larger swings than seem to be present in the actual hashrate.**

> **Comments:**
> **username_2**: Great data! The shorter the sampling period, the more noise is in the result. I guess anything less than a day does not make sense, and even one day is too short. From the swings in this graph I guess the websites that I've seen use approx. one day as sampling period (e,g, https://www.coinwarz.com/mining/bitcoin/hashrate-chart).  

---

### Answer by username_3 on 2023-01-12. Score: 2

The total network hashrate can be estimated from the network difficulty recorded in the block headers over a reasonable sample period.

There is a relationship between the two because the difficulty is adjusted every 2016 blocks (about two weeks at 10 minutes per block) with the aim of keeping block production rate near constant as total network hashrate changes.

See [How can I calculate network hashrate for a given range of blocks where difficulty changes somewhere within the range?](https://bitcoin.stackexchange.com/q/14086/13866) for calculation

> **Comments:**
> **username_4**: When you say `network difficulty recorded in the block headers` here are you referring to the difficulty of the solution accepted by the network (over a sample period)?  
> **username_3**: @username_4, yes I was referring to the fifth data item described at https://en.bitcoin.it/wiki/Protocol_documentation#block : *"bits" ... "The calculated difficulty target being used for this block "* -- Looking at a period spanning a recalculation would give you an idea which direction the hashrate is trending. username_1's answer describes ways to get greater precision.  
> **username_4**: Ok thank you, I find this relevant because the bits is just the target difficulty while the network accepted solution difficulty represents the actual difficulty solved by a miner. They are relatively similar though.  

---

