What is the Difficulty in Bitcoin? (2024)

What is the difficulty in Bitcoin?

  • What is the Difficulty in Bitcoin? (1)Greg Walker
  • What is the Difficulty in Bitcoin? (2)
  • Download PDF

Current Difficulty:

82,047,728,459,932.75

Height: 853,134

The difficulty is a number that represents how difficult it is for miners to add new blocks of transactions to the blockchain.

It adjusts every 2 weeks to ensure that it takes 10 minutes (on average) to add new blocks to the blockchain.

Why is the difficulty important?

The difficulty ensures that blocks of transactions are added to the blockchain at regular intervals during mining, even as more miners join the network.

If the difficulty always stayed the same, it would gradually take less and less time to add new blocks to the blockchain as new miners join the network.

So the difficulty adjustments mean that the blockchain gets updated consistently.

When does the difficulty change?

The difficulty adjusts every 2,016 blocks (roughly every 2 weeks)

At this interval, each node takes the expected time for the last 2,016 blocks to be mined (2016 x 10 minutes), and divides it by the actual time it took:

expected / actual20160 / actual

If miners were able to solve each block more quickly than expected; say 9 minutes per block for example, you'd get a number like this

20160 / 18144 = 1.11

Each node then uses this number to adjust the difficulty for the next 2,016 blocks:

difficulty x 1.11 = new difficulty
  • If the number is greater than 1 (blocks were mined quicker than expected), the difficulty increases.
  • If the number is less than 1 (blocks were mined slower than expected) the difficulty decreases.

And that's it. Every miner on the bitcoin network now works with this new difficulty for the next 2,016 blocks.

The difficulty will only adjust by a factor of 4 at most (i.e. a multiplier not greater than 4, or less than 0.25). This is to prevent abrupt changes from one difficulty period to the next.

How does the difficulty control time between blocks?

Okay, I'll start with a simple example, and build on it from there.

1. Simple example

Let's say I give you a range of numbers from 1 to 100.

Now, let's say you are able to randomly generate a number between 1 and 100 once every minute, and your goal is to generate a number below my target number.

So let's say I set the target at 50:

Seeing as you're only able to generate a number once a minute, this should take you 2 minutes on average to find a number below this target value.

But that's too easy. So let's say I lower the target to 20, which means you're only going to be able to generate a winning number 1/5 of the time, or once every 5 minutes:

The lower the target, the more difficult it gets to generate a winning number.

So as you can see, I can use the height of the target to control how long it takes you to find a winning number (depending on how many numbers you are able to generate per minute, of course).

It's not going to be exactly 5 minutes every time, because you could get lucky on your first attempt. However, over the long run it will work out to be 5-minute intervals on average.

So what is the difficulty?

Instead of telling you the target value directly, I could give you the target by dividing the range of numbers with a new number:

This new number is the difficulty, and it's used to modify the height of the target.

Here's the equation for setting the target using the difficulty:

target = max target / difficulty

So now I can use this difficulty value to help me set the target to any level I want:

Therefore, I use the difficulty to control the target, which in turn controls how long it takes for you to generate a winning number below the target.

  • The difficulty is basically another way of representing the current target.
  • The higher the difficulty, the lower the target.

2. Bitcoin example

The difficulty in bitcoin works in exactly the same way – it's used to set a target value, and miners keep generating numbers (hashing their candidate blocks) in the hope that they will find a block hash below the target value:

And seeing as miners are able to generate thousands of numbers (hashes) per second, bitcoin uses extremely large numbers for the target:

And due to the fact that there are now thousands of miners trying to find winning numbers, to ensure that a winning number is found every 10 minutes (instead of every few seconds), the range of successful numbers ends up being absolutely tiny:

Even though that difficulty number looks big, the target is still absurdly difficult to get under. It's like a lottery.

Hexadecimal numbers

Because these target numbers are so big, we typically display them in the shorter hexadecimal format.

That's why block hashes look like this: 000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506

But even though it contains letters, it's still a number. So the target is a hexadecimal value, and miners are trying to get a hexadecimal block hash below the target.

In fact, you can easily convert between hexadecimal and "normal" numbers (aka decimal numbers):

Base Converter

Hexadecimal 000000000004864c000000000000000000000000000000000000000000000000
Decimal 1861311314983800126815643622927230076368334845814253369901973504
Target for block 100,000
Hexadecimal 000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506
Decimal 1533267872647776902154320487930659211795065581998445848740226310
Hash for block 100,000

So that's why you usually see the hash and the target as bunches of numbers and letters – they're in hexadecimal as opposed to decimal (which is what humans are more familiar with).

But just remember that both these decimal and hexadecimal numbers have the same value, and you can easily convert between the two.

Awkwardly, the difficulty is usually given in decimal format, whereas block hashes and targets in hexadecimal:

But as I say, they're both numbers, so you can still work with them if you convert them to the same format.

How do you calculate the difficulty?

The difficulty is calculated by dividing the maximum possible target value by the target for the current block.

The max target is the target that was set for the very first block:

max target = 0x00000000ffff0000000000000000000000000000000000000000000000000000

So to work out the difficulty for block 100,000 for example, we just need to find out what the target for that block was:

target = 0x000000000004864c000000000000000000000000000000000000000000000000

Now, if we convert both of these values decimal and divide them, we get the difficulty:

Base Converter

difficulty = max target / targetdifficulty = 0x00000000ffff0000000000000000000000000000000000000000000000000000 / 0x000000000004864c000000000000000000000000000000000000000000000000difficulty = 26959535291011309493156476344723991336010898738574164086137773096960 / 1861311314983800126815643622927230076368334845814253369901973504difficulty = 14484.162361

So as you can see, the difficulty is just a representation of how far the current target has moved from the maximum possible target value.

Internally in Bitcoin, it's only the target that adjusts. So the difficulty is just a way of representing the change.

How do you calculate the target from the difficulty?

The difficulty is calculated from the target. However, you can always work backwards to calculate the target from the difficulty if you want to.

Let's use the difficulty to work out target for block 100,000.

We'll do it using decimal numbers (mostly), because they're easier to understand.

Here's the difficulty:

bitcoin-cli getblockheader 000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506{"hash" : "000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506",..."height" : 100000,..."difficulty" : 14484.16236123,...}

Lovely.

Now, let's note down the equation we're going to use to find the target:

target = max target / difficulty

Let's get the max target and difficulty ready to insert it in to the equation.

max target = 0x00000000ffff0000000000000000000000000000000000000000000000000000difficulty = 14484.162361
  • The max target is a fixed value; it's the initial target that was set for the very first block.
  • The 0x a prefix is used to signify hexadecimal values (the 0x isn't part of the number). The presence of letters within the value is usually a giveaway (but not always).
  • I got the difficulty from the block header information above.

The max target is currently in hexadecimal format though, so let's convert that to decimal.

Base Converter

max target = 26959535291011309493156476344723991336010898738574164086137773096960

Now we can just plug these numbers in to the equation and away we go:

target = max target / difficultytarget = 26959535291011309493156476344723991336010898738574164086137773096960 / 14484.162361target = 1861311315012765306929610463010191006516769515973403833769533170

Ta da.

So when the miner was trying to solve block 100,000, she wanted to get a hash for her candidate block that would be below 1861311315012765306929610463010191006516769515973403833769533170.

Checking the results

Let's compare this target value with the hash she got for the block to check that she was genuinely successful (i.e. her hash for the block was below the target):

target = 1861311315012765306929610463010191006516769515973403833769533170hash = 0x000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506

Oh yeah, the hash is in hexadecimal format. Let's convert from hexadecimal to decimal again so that we can compare the two numbers:

Base Converter

target = 1861311315012765306929610463010191006516769515973403833769533170hash = 1533267872647776902154320487930659211795065581998445848740226310

Yep, that hash is lower than the target, so the block can be added to the blockchain.

Where can I find the current difficulty?

You can find the current difficulty using the bitcoin-cli getdifficulty command:

Summary

The target is the actual limbo pole that block hashes have to get below for a new block to be added on the blockchain.

The difficulty is just a measure of how much the target has moved from its initial starting value. Or in other words, how much more difficult it is to mine a block compared to when the blockchain first started.

Resources

What is the Difficulty in Bitcoin? (2024)

FAQs

What is the Difficulty in Bitcoin? ›

Current Bitcoin Difficulty

What is the current difficulty of Bitcoin? ›

Basic Info. Bitcoin Average Difficulty is at a current level of 79.50, down from 79.50 yesterday and up from 53.91 one year ago. This is a change of -0.00% from yesterday and 47.46% from one year ago.

What is difficulty in relation to Bitcoin? ›

Cryptocurrency difficulty is a measure of how difficult it is to mine a block in a proof-of-work blockchain. A high cryptocurrency difficulty means it takes additional computing power to verify transactions entered on a blockchain—a process called mining.

What is the difference between target and difficulty in Bitcoin? ›

The target is the actual limbo pole that block hashes have to get below for a new block to be added on the blockchain. The difficulty is just a measure of how much the target has moved from its initial starting value.

What is the difficulty of Bitcoin mining in 2024? ›

Bitcoin mining difficulty dropped significantly by 7.8% on June 5, 2024, reaching levels not seen since before the halving event in April. This marks the largest difficulty drop since the collapse of crypto exchange FTX in 2022.

How many bitcoins are left to mine? ›

According to the Bitcoin protocol, the maximum number of bitcoins that can be created is 21 million. As of March 2023, approximately 18.9 million bitcoins have been mined, meaning there are around 2.1 million bitcoins left to be mined.

Is Bitcoin high or low right now? ›

Bitcoin's price today is US$67,161.57, with a 24-hour trading volume of $34.24 B. BTC is +3.32% in the last 24 hours. It is currently -0.31% from its 7-day all-time high of $67,373.52, and 15.50% from its 7-day all-time low of $58,147.21.

Can Bitcoin difficulty go down? ›

If block time expands, then Bitcoin will automatically decrease the difficulty (and therefore raise the target), and this will return the block times to their average of 10 minutes per block.

How long does it take to mine 1 Bitcoin? ›

On average, it takes around 10 minutes to mine 1 Bitcoin with ideal hardware. However, the time required to mine 1 BTC depends on your hardware and software, especially the mining power. But if you want to mine BTC with an average PC, you will make 0.000000297/year.

Why is Bitcoin getting harder to mine? ›

With more participants and more computing power, the so-called “hashpower” of the entire network increases accordingly. This is also referred to as the mining difficulty or difficulty. Mining difficulty in the Bitcoin network is adjusted automatically after 2,016 blocks have been mined in the network.

How is Bitcoin difficulty calculated? ›

Bitcoin mining difficulty is calculated with various formulas. However, the most common one is: Difficulty Level = Difficulty Target/Current Target. Note that the Difficulty Target is a hexadecimal notation of the target hash whose mining difficulty is 1.

How much does the Bitcoin difficulty increase per month? ›

Bitcoin Difficulty Increase

The BTC mining difficulty increase average in the last 24 hours is 0.00% at block 852,224 on the Bitcoin blockchain network. In the last 7 days the Bitcoin difficulty increase was 0.00%, with the increase in the last 30 days being -5.04%, and the last 90 days is -7.98%.

What is the hardest crypto to mine? ›

Because of its popularity, Bitcoin is one of the most difficult cryptocurrencies to mine profitably. At-home miners often find themselves losing money on equipment and electricity costs while competing with large-scale BTC mining operations.

Why the last Bitcoin will never be mined? ›

The supply of bitcoin is limited to a final cap of 21 million. This is determined by bitcoin's source code which was programmed by its creator(s), Satoshi Nakamoto, and cannot be changed. Once all bitcoin is mined, the amount of coins in circulation will remain fixed at that level permanently.

What year will Bitcoin be fully mined? ›

After all bitcoins are mined, miners will no longer receive block rewards for verifying transactions but will instead earn transaction fees. It's estimated that all bitcoins will be mined by the year 2140, at which point the last block reward will be released.

Is the Bitcoin network slow today? ›

There is no ongoing event on the Bitcoin network.

What is the Bitcoin size problem? ›

Limitations with Bitcoin's Protocol

Block size: A Bitcoin block can only hold 1 megabyte (MB) of data. Block Time: A new Bitcoin block is created approximately every 10 minutes. Throughput: Bitcoin's block size and block time limit allow it to process only three to seven transactions per second.

What is the Bitcoin scale problem? ›

The Bitcoin scalability problem refers to the blockchain's limited ability to process large amounts of data quickly and efficiently. That means every time the network experiences an increased level of activities, users have to wait longer for their transactions to be processed, creating congestion.

Why is Bitcoin hard to value? ›

Why it is hard to value BTC. BTC is difficult to value because it does not generate any cash flow (so it is impossible to apply the good old discounted cash flow model) and is not backed by any assets (other than the mining and nodes infrastructure).

Top Articles
17 Ways to Make a Cozy Living Room Not Feel Cluttered
Can My Boyfriend Tell if I Slept with Someone Else?
WALB Locker Room Report Week 5 2024
Cold Air Intake - High-flow, Roto-mold Tube - TOYOTA TACOMA V6-4.0
Team 1 Elite Club Invite
From Algeria to Uzbekistan-These Are the Top Baby Names Around the World
Craigslist Vermillion South Dakota
Optimal Perks Rs3
Costco in Hawthorne (14501 Hindry Ave)
Imbigswoo
[PDF] INFORMATION BROCHURE - Free Download PDF
The Blind Showtimes Near Showcase Cinemas Springdale
Ladyva Is She Married
ATV Blue Book - Values & Used Prices
Insidekp.kp.org Hrconnect
Love In The Air Ep 9 Eng Sub Dailymotion
Minecraft Jar Google Drive
Michael Shaara Books In Order - Books In Order
Tamilrockers Movies 2023 Download
SF bay area cars & trucks "chevrolet 50" - craigslist
Nordstrom Rack Glendale Photos
Ubg98.Github.io Unblocked
Hyvee Workday
Jenna Ortega’s Height, Age, Net Worth & Biography
Nz Herald Obituary Notices
Kabob-House-Spokane Photos
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
Relaxed Sneak Animations
Unreasonable Zen Riddle Crossword
3 Ways to Drive Employee Engagement with Recognition Programs | UKG
Kuttymovies. Com
Khatrimmaza
Puerto Rico Pictures and Facts
Myhrconnect Kp
Watchdocumentaries Gun Mayhem 2
Pickle Juiced 1234
Indiana Wesleyan Transcripts
Western Gold Gateway
How Much Is Mink V3
Reborn Rich Ep 12 Eng Sub
Scanning the Airwaves
Rochester Ny Missed Connections
301 Priest Dr, KILLEEN, TX 76541 - HAR.com
Alpha Labs Male Enhancement – Complete Reviews And Guide
Divinity: Original Sin II - How to Use the Conjurer Class
Mitchell Kronish Obituary
Satucket Lectionary
Portal Pacjenta LUX MED
Skyward Cahokia
Kjccc Sports
Wvu Workday
Epower Raley's
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated:

Views: 5981

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.