<blockquote>
  <p>I am interested to understand that so I can understand what makes a block or a block chain more difficult than another. It is said that when a bitcoin client starts it chooses the most difficult block chain it sees.</p>
</blockquote>

<p>In order to mine a block, one needs to attach work to the block header. If too many blocks are created, the requirement for work is increased, meaning the difficulty increases. When two chains are compared, the difficulty of each block is totaled up, and the chain with a higher score wins.</p>

CC BY-SA 3.0
2015-09-06T15:03:43.380Z
Did you care to elaborate on compact form, for my benefit too? :)
Wizard Of Ozzie
CC BY-SA 3.0
2015-09-05T20:24:58.817Z
2015-09-05T20:24:58.817Z
Nick ODell
<h2>Block weight derives from difficulty</h2>

<p>The difficulty encodes how likely one try is at producing a valid block. Let's say the difficulty starts out at 1%, i.e. one try in one hundred should succeed and we'll call this a difficulty of 100.<br>
With a 1% chance of success, you could succeed with your first try, but it could also take you 200 tries. However, it wasn't harder or easier to succeed because you were lucky or unlucky! So, however many tries actually took place until the block was found, the block will have a weight of "100 difficulty" when it is found.</p>

<h2>How does Difficulty change?</h2>

<p>Obviously, when people add more computing power to the network, more tries per second will be performed. Since each try has a chance of succeeding (e.g. 1% from above), more computing power will cause a block to be found quicker. This is still a probabilistic process, so sometimes it might be slower than the previous average time, but the new average time will be lower.<br>
If nothing were done about it, the blocks would just get faster and faster, as more mining power gets added to the network.<br>
Therefore, difficulty will readjust automatically every 2016 blocks, that is approx. 14 days at 10 minutes per block. To that end, we calculate:</p>

<ol>
<li>How long did it take to find those last 2016 blocks?</li>
<li>If the total time was shorter than the aim of 14 days, the difficulty increases. If it was slower, the difficulty decreases.</li>
<li>The new difficulty is set such that the next 2016 blocks should take 14 days, if the mining power stays the same as the last 14 days.</li>
</ol>

<p>Let's say, it took only 7 days to find 2016 blocks. The difficulty now doubles to 200.</p>

<h2>How do two blockchain tips compare in "length"?</h2>

<p>Let's say we have two competing blockchain tips: They both start from <strong>Block 1</strong> as a parent, but then there are two different blocks found at the same time: <strong>Block 2A</strong> and <strong>Block 2B</strong>. Both blocks have the same difficulty level, and as we learned above this is independent of when exactly they were found. Therefore, the total difficulty of chain A and B will be the same, as <strong>Block 1 + Block 2A</strong> = <strong>Block 1 + Block 2B</strong>. One of the two chains will have a greater total difficulty once either <strong>Block 3A</strong> or <strong>Block 3B</strong> will be found. Since in general blocks at the same height have the same difficulty statement, the total difficulty of two chains at the same height is the same. This is why many people just talk of the "length" of the chain, to describe which chain has the greatest total difficulty.</p>

<p>The sole exception is when two competing blocks occur at the height of a difficulty retarget: Since they would have slightly different timestamps, the new difficulties for their children could differ, and the one with the higher total difficulty could replace the other even at the same height.</p>

CC BY-SA 3.0
2015-09-07T10:38:36.223Z
2016-02-15T11:41:12.983Z
2016-02-15T11:41:12.983Z
Murch
<p>I tried to read it here: <a href="https://en.bitcoin.it/wiki/Difficulty" rel="nofollow">https://en.bitcoin.it/wiki/Difficulty</a></p>

<p>But it is closer to a rigorous math proof than to an explanation.</p>

<p>I am interested to understand that so I can understand what makes a block or a block chain more difficult than another. It is said that when a bitcoin client starts it chooses the <strong>most difficult</strong> block chain it sees.</p>

<p>Can a smart mind explain that in simple terms?</p>

<blockchain><difficulty>
Can a smart mind explain block difficulty calculation in lay terms?
Peter Mel
# Can a smart mind explain block difficulty calculation in lay terms?

(Asked by: username_0 on 2015-09-05)

I tried to read it here: <https://en.bitcoin.it/wiki/Difficulty>

But it is closer to a rigorous math proof than to an explanation.

I am interested to understand that so I can understand what makes a block or a block chain more difficult than another. It is said that when a bitcoin client starts it chooses the **most difficult** block chain it sees.

Can a smart mind explain that in simple terms?

**Tags:** blockchain, difficulty


---

## 2 answers

### Answer by username_3 on 2015-09-07. Score: 4 | Accepted answer

## Block weight derives from difficulty

The difficulty encodes how likely one try is at producing a valid block. Let's say the difficulty starts out at 1%, i.e. one try in one hundred should succeed and we'll call this a difficulty of 100.  
With a 1% chance of success, you could succeed with your first try, but it could also take you 200 tries. However, it wasn't harder or easier to succeed because you were lucky or unlucky! So, however many tries actually took place until the block was found, the block will have a weight of "100 difficulty" when it is found.

## How does Difficulty change?

Obviously, when people add more computing power to the network, more tries per second will be performed. Since each try has a chance of succeeding (e.g. 1% from above), more computing power will cause a block to be found quicker. This is still a probabilistic process, so sometimes it might be slower than the previous average time, but the new average time will be lower.  
If nothing were done about it, the blocks would just get faster and faster, as more mining power gets added to the network.  
Therefore, difficulty will readjust automatically every 2016 blocks, that is approx. 14 days at 10 minutes per block. To that end, we calculate:

1. How long did it take to find those last 2016 blocks?
2. If the total time was shorter than the aim of 14 days, the difficulty increases. If it was slower, the difficulty decreases.
3. The new difficulty is set such that the next 2016 blocks should take 14 days, if the mining power stays the same as the last 14 days.

Let's say, it took only 7 days to find 2016 blocks. The difficulty now doubles to 200.

## How do two blockchain tips compare in "length"?

Let's say we have two competing blockchain tips: They both start from **Block 1** as a parent, but then there are two different blocks found at the same time: **Block 2A** and **Block 2B**. Both blocks have the same difficulty level, and as we learned above this is independent of when exactly they were found. Therefore, the total difficulty of chain A and B will be the same, as **Block 1 + Block 2A** = **Block 1 + Block 2B**. One of the two chains will have a greater total difficulty once either **Block 3A** or **Block 3B** will be found. Since in general blocks at the same height have the same difficulty statement, the total difficulty of two chains at the same height is the same. This is why many people just talk of the "length" of the chain, to describe which chain has the greatest total difficulty.

The sole exception is when two competing blocks occur at the height of a difficulty retarget: Since they would have slightly different timestamps, the new difficulties for their children could differ, and the one with the higher total difficulty could replace the other even at the same height.


---

### Answer by username_1 on 2015-09-05. Score: 2

> I am interested to understand that so I can understand what makes a block or a block chain more difficult than another. It is said that when a bitcoin client starts it chooses the most difficult block chain it sees.

In order to mine a block, one needs to attach work to the block header. If too many blocks are created, the requirement for work is increased, meaning the difficulty increases. When two chains are compared, the difficulty of each block is totaled up, and the chain with a higher score wins.

> **Comments:**
> **username_2**: Did you care to elaborate on compact form, for my benefit too? :)  

---

