How Does Bitcoin Mining Work? (2024)

What Is Bitcoin Mining?

Bitcoin mining is the process by which transactions are officially entered on the blockchain. It is also the way new Bitcoins are entered into circulation. Mining is conducted using hardware and software to generate a cryptographic number that is equal to or less than a number set by the Bitcoin network's difficulty algorithm.

The first miner to find the solution to the problem receives the Bitcoin reward, and the process begins again. The Bitcoin reward miners receive is an incentive that motivates them to assist in the primary purpose of mining: to earn the right to record transactions on the blockchain for the network to verify and confirm.

Before investing time and equipment, read this explainer to see whether mining is really for you.

Key Takeaways

  • Bitcoin miners receive Bitcoin as a reward for creating new "blocks" which are added to the blockchain.
  • Mining rewards are paid to the miner(s) who discovers a solution, and the probability that a participant will be the one to discover the solution is related to the network's total mining capacity.
  • You need a graphics processing unit (GPU) oran application-specific integrated circuit(ASIC) to set up a miner.

Throughout, we use "Bitcoin" with a capital "B" when referring to the network or the cryptocurrency as a concept, and "bitcoin" with a small "b" when we're referring to a quantity of individual tokens.

Why Bitcoin Needs Miners

Blockchain "mining" is a metaphor for the computational work that network nodes undertake to validate the information contained in blocks. So, in reality, miners are essentially getting paid for their work as auditors. They are conducting the first verification for Bitcoin transactions, opening a new block, and being rewarded.

Only 1 megabyte of transaction data can fit into a single Bitcoin block. The 1MB limit was set by the creators. This limit has become controversial because some miners believe the block size should increase to accommodate more data, which would effectively mean that the Bitcoin network could process and verify transactions more quickly.

Why Mine Bitcoin?

One of the primary reasons people invest time and money in mining is for the reward, which, over time, has become very valuable. For example, on March 8, 2024, Bitcoin's price topped $70,000 for the first time, closing at $68,285. The reward at the time was 6.25 bitcoin—at closing, that reward was worth $426,781.25.

However, the rewards for Bitcoin mining are cut in half every four years. When Bitcoin was first mined in 2009, mining one block would earn you 50 BTC. In 2012, this was halved to 25 BTC. By 2016, this was halved again to 12.5 BTC. On May 11, 2020, therewardhalved again to 6.25BTC. The reward is predicted to halve again in April 2024 to 3.125 BTC.

Due to the halving process and increasing prices, miners want to receive as many bitcoins as possible because the supply of new coins is slowly dwindling. Sometime around 2140, there will be no more new bitcoins created.

The competitive incentive to mine will disappear, with only the transaction fees remaining as a reason to participate in Bitcoin's network. Some miners might still participate to take part in a decentralized currency, but it's likely that without the reward, most people will not want to mine unless the fees increase enough to make it worth their while.

How Does Bitcoin Mining Work? (1)

If you want to estimate how much bitcoin you could mine with your rig's hash rate, the mining pool NiceHash offers a helpful calculator on its website. Other web resources provide similar tools.

What You Need to Mine Bitcoin

The majority of the Bitcoin network capacity is owned by large mining firms and pools. It is still possible to participate in Bitcoin mining with a regular at-home personal computer if you have one of the latest and fastest graphics processing units. However, the chances of receiving any rewards mining on your own with a single GPU in your computer at home are minuscule. You'll need to find a mining pool (discussed later) to increase your chances.

For instance, a card you can purchase for a couple of thousand dollars would represent less than 0.001% of the network's mining power.With such a slight chance of finding the next block, it could be a long time—if ever—before you solve a hash because it's all about how many hashes per second your machine can generate.You may never recoup your investment.

Mining Hardware

To be able to mine, you'll need to invest in one of the top graphics processing units (GPUs, often called video cards) for your computer or an application-specific integrated circuit (ASIC). Capable GPUs can range in price from about $1,000 to $2,000; ASICs can cost much more, into the tens of thousands of dollars.

