---
title: "How Bitcoin Mining Works: Hashing, Difficulty, and Rewards"
date: 2026-04-21
author: "Barry Elad"
featured_image: "https://coinlaw.io/wp-content/uploads/2026/04/how-bitcoin-mining-works.jpg"
categories:
  - name: "Cryptocurrency"
    url: "/crypto.md"
tags:
  - name: "Insights"
    url: "/tag/insights.md"
---

# How Bitcoin Mining Works: Hashing, Difficulty, and Rewards

Every ten minutes, thousands of machines race to solve a mathematical puzzle that no human could crack, and the winner earns the right to add the next page to Bitcoin’s permanent ledger. This process, known as Bitcoin mining, secures a network that now holds over **$1.3 trillion** in value while consuming more electricity than some nations. Whether you are trying to understand the technology behind Bitcoin or evaluating whether mining is still profitable, this guide breaks down exactly how Bitcoin mining works, from the SHA-256 hash function to the halving schedule that controls supply.

## Key Takeaways

- Bitcoin mining uses a [proof-of-work consensus mechanism](https://coinlaw.io/proof-of-work-vs-proof-of-stake-statistics/) where miners compete to find a valid hash below a target threshold set by the network
- The **SHA-256** hashing algorithm processes block data billions of times per second, with miners adjusting a nonce value each attempt until a valid hash is found
- Mining difficulty adjusts every **2,016 blocks** (approximately 14 days) to maintain an average block time of 10 minutes, regardless of how much computing power joins or leaves the network
- The block reward halves every **210,000 blocks** (roughly 4 years), dropping from **50 BTC** in 2009 to **3.125 BTC** after the April 2024 halving
- Bitcoin mining consumes an estimated **150 TWh** per year, though the share of renewable energy sources in the mining mix has grown to approximately **54.5%** as of 2024
- Solo mining is virtually impossible for individual operators today, with over **99%** of miners working through mining pools to receive consistent payouts

## What Is Bitcoin Mining?

Bitcoin mining is the process by which new [Bitcoin](https://coinlaw.io/bitcoin-statistics/) transactions are validated and added to the blockchain. Miners use specialized computers to solve cryptographic puzzles, and the first miner to find a valid solution gets to add the next block of transactions to the chain. In return, that miner receives a block reward (currently **3.125 BTC**) plus any transaction fees included in the block.

Mining serves two critical functions simultaneously. First, it processes and confirms transactions without requiring a bank or payment processor. Second, it controls the issuance of new Bitcoin according to a fixed, predictable schedule that no single entity can change. This dual role is what makes Bitcoin a trustless system: participants do not need to trust each other or any central authority because the math enforces the rules.

The term “mining” is an analogy to gold mining. Just as extracting gold requires energy and effort, producing new Bitcoin requires computational work. The key difference is that Bitcoin’s supply schedule is entirely predetermined. There will only ever be **21 million BTC**, and the rate of new issuance decreases over time through a mechanism called halving.

## How Bitcoin Mining Works: The Step-by-Step Process

The mining process follows a precise sequence that repeats roughly every 10 minutes. Understanding each step reveals why the system is both secure and energy-intensive.

StepActionTechnical Detail1Collect pending transactionsMiners pull unconfirmed transactions from the mempool and assemble them into a candidate block (up to ~4 MB with SegWit)2Build the block headerThe header includes the previous block hash, Merkle root of transactions, timestamp, difficulty target, and a nonce (starting at 0)3Hash the block headerThe miner runs the block header through the **SHA-256** algorithm twice (double SHA-256), producing a 256-bit output4Check the resultIf the resulting hash is below the current difficulty target, the block is valid. If not, increment the nonce and repeat Step 35Broadcast the valid blockThe winning miner broadcasts the block to the network. Other nodes verify the block independently before accepting it6Receive the rewardThe coinbase transaction in the block awards the miner **3.125 BTC** (post-April 2024 halving) plus accumulated transaction fees7Network moves to next blockAll miners discard their current work and begin competing for the next block using the new block’s hash as their reference*Source: Bitcoin Whitepaper, Bitcoin Core Documentation*

A miner may attempt billions of nonce values before finding a valid hash. When the nonce range is exhausted (all **4.3 billion** 32-bit values), miners modify the coinbase transaction or extra nonce field and start over. Modern ASIC miners can perform over **100 trillion hashes per second** (100 TH/s), yet finding a valid block still takes the entire network an average of 10 minutes collectively.

## How SHA-256 Hashing Works in Bitcoin

**SHA-256** (Secure Hash Algorithm 256-bit) is a cryptographic function developed by the NSA and published by NIST in 2001. It takes any input data and produces a fixed 256-bit (64-character hexadecimal) output. Three properties make Bitcoin’s security essential.

First, it is deterministic: the same input always produces the same output. Second, it is a one-way function: you cannot reverse-engineer the input from the output. Third, it is avalanche-sensitive: changing even a single bit of input produces a completely different hash. These properties mean the only way to find a hash below a given target is brute-force trial and error.

Consider a simplified example. Suppose the network requires a hash starting with four zeros. The miner hashes the block header with nonce = 0 and gets a random-looking result. Then nonce = 1, nonce = 2, and so on, each time producing an entirely different hash. Eventually, one nonce value produces a hash like 0000a3f7b… that meets the target. That single valid result is trivially easy for other nodes to verify (just hash the same input once), but finding it required enormous computational effort.

The current Bitcoin network hash rate exceeds **700 EH/s** (exahashes per second), meaning the collective network performs roughly **700 quintillion** SHA-256 calculations every second. Our coverage of [Bitcoin mining history](https://coinlaw.io/history-of-bitcoin/) traces how this figure grew from a single CPU in 2009 to today’s industrial-scale operations.

## Mining Difficulty and the Adjustment Mechanism

Bitcoin’s difficulty adjustment is one of its most elegant engineering decisions. Every **2,016 blocks** (approximately every two weeks), the network automatically recalculates how hard the mining puzzle should be. If the previous 2,016 blocks were mined faster than the 20,160-minute target (10 minutes per block), the difficulty increases. If they were mined more slowly, the difficulty would decrease.

This self-regulating mechanism ensures that blocks are produced at a roughly consistent rate regardless of how many miners participate. When Bitcoin’s price rises, and more miners join the network, difficulty increases to compensate. When unprofitable miners shut down, difficulty drops to make mining easier for those who remain.

The difficulty target is a 256-bit number. A valid block hash must be numerically less than this target. A lower target means fewer valid hashes exist, which means more guesses are required on average. In April 2024, Bitcoin’s difficulty reached an all-time high above **86 trillion**, meaning a miner needed to perform roughly 86 trillion hash calculations on average to find a single valid block.

This mechanism also protects the network against attacks. To consistently produce blocks faster than the honest network, an attacker would need to control more than **50%** of the total hash rate. At current levels, that would require an investment measured in billions of dollars in hardware alone, not counting electricity costs.

## Mining Hardware Evolution

Bitcoin mining hardware has gone through four distinct generations, each delivering orders-of-magnitude improvements in efficiency. The progression from CPUs to purpose-built ASIC chips mirrors the industrialization of the mining sector.

EraHardwarePeriodHash RatePower EfficiencyGeneration 1CPU (desktop processors)2009 to 2010~10 MH/s~10,000 J/THGeneration 2GPU (graphics cards)2010 to 2013~800 MH/s~1,000 J/THGeneration 3FPGA (field-programmable gate arrays)2011 to 2013~1 GH/s~100 J/THGeneration 4ASIC (application-specific integrated circuits)2013 to present100+ TH/s per unit~15 to 21 J/TH*Sources: BitInfoCharts, Bitmain Product Specifications*

Today’s leading ASIC miners, such as the **Bitmain Antminer S21 Pro**, deliver around **234 TH/s** at approximately **15 J/TH** energy efficiency. That single machine performs more hashes per second than the entire Bitcoin network did for its first several years of existence. The capital cost of competitive mining hardware ranges from **$2,000 to $15,000** per unit, creating a significant barrier to entry for individual miners.

Each hardware transition eliminated the previous generation from profitability. When ASICs arrived in 2013, GPU mining became uneconomical almost overnight. This pattern of rapid obsolescence means miners must continuously reinvest in newer, more efficient equipment to remain competitive.

## Mining Pools vs Solo Mining

In Bitcoin’s early years, anyone with a standard computer could mine blocks solo. Satoshi Nakamoto mined the first blocks using a CPU. By 2010, the network hash rate had grown enough that solo miners began experiencing long stretches between finding blocks. This variance problem led to the creation of mining pools.

A mining pool combines the hash power of many individual miners and distributes rewards proportionally based on each miner’s contribution. When any pool member finds a valid block, the **3.125 BTC** reward (plus fees) is split among all participants. This provides smaller, more consistent payouts instead of the all-or-nothing gamble of solo mining.

The first mining pool, **Slush Pool** (now Braiins Pool), launched in November 2010. Today, the top mining pools collectively control the vast majority of Bitcoin’s hash rate. **Foundry USA** and **AntPool** consistently lead, each commanding roughly **25% to 30%** of the global hash rate.

Pool concentration raises centralization concerns that the data we have tracked across multiple difficulty epochs consistently highlight. While no single pool has reached the **51%** threshold, the top 4 pools regularly control over **75%** of the network’s hash rate. The counterargument is that pool members can switch pools at any time, and the economic incentives strongly discourage any pool from attacking the network it profits from.

## Bitcoin Halving Schedule and Mining Rewards

The halving is Bitcoin’s built-in supply reduction mechanism. Every **210,000 blocks** (approximately every four years), the block reward is cut in half. This schedule is hardcoded into Bitcoin’s protocol and cannot be changed without consensus from the network.

HalvingDateBlock HeightBlock RewardBTC Price at HalvingBTC Price ~1 Year LaterGenesisJanuary 3, 20090**50 BTC**$0$0.301st HalvingNovember 28, 2012210,000**25 BTC**$12$1,000+2nd HalvingJuly 9, 2016420,000**12.5 BTC**$650$2,500+3rd HalvingMay 11, 2020630,000**6.25 BTC**$8,700$55,000+4th HalvingApril 19, 2024840,000**3.125 BTC**$64,000$80,000+\*5th Halving (est.)~20281,050,000**1.5625 BTC**TBDTBD*Sources: Blockchain.com, CoinGecko Historical Data*

\*Price data as of early 2026. Past halving cycles are not guarantees of future price performance.

Each halving forces the mining industry to adapt. When the reward drops by **50%**, miners with higher electricity costs or less efficient hardware become unprofitable and shut down. The difficulty then adjusts downward, allowing the remaining miners to operate profitably. Historically, the reduced supply issuance has preceded significant price increases, though the pattern has weakened with each successive cycle as Bitcoin’s market matures and other factors (such as ETF inflows) play larger roles.

By approximately **2140**, all 21 million BTC will have been mined. At that point, miners will rely entirely on transaction fees as their incentive to secure the network. Whether transaction fees alone will be sufficient to maintain current security levels is one of the most debated questions in [cryptocurrency’s ongoing evolution](https://coinlaw.io/history-of-crypto-wallets/).

## Energy Consumption and the Environmental Debate

[Bitcoin mining’s energy consumption](https://coinlaw.io/bitcoin-energy-consumption-statistics/) is one of the most contentious topics in the cryptocurrency space. The Cambridge Bitcoin Electricity Consumption Index (CBECI) estimates the network uses approximately **150 TWh** per year, comparable to the annual electricity consumption of countries like Poland or Egypt.

MetricBitcoin MiningComparisonAnnual energy consumption**~150 TWh**More than Argentina (~130 TWh), less than the UK (~300 TWh)Renewable energy share**~54.5%**Global electricity grid average: ~30%Carbon emissions**~48 Mt CO2**Roughly 0.1% of global emissionsEnergy per transaction**~700 kWh**Visa transaction: ~0.001 kWh (but the comparison is flawed; see below)*Sources: Cambridge CBECI, Bitcoin Mining Council Survey Q4 2024*

The “energy per transaction” comparison with Visa is frequently cited but fundamentally misleading. Bitcoin’s energy consumption secures the entire network and its settlement layer, not individual transactions. A single Bitcoin block can settle billions of dollars worth of value, and [Layer 2 networks](https://coinlaw.io/layer-2-networks-adoption-statistics/) like the Lightning Network process millions of additional transactions without requiring additional on-chain energy.

The environmental debate has shifted significantly since 2021. China’s mining ban in June 2021 initially disrupted the network but ultimately pushed miners toward jurisdictions with cheaper, often renewable energy sources. The **Bitcoin Mining Council**, a voluntary industry group representing over **50%** of global hash rate, reported that its members’ sustainable energy mix reached **63.1%** in Q4 2024.

Several emerging use cases position mining as a net positive for energy systems. Miners are increasingly co-locating with stranded natural gas wells (converting flared methane into electricity), partnering with renewable energy projects to monetize curtailed power, and providing demand response services to electrical grids. In Texas, large mining operations have agreements to shut down during peak demand, effectively acting as a controllable load that stabilizes the grid.

## Frequently Asked Questions (FAQs)

**Is Bitcoin mining still profitable in 2026?**Bitcoin mining can still be profitable, but margins depend on electricity costs, hardware efficiency, and BTC price. Miners paying under $0.05 per kWh with current-generation ASICs (15 to 21 J/TH) generally remain profitable at Bitcoin prices above $50,000.

 

**How long does it take to mine one Bitcoin?**The network produces one block (3.125 BTC) every 10 minutes on average. A single modern ASIC miner would take years to find a block solo. Most miners join pools and earn fractional BTC proportional to their contributed hash power on a daily basis.

 

**Can you mine Bitcoin at home?**Technically, yes, but home mining is rarely profitable due to residential electricity rates (typically $0.10 to $0.15 per kWh in the US) and noise from ASIC miners (75+ decibels). Most profitable mining operations run in industrial facilities with wholesale power agreements.

 

**What happens when all 21 million Bitcoins are mined?**The last Bitcoin is expected to be mined around 2140. After that, miners will earn only transaction fees as their incentive. Whether fees alone will sustain network security is an open question that depends on Bitcoin’s transaction volume and fee market development.

 

**Is Bitcoin mining bad for the environment?**Bitcoin mining consumes approximately 150 TWh annually, but the environmental impact depends on the energy source. Industry surveys report over 54% of mining uses renewable energy, and miners increasingly utilize stranded gas and curtailed power that would otherwise be wasted.

 

 

## Conclusion

Bitcoin mining is the engine that powers the world’s largest decentralized financial network. The process combines cryptographic hashing, economic incentives, and an automatic difficulty adjustment to produce a system that has operated without interruption for over 17 years. Each component, from SHA-256’s one-way function to the halving schedule’s supply control, serves a specific purpose in maintaining the network’s security and predictability.

The mining industry continues to evolve under competitive pressure. Hardware efficiency improves with each ASIC generation, the energy mix shifts toward renewables, and the halving schedule steadily reduces the subsidy that miners depend on. The transition from block rewards to transaction fees as the primary miner incentive will be the defining challenge for Bitcoin’s long-term security model. How that transition unfolds over the next two decades will determine whether Bitcoin’s proof-of-work design remains as resilient as its first 17 years suggest.

Definition of Blockchain. Link to full glossary entry follows the description.**Blockchain**A distributed digital ledger that records transactions across a network, with each block cryptographically linked to the previous one for security.

[Read more](https://coinlaw.io/glossary/blockchain/)

Definition of Hash Rate. Link to full glossary entry follows the description.**Hash Rate**Hash rate measures the total computational power miners use to process and validate transactions on a proof-of-work blockchain like Bitcoin.

[Read more](https://coinlaw.io/glossary/hash-rate/)

Definition of Lightning Network. Link to full glossary entry follows the description.**Lightning Network**Bitcoinu0027s layer-2 protocol routing off-chain payments through bidirectional channels secured by HTLCs, settling in milliseconds at fractions of a cent.

[Read more](https://coinlaw.io/glossary/lightning-network/)

Definition of Gas Fee. Link to full glossary entry follows the description.**Gas Fee**A gas fee is the transaction cost paid to Ethereum validators for the computational effort needed to process and confirm blockchain operations.

[Read more](https://coinlaw.io/glossary/gas-fee/)