<blockquote>
<p><strong>I'm a beginner in Bitcoin</strong></p>
</blockquote>
<p>Therefore this answer will be a broad overview and simplified.</p>
<blockquote>
<p><strong>What does difficulty actually mean?</strong></p>
</blockquote>
<p>To understand the difficulty number in Bitcoin, you have to understand it's purpose and not just the mathematics of it.</p>
<p>To understand the purpose of the difficulty number, you first need to understand the role of mining and timestamping.</p>
<p>Bitcoin is digital cash and it has no tangible coins. Bitcoin money is kept track of by keeping a record of the transactions. A transaction is a transfer of control over some amounts of money. For example if you give someone <a href="https://bitcointalk.org/index.php?topic=137.msg1195#msg1195" rel="nofollow noreferrer">10000 BTC for two Pizzas</a>, the Bitcoin part of that exchange is a Bitcoin transaction.</p>
<p>It is obviously important that the person who already spent the money isn't allowed spend it again. To prevent that, everyone has to know what transactions already occurred and in what order.</p>
<p>The order is important so that you can decide which of two spends are valid.</p>
<p>For example Joe has 10 BTC</p>
<pre><code>Monday,  Joe gives Sue the 10 BTC 
Tuesday, Joe gives Bob the 10 BTC
</code></pre>
<p>Is different from</p>
<pre><code>Monday,  Joe gives Bob the 10 BTC
Tuesday, Joe gives Sue the 10 BTC 
</code></pre>
<p>We need to know which transaction is accepted and which is fraudulent and should be rejected. This is important to Sue and Bob. Those timestamps (Monday, Tuesday) enable us to do that. This has to work at a global scale so that nodes in Atlanta and Auckland agree.</p>
<p>In Bitcoin it is miners who add transactions to blocks and add blocks to the blockchain. The blockchain is like an accounting journal of transactions and blocks are like pages in that journal.</p>
<p>So miners are ordering the transactions by timestamping the blocks (and by effectively numbering the pages).</p>
<p>Adding a new block is also the way that new amounts of Bitcoin money are created. You can think if it as new Bitcoin &quot;coins&quot; being created. This money is created as a reward for the miners.</p>
<p>Bitcoin's designers wanted a new page to be written every ten minutes. The rate is important because it affects inflation in the currency. The rate must also be fast enough that recipients can quickly see they have been paid. The rate must be slow enough that every node can keep up with receiving and checking new pages (new blocks).</p>
<p>However producing a new block could be a trivial amount of work, so greedy people might mine 1000000 blocks a second to scoop up all the mining rewards. They would quickly run away with vast amounts of money. Therefore the mining is made difficult.</p>
<p>How difficult it needs to be depends on how much computing power all the miners have at any moment. If there are more miners with better computers, we need to increase the difficulty of mining so that they can't produce more than a block every 10 minutes on average.</p>
<p>The difficulty number is the inverse of a target number, higher difficulties correspond to smaller targets.</p>
<p>Miners construct a block (a page in the transaction journal) and then calculate a hash of that block. This hash is a very large number that has to be less than the current target number.</p>
<p>About every two weeks, all Bitcoin nodes (wallets, miners, etc) recalculate the difficulty based on the average time between blocks in the last two weeks. If the average is less than 10 minutes, the difficulty is increased proportionately; if more, decreased. From then on nodes reject any blocks from miners that don't have a hash less than the new target.</p>
<p>This prevents double spending and ensures a wealthy miner can't take over mining and commit fraud.</p>
<blockquote>
<p><strong>When the difficulty is 6, then what I can know from that number?</strong></p>
</blockquote>
<p>You could calculate the target. You could see that new blocks have a hash smaller than that target.</p>

CC BY-SA 4.0
2021-05-18T15:55:12.980Z
Thanks @RedGrittyBrick for your detailed answer. You helped me to have a sense of what the difficulty is!
Hmm, I'm a little confused that with a specific target, and the difficulty is 1, then is there any useful information that I can retrieve from that? It may be about computation power, speed, or something like that
Thank you so much
Lucas
CC BY-SA 4.0
2021-05-18T12:20:45.043Z
2021-05-18T16:47:33.440Z
2021-05-18T16:47:33.440Z
RedGrittyBrick
<p>Suppose I give you some very complicated function <code>f()</code>, and I assign you the task of finding an input <code>n</code> with the property that <code>f(n)</code> is small.  That can be difficult.  I can make it more difficult by changing the definition of &quot;small&quot;.  If I ask you to find an <code>n</code> such that <code>f(n)&lt; 100</code>, that's difficult.  If I ask you to find an <code>n</code> such that <code>f(n)&lt; 90</code>, that's more difficult.</p>
<p>Once you've compiled a block, you're confronted with a function <code>f()</code>.  The function itself depends both on the block you've just compiled and the solution someone found for the problem associated with the preceding block.  Successfully mining the block means finding an <code>n</code> such that <code>f(n)</code> is small.  The only way that anybody knows to solve this problem is by trial and error.</p>
<p>The definition of &quot;small&quot; is periodically adjusted.  That definition of &quot;small&quot; is what people mean by &quot;difficulty&quot;.</p>

CC BY-SA 4.0
2021-05-18T11:45:44.887Z
2021-05-18T11:47:49.260Z
2021-05-18T11:47:49.260Z
WillO
<p>A simple way to think about bitcoin's mining &quot;difficulty&quot; is to remember that purpose of the difficulty (which is re-assessed/changed every 2016 blocks - about 2 weeks), is to keep the bitcoin block issuance time at 10 minutes.</p>
<p>The difficulty determines how much work the bitcoin miners have to do in order to solve the &quot;puzzle&quot; in order to create a new and valid block. If more hashrate gets added to the network, then the blocks get created faster than 10 minutes. So at the next difficulty adjustment, the difficulty will increase so that the block time (on average) will take 10 minutes. Conversely if hashrate leaves the network then blocktimes slow down, so at the next adjustment period, the difficulty reduces, returning the average block time to 10 minutes.</p>
<p>It's very clever and one of Satoshi's unique innovations that makes the protocol self-regulating!</p>

CC BY-SA 4.0
2021-05-18T20:26:00.840Z
2021-05-18T20:26:00.840Z
WizardofAus
<p>Difficulty adjustment is one of the critical features of Bitcoin that Satoshi implemented. It basically means - adjusting the bitcoin block time to ~ 10 minutes as programmed.</p>
<p>Think of it this way - if suddenly more miners join in then there would be more hash power and blocks would be mined quicker then before (less then 10 minutes) - the difficulty adjustment, that happens every 2016 blocks (~2 weeks) would raise the difficulty of mining making if harder to find the block eventually raising the block time back to ~10 mins.</p>
<p>The same thing applies if there are miners leaving (shutting of their miners) - then there would be less hashpower resulting in slower block times (more then 10 minutes) so the difficulty would lower making it easier for the remaining miners to find the block eventually lowering the block time to ~ 10 minutes.</p>
<blockquote>
<p>Ex: When the difficulty is 6, then what I can know from that number?</p>
</blockquote>
<p>Difficulty is measured in % of change, the current difficulty change is estimated at -10%, meaning it will be 10% easier to mine a block in the next difficulty epoch (each epoch is 2016 blocks)</p>
<p>check it out here <a href="https://bitcoin.clarkmoody.com/dashboard/" rel="nofollow noreferrer">https://bitcoin.clarkmoody.com/dashboard/</a>
<a href="https://i.sstatic.net/i842q.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/i842q.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-05-18T07:30:15.780Z
2021-05-18T07:30:15.780Z
Potapac
<p>I'm a beginner in Bitcoin and Blockchain technology, so I have a question after reading about the difficulty in Bitcoin mining:</p>
<p><strong>What does the difficulty actually mean?</strong></p>
<p>I read that</p>
<blockquote>
<p>A high difficulty means that it will take more computing power to mine
the same number of blocks, making the network more secure against
attacks</p>
</blockquote>
<p>However, I don't clearly understand.</p>
<p>Ex: When the difficulty is 6, then what I can know from that number?</p>

CC BY-SA 4.0
2024-10-25T04:42:45.250Z
This question is similar to: [What is "difficulty" and how it relates to "target"?](https://bitcoin.stackexchange.com/questions/8806/what-is-difficulty-and-how-it-relates-to-target). If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.
bca-0353f40e
<blockchain><difficulty>
What is the meaning of difficulty in Bitcoin mining?
Lucas
# What is the meaning of difficulty in Bitcoin mining?

(Asked by: username_0 on 2021-05-18)

I'm a beginner in Bitcoin and Blockchain technology, so I have a question after reading about the difficulty in Bitcoin mining:

**What does the difficulty actually mean?**

I read that

> A high difficulty means that it will take more computing power to mine
> the same number of blocks, making the network more secure against
> attacks

However, I don't clearly understand.

Ex: When the difficulty is 6, then what I can know from that number?

**Tags:** blockchain, difficulty

> **Comments:**
> **username_1**: This question is similar to: [What is "difficulty" and how it relates to "target"?](https://bitcoin.stackexchange.com/questions/8806/what-is-difficulty-and-how-it-relates-to-target). If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.  

---

## 4 answers

### Answer by username_2 on 2021-05-18. Score: 0

> **I'm a beginner in Bitcoin**

Therefore this answer will be a broad overview and simplified.

> **What does difficulty actually mean?**

To understand the difficulty number in Bitcoin, you have to understand it's purpose and not just the mathematics of it.

To understand the purpose of the difficulty number, you first need to understand the role of mining and timestamping.

Bitcoin is digital cash and it has no tangible coins. Bitcoin money is kept track of by keeping a record of the transactions. A transaction is a transfer of control over some amounts of money. For example if you give someone [10000 BTC for two Pizzas](https://bitcointalk.org/index.php?topic=137.msg1195#msg1195), the Bitcoin part of that exchange is a Bitcoin transaction.

It is obviously important that the person who already spent the money isn't allowed spend it again. To prevent that, everyone has to know what transactions already occurred and in what order.

The order is important so that you can decide which of two spends are valid.

For example Joe has 10 BTC

```
Monday,  Joe gives Sue the 10 BTC 
Tuesday, Joe gives Bob the 10 BTC

```

Is different from

```
Monday,  Joe gives Bob the 10 BTC
Tuesday, Joe gives Sue the 10 BTC 

```

We need to know which transaction is accepted and which is fraudulent and should be rejected. This is important to Sue and Bob. Those timestamps (Monday, Tuesday) enable us to do that. This has to work at a global scale so that nodes in Atlanta and Auckland agree.

In Bitcoin it is miners who add transactions to blocks and add blocks to the blockchain. The blockchain is like an accounting journal of transactions and blocks are like pages in that journal.

So miners are ordering the transactions by timestamping the blocks (and by effectively numbering the pages).

Adding a new block is also the way that new amounts of Bitcoin money are created. You can think if it as new Bitcoin "coins" being created. This money is created as a reward for the miners.

Bitcoin's designers wanted a new page to be written every ten minutes. The rate is important because it affects inflation in the currency. The rate must also be fast enough that recipients can quickly see they have been paid. The rate must be slow enough that every node can keep up with receiving and checking new pages (new blocks).

However producing a new block could be a trivial amount of work, so greedy people might mine 1000000 blocks a second to scoop up all the mining rewards. They would quickly run away with vast amounts of money. Therefore the mining is made difficult.

How difficult it needs to be depends on how much computing power all the miners have at any moment. If there are more miners with better computers, we need to increase the difficulty of mining so that they can't produce more than a block every 10 minutes on average.

The difficulty number is the inverse of a target number, higher difficulties correspond to smaller targets.

Miners construct a block (a page in the transaction journal) and then calculate a hash of that block. This hash is a very large number that has to be less than the current target number.

About every two weeks, all Bitcoin nodes (wallets, miners, etc) recalculate the difficulty based on the average time between blocks in the last two weeks. If the average is less than 10 minutes, the difficulty is increased proportionately; if more, decreased. From then on nodes reject any blocks from miners that don't have a hash less than the new target.

This prevents double spending and ensures a wealthy miner can't take over mining and commit fraud.

> **When the difficulty is 6, then what I can know from that number?**

You could calculate the target. You could see that new blocks have a hash smaller than that target.

> **Comments:**
> **username_0**: Thanks @username_2 for your detailed answer. You helped me to have a sense of what the difficulty is! Hmm, I'm a little confused that with a specific target, and the difficulty is 1, then is there any useful information that I can retrieve from that? It may be about computation power, speed, or something like that Thank you so much  

---

### Answer by username_3 on 2021-05-18. Score: 0

Suppose I give you some very complicated function `f()`, and I assign you the task of finding an input `n` with the property that `f(n)` is small. That can be difficult. I can make it more difficult by changing the definition of "small". If I ask you to find an `n` such that `f(n)< 100`, that's difficult. If I ask you to find an `n` such that `f(n)< 90`, that's more difficult.

Once you've compiled a block, you're confronted with a function `f()`. The function itself depends both on the block you've just compiled and the solution someone found for the problem associated with the preceding block. Successfully mining the block means finding an `n` such that `f(n)` is small. The only way that anybody knows to solve this problem is by trial and error.

The definition of "small" is periodically adjusted. That definition of "small" is what people mean by "difficulty".


---

### Answer by username_4 on 2021-05-18. Score: 0

A simple way to think about bitcoin's mining "difficulty" is to remember that purpose of the difficulty (which is re-assessed/changed every 2016 blocks - about 2 weeks), is to keep the bitcoin block issuance time at 10 minutes.

The difficulty determines how much work the bitcoin miners have to do in order to solve the "puzzle" in order to create a new and valid block. If more hashrate gets added to the network, then the blocks get created faster than 10 minutes. So at the next difficulty adjustment, the difficulty will increase so that the block time (on average) will take 10 minutes. Conversely if hashrate leaves the network then blocktimes slow down, so at the next adjustment period, the difficulty reduces, returning the average block time to 10 minutes.

It's very clever and one of Satoshi's unique innovations that makes the protocol self-regulating!


---

### Answer by username_5 on 2021-05-18. Score: -1

Difficulty adjustment is one of the critical features of Bitcoin that Satoshi implemented. It basically means - adjusting the bitcoin block time to ~ 10 minutes as programmed.

Think of it this way - if suddenly more miners join in then there would be more hash power and blocks would be mined quicker then before (less then 10 minutes) - the difficulty adjustment, that happens every 2016 blocks (~2 weeks) would raise the difficulty of mining making if harder to find the block eventually raising the block time back to ~10 mins.

The same thing applies if there are miners leaving (shutting of their miners) - then there would be less hashpower resulting in slower block times (more then 10 minutes) so the difficulty would lower making it easier for the remaining miners to find the block eventually lowering the block time to ~ 10 minutes.

> Ex: When the difficulty is 6, then what I can know from that number?

Difficulty is measured in % of change, the current difficulty change is estimated at -10%, meaning it will be 10% easier to mine a block in the next difficulty epoch (each epoch is 2016 blocks)

check it out here <https://bitcoin.clarkmoody.com/dashboard/>
[![enter image description here](https://i.sstatic.net/i842q.png)](https://i.sstatic.net/i842q.png)


---