Today, most of the Bitcoin mining network's hashing power is almost entirely made up of ASIC machine mining farms and pooled individual miners. Today's ASICs are many orders of magnitude more powerful than CPUs or GPUs. They gain more hashing power and energy efficiency every year as new chips are developed and deployed. For the right price (more than $11,000), you could mine at 335TH for 16.0 joules per tera hash (16 watts at one trillion hashes per second). There are much more affordable versions, but the more you pay, the faster you can hash.

What Are Mining Pools?

Mining pools are operated bythird partiesand coordinate groups of miners.By working together in a pool and sharing the payouts among all participants, miners have a better chance of being rewarded than alone.

Most pools use a payout system based on how much work you contribute. For instance, if you have a GPU providing 121 mega (million) hashes per second and the pool has a total hash rate of 121 exa (quintillion) hashes per second, your reward would be based on the shares of work you contributed (and be very small).

The Mining Process

Mining is a complex process, but in a nutshell, when a transaction is made between wallets, the addresses and amount is entered into a block on the blockchain. The block is assigned some information, and all of the data in the block is put through a cryptographic algorithm (called "hashing"). The result of being hashed is a 64-digit hexadecimal number (called a hash).

The Hash

Here is an example of a hash:

0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee

The number above has 64 digits. As you probably noticed, that number consists not just of numbers but also letters. Why is that?

The decimal system uses factors of 100 as its base (e.g., 1% = 0.01). This, in turn, means that every digit of a multi-digit number has 100 possibilities, zero through 99. In computing, the decimal system is simplified to base 10, or the numbers zero through nine.

"Hexadecimal," on the other hand, means base 16 because "hex" is derived from the Greek word for six, and "deca" is derived from the Greek word for 10.In a hexadecimal system, each digit has 16 possibilities. However, our numeric system only offers 10 ways of representing numbers (zero through nine). That's why you have to add letters—specifically, the letters A, B, C, D, E, and F.

How Does Bitcoin Mining Work? (2)

Target Hash and Nonce

Miners are guessing a number that is lower than the target hash. The target hash is a hexadecimal number set to require an average number of attempts.

Miners make these guesses byadding "nonces" to the information being hashed. "Nonce" is short for "number only used once," and it is the key to generating these 64-bit hexadecimal numbers.

When information is hashed, it always produces the same output unless something changes. So, the mining program sends block information with a zero as the first nonce through the hashing function. If that number is wrong, the nonce is increased by a value of one, and the hash is generated again. This continues until a hash that is less than the target hash is generated.

Here are some examples of hashes and the criteria for whether they would lead to success for the miner:

How Does Bitcoin Mining Work? (3)

Hash Example

So, if you were to hash "Hello World!" using an online SHA256 generator, you might get:

7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069

Add a digit to the end, like "Hello World!0" and rehash it. You might get:

e59f8bdf1305e382a4919ccefd613d3eebae612aa4c443f3af2d65663de3b075

Then, increase the number by one—"Hello World!1" and rehash it. You might get:

9e2be792bcd092bd5ab7bdac7bda1ae5d0db9f6d052a3c819615900c7c06e9be

This is mining, but it's done automatically by the mining program. It takes trillions of attempts for the network of miners to find the solution.

The screenshot below, taken from the site Blockchain.info, might help you put all this information together at a glance. You are looking at a summary of everything that happened when block No.490163 was mined. The nonce that generated the "winning" hash was 731511405 (remember, the nonce starts at zero and increases by one every attempt). The target hash is shown on top. The term "Relayed by AntPool" refers to the fact that this particular block was completed by AntPool, one of the more successful mining pools.

As you see here, the contribution to the Bitcoin community is that the pool confirmed 1,768 transactions for this block. If you really want to see all 1,768 transactions for this block, go to this page and look through the Transactions section.

How Does Bitcoin Mining Work? (4)

You'll also notice the difficulty level for this block. The Bitcoin network aims to produce one block every 10 minutes or so. The system is designed to evaluate and adjust the mining difficulty every 2,016 blocks or roughly every two weeks (based on the number of participants). This doesn't always result in a blocktime of 10 minutes, but it's close.

The mining difficulty number represents 2,016 divided by the average time it took to mine one block in the last period, multiplied by the old difficulty level, or:

= Old difficulty x ( 2,016 ÷ average time to mine in the last period )

The lowest difficulty level is 1.0—the higher the number is, the more difficult the solution is to find. The difficulty level on March 9, 2024 (measured on March 7) was 79.35 trillion. You might see this published as 79.35T.

Downsides of Mining

The risks of mining are generally financial. Bitcoin mining requires that you go through all the effort of purchasing hundreds or thousands of dollars worth of equipment only to have the possibility of no return on your investment.

In some jurisdictions, mining and using Bitcoin is not legal. It may be a good idea to research your country's regulatory stance and overall sentiment toward cryptocurrency before investing in mining equipment.

There are several concerns about Bitcoin mining's environmental impacts and carbon footprint. For instance, the energy required by the network is vast, approximated by some to equal the energy used by smaller countries.

Though microchip efficiency has increased dramatically for ASICs, large mining firms generate a large amount of electronic waste (e-waste) as they continually upgrade their equipment to meet the ever-growing hashing speeds needed to remain competitive. Digiconmist estimates that the amount of e-waste created annually is 27.66 kilotons.

Mining equipment also generates a lot of heat, so your cooling bill will likely increase—especially if you have one or more ASICs running 24 hours daily.

There are, however, efforts to mitigate this negative externality by seeking cleaner and green energy sources for mining operations (such as geothermal or solar sources) and utilizing carbon offset credits.

Switching to less energy-intensive consensus mechanisms like proof-of-stake (PoS), which Ethereum has transitioned to, is another strategy; however, PoS comes with its own set of drawbacks and inefficiencies, such as incentivizing hoarding instead of using coins and a risk of centralizing consensus control.

How Long Does It Take to Mine 1 Bitcoin?

The Bitcoin reward is expected to be cut in half in April 2024 to 3.125 every 10 minutes. In 2028, 1.5 bitcoin will be mined every 10 minutes; in 2032, it will take 10 minutes to mine 0.78 bitcoin.

Is Bitcoin Mining Legal?

In many jurisdictions, Bitcoin mining is legal. However, there are still some countries where it is illegal, so it's important to check the activity's status in your country before you start mining.

Does Bitcoin Mining Actually Pay?

Bitcoin mining can be profitable if you contribute enough hashing power to a mining pool to receive larger rewards. If you're solo mining at home on your computer, you might never see any rewards.

Is It Still Profitable to Mine Bitcoin?

You can still receive rewards by joining a mining pool, but because the reward halves over time and you're competing with businesses that specialize in mining, the chances of profit continue to fall.

The Bottom Line

Bitcoin "mining" serves the crucial function of validating and confirming new transactions on the blockchain. It is also the way that new Bitcoins are introduced into the system. It is possible to mine on various hardware and machines, but for a chance of profitability and to be competitive, you'll need to join a mining pool.

How Does Bitcoin Mining Work? (2024)

FAQs

How Does Bitcoin Mining Work? ›

Bitcoin mining is an energy-intensive process involving mining devices and software that compete to solve a cryptographic problem. The Bitcoin mining process also confirms transactions on the cryptocurrency's network. As an incentive to participate in the process, bitcoin is rewarded to those that win the competition.

How does Bitcoin mining work? ›

Mining is conducted by miners using hardware and software to generate a cryptographic number that is equal to or less than a number set by the Bitcoin network's difficulty algorithm. The first miner to find the solution to the problem receives bitcoins as a reward, and the process begins again.

How does Bitcoin mining solve the problem? ›

Bitcoin miners solve “math problems” using the Proof of Work consensus mechanism. The whole process involves finding a nonce, which when hashed with the SHA-256 algorithm, produces a value that meets a difficulty level set by the Bitcoin network.

How effective is Bitcoin mining? ›

With the right setup, Bitcoin mining is profitable. However, there is no definitive way to know how much money you will make from Bitcoin mining. This is because there are many variables that can determine profitability. For a start, you'll need to purchase Bitcoin mining equipment – known as ASICs.

What is the Bitcoin mining math problem? ›

They perform calculations in order to be the first to guess a 64-digit hexadecimal number known as a nonce. The successful miner is rewarded with freshly-mined Bitcoins and transaction fees. An algorithm regulates how difficult it is for the miners to mine a certain block.

Does Bitcoin mining give you real money? ›

If a miner is able to successfully add a block to the blockchain, they will receive 3.125 bitcoins as a reward. The reward amount is cut in half roughly every four years, or every 210,000 blocks. As of April 2024, Bitcoin traded at around $63,000, making 3.125 bitcoins worth $196,875.

How much money do you need to mine Bitcoin? ›

Mining a Bitcoin depends on your energy rate per Kwh, it costs $11,000K to mine a Bitcoin at 10 cents per Kwh and $5,170K to mine a Bitcoin at 4.7 cents per Kwh. Learn how and if mining right for you in 2024! As Bitcoin's price goes up, so do the miners' prices.

Is bitcoin mining legal? ›

Is bitcoin mining legal? According to TheStreet, reporting on a November 2021 Law Library of Congress report, bitcoin mining is banned in various countries, such as Bangladesh, China, Egypt, Iraq, Morocco, Nepal, Qatar, and more. However, it is legal in the US, and most countries, but not all US states allow the same.

What happens to Bitcoin when it's all mined? ›

After all 21 million bitcoin are mined, which is estimated to occur around the year 2140, the network will no longer produce new bitcoin. The block subsidy will go to zero but miners will continue to receive transaction fees, which will make up an ever greater portion of the block reward.

How long does it take to mine 1 Bitcoin? ›

The shortest possible time to mine 1 Bitcoin is about 10 minutes. This is because a new block is added to the Bitcoin blockchain approximately every 10 minutes. When a miner adds a new block to the Bitcoin blockchain, they receive a 3.125 BTC reward (approx. $207,000 as of writing).

Can you lose on Bitcoin mining? ›

However, that doesn't mean mining is always a losing proposition. These calculations can change if the price of electricity goes down, or the value of Bitcoin goes up. If you believe Bitcoin's value will rise over time, you may think of your month-to-month losses as a long-term investment.

How much electricity does Bitcoin mining use? ›

Our preliminary estimates suggest that annual electricity use from cryptocurrency mining probably represents from 0.6% to 2.3% of U.S. electricity consumption. This additional electricity use has drawn the attention of policymakers and grid planners concerned about its effects on cost, reliability, and emissions.

How does Bitcoin make money? ›

How Does Bitcoin Make Money? Miners on the Bitcoin network can be rewarded by successfully opening blocks. Bitcoins are exchangeable for fiat currency via cryptocurrency exchanges. Investors and speculators can make money from trading bitcoins.

Can one person mine Bitcoin? ›

It is almost impossible for an individual to mine 1 bitcoin on their own due to the high competition and the vast amount of computational power required.

Who pays bitcoin miners? ›

Miner fees are amounts of cryptocurrency given to incentivize miners (and their operators) to confirm transactions. Miners are the special pieces of hardware that confirm and secure transactions on the network. Miner fees pay miners for the service they provide. Miner fees do not go to BitPay.

What are bitcoin miners actually solving? ›

Bitcoin mining is an energy-intensive process involving mining devices and software that compete to solve a cryptographic problem. The Bitcoin mining process also confirms transactions on the cryptocurrency's network. As an incentive to participate in the process, bitcoin is rewarded to those that win the competition.

How long does it take to mine one Bitcoin? ›

How long does it take to mine one Bitcoin? It takes around 10 minutes to mine just one Bitcoin, though this is with ideal hardware and software, which isn't always affordable and only a few users can boast the luxury of. More commonly and reasonably, most users can mine a Bitcoin in 30 days.

What happens when all bitcoins are mined? ›

After all 21 million bitcoin are mined, which is estimated to occur around the year 2140, the network will no longer produce new bitcoin. The block subsidy will go to zero but miners will continue to receive transaction fees, which will make up an ever greater portion of the block reward.

How many Bitcoin are there left to mine? ›

Why should you know how many bitcoins exist and how many are left to mine? Limited Supply: Bitcoin has a maximum supply of 21 million coins, and as of March 2023, more than 19 million have been mined. Remaining bitcoins: There are approximately 1.5 million bitcoins left to be mined.

Can I mine Bitcoin for free? ›

Bitcoin mining applications– Bitcoin mining applications offer free Bitcoin. These applications allow users to mine Bitcoin without any upfront investment. Crypto credit card– A few crypto credit cards provide rewards to users, through which free Bitcoin can be earned.

Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 6810

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.