<p>14 days have 20,160 minutes.</p>
<p>Likely the time window for the difficulty period and the targeted block interval were picked first and then the
2016 blocks resulted from that.</p>

CC BY-SA 4.0
2018-01-04T08:43:10.937Z
2022-11-03T17:57:05.543Z
2022-11-03T17:57:05.543Z
Murch
<p>For calculating the difficulty retargeting, the equation is: </p>

<pre><code>New Difficulty = Old Difficulty * (Actual Time of Last 2015 Blocks / 20160 minutes)
</code></pre>

<p>20,160 minutes is two weeks based upon a desired 10-minute block time; hence the 2016 blocks. </p>

<p>P.S. I actually do mean 2015 blocks. Even though the retargeting itself happens every 2016 blocks, due to an off-by-one error in the original Bitcoin Core client (my bad ;)) it is based on the total time of the previous 2015 blocks only.</p>

CC BY-SA 3.0
2018-01-04T21:56:34.990Z
2018-01-04T21:56:34.990Z
satoshi_ghost
<p>I am reading <a href="https://en.bitcoin.it/wiki/Difficulty#What_network_hash_rate_results_in_a_given_difficulty.3F" rel="nofollow noreferrer">Bitcoin wiki</a> and it says</p>
<blockquote>
<p>over the previous 2016 blocks. Can be further simplified to</p>
<pre><code>D * 2**32 / 600
</code></pre>
<p>without much loss of accuracy.</p>
</blockquote>
<p>I guess the reason of reducing to 2**32 is for computing convenience (bit operation). However, 0xffffff / 2016 = 32.507440476190474 and 0xffffff / 2048 = 31.99951171875 which is more accurate.</p>
<p>Why was 2016 chosen instead of 2048?</p>

<difficulty><difficulty-retargetting>
Why does Bitcoin adjust the difficulty every 2016 instead of 2048 blocks?
sevenever
# Why does Bitcoin adjust the difficulty every 2016 instead of 2048 blocks?

(Asked by: username_0 on 2018-01-04)

I am reading Bitcoin wiki and it says

over the previous 2016 blocks. Can be further simplified to
D * 2**32 / 600

without much loss of accuracy.

I guess the reason of reducing to 2**32 is for computing convenience (bit operation). However, 0xffffff / 2016 = 32.507440476190474 and 0xffffff / 2048 = 31.99951171875 which is more accurate.
Why was 2016 chosen instead of 2048?

**Tags:** difficulty, difficulty-retargetting


---

## 2 answers

### Answer by username_1 on 2018-01-04. Score: 3 | Accepted answer

14 days have 20,160 minutes.

Likely the time window for the difficulty period and the targeted block interval were picked first and then the
2016 blocks resulted from that.


---

### Answer by username_2 on 2018-01-04. Score: 0

For calculating the difficulty retargeting, the equation is: 
New Difficulty = Old Difficulty * (Actual Time of Last 2015 Blocks / 20160 minutes)

20,160 minutes is two weeks based upon a desired 10-minute block time; hence the 2016 blocks. 
P.S. I actually do mean 2015 blocks. Even though the retargeting itself happens every 2016 blocks, due to an off-by-one error in the original Bitcoin Core client (my bad ;)) it is based on the total time of the previous 2015 blocks only.


---

