Bitcoin mining is the process that adds new blocks of transactions to Bitcoin’s blockchain and releases newly created bitcoin into circulation. Specialized computers repeatedly run a block’s data through the SHA-256 hash function and change one small number each time, looking for a result that falls below a target set by the network. The first miner to find a valid result broadcasts the block. Other computers check it in a fraction of a second, and the winner collects a block reward made of new bitcoin plus the fees from the transactions in that block. The whole network finds a block about every 10 minutes on average. The difficulty of the search adjusts every 2,016 blocks to hold that pace.
What Bitcoin Mining Does
Bitcoin has no central bank or company that keeps the ledger. Thousands of independent computers (nodes) each hold a copy of the blockchain, so the network needs a way to agree on which transactions happened and in what order. Mining is that agreement process.
When you send bitcoin, your wallet broadcasts a signed transaction to the network. Nodes check that the signature is valid and that the coins have not already been spent, then hold the transaction in a waiting area called the mempool. It becomes part of the permanent record only when a miner includes it in a block that the network accepts.
Mining serves three functions:
- Recording transactions. Miners gather pending transactions into a candidate block and, by winning the right to add it, confirm them for everyone. Every full node re-checks their work.
- Issuing new coins. New bitcoin is created only through the block reward paid to the winning miner, on a schedule written into the protocol rather than decided by anyone along the way.
- Securing history. Each block contains the hash of the block before it. Changing an old transaction would mean redoing the mining work for that block and every block after it, faster than the rest of the network adds new ones.
How the Bitcoin Mining Process Works
The process repeats for every block. Here is the sequence from a miner’s point of view:
- Build a candidate block. The miner’s software selects transactions from the mempool, usually favoring those that pay higher fees per unit of block space, because block space is limited. It adds a special first transaction, the coinbase transaction, which pays the block reward to the miner’s own address.
- Assemble the block header. The header is a small summary of the block. It holds the software version, the hash of the previous block, a single fingerprint of all the block’s transactions (the Merkle root), a timestamp, the current difficulty target in compact form, and a 32-bit field called the nonce.
- Hash the header. The miner runs the header through SHA-256 twice and gets a 256-bit result, written as a 64-character hexadecimal number.
- Compare against the target. If the hash is less than or equal to the target, the block is valid. If not, the miner changes the nonce and hashes again.
- Broadcast and verify. A miner who finds a valid hash sends the block to the network. Nodes check the hash, the transactions and the reward amount, then add the block to their copy of the chain. Every miner then starts work on the next block, building on top of the new one.
Steps 3 and 4 make up almost all of the work. A modern mining machine performs them trillions of times per second.
The Hash
A hash function takes any input, a word, a paragraph or a block header, and produces a fixed-length output. Bitcoin uses SHA-256, which always returns 256 bits. Written in hexadecimal, that is 64 characters.
Each hexadecimal character has 16 possible values (0 to 9, then A to F for 10 to 15), so a 64-character hash has 16^64, or 2^256, possible values, roughly 1.16 × 10^77. That space is too large to guess a specific hash or work backward from a hash to its input.
Three properties of SHA-256 make mining work:
- Deterministic. The same input always produces the same hash, so anyone can check a miner’s result instantly.
- Unpredictable. Changing a single character of the input, or adding 1 to a number inside it, produces a completely different hash. Nobody can steer the output toward a low value. The only method is to try inputs one by one.
- One-way. Computing a hash is nearly instant, but there is no known shortcut for finding an input that produces a chosen output.
Because every block header contains the previous block’s hash, the blocks are linked. Alter one transaction in an old block and its Merkle root changes, so its header hash changes, so the next block’s “previous hash” field no longer matches, and so on up the chain. This linking is where the name blockchain comes from.
Target Hash and Nonce
The network does not ask for a particular hash, only for any hash numerically at or below a target value. Because a hash is just a very large number, a low target shows up as a hash that begins with a long run of zeros, like this winning block hash from Bitcoin’s history:
0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee
Every leading zero in hexadecimal cuts the share of qualifying hashes by a factor of 16. A lower target means fewer valid hashes and more guesses needed on average.
Miners make their guesses by changing the nonce, short for “number used once.” The software starts it at zero, hashes the header, checks the result, adds one and repeats. The 32-bit nonce field holds about 4.3 billion values, which modern hardware runs through in well under a second. The software then changes a value in the coinbase transaction known as the extra nonce, which alters the Merkle root and opens a fresh set of 4.3 billion nonce values. The timestamp can also shift slightly, so miners have an effectively unlimited supply of new inputs.
Nothing about the process rewards cleverness. A miner’s chance of finding the next block is roughly its share of all the hashing being done on the network. A machine contributing 0.001% of the network’s hashes should expect to find about 0.001% of blocks over time.
The Mining of Block 490163
Block 490163, mined in October 2017 by AntPool, one of the large mining pools of the time, shows how these pieces fit together. Its winning nonce was 731,511,405. That does not mean the pool made only about 731 million attempts. The nonce had very likely rolled over many times with extra nonce changes, and the pool’s machines worked on many variations of the block in parallel. The block confirmed 1,768 transactions, and its hash met the target with room to spare.
Difficulty Adjustment
The network aims for one block about every 10 minutes. Mining power can grow or shrink a lot, so a fixed target would eventually make blocks come too fast or too slow. Bitcoin handles this by recalculating the target every 2,016 blocks. At 10 minutes per block, 2,016 blocks should take 20,160 minutes, or two weeks.
At each adjustment, the protocol compares how long the last 2,016 blocks actually took with the intended two weeks:
New difficulty = Old difficulty × (20,160 minutes ÷ actual minutes taken for the last 2,016 blocks)
If blocks arrived faster than planned because more machines joined, difficulty rises. If they arrived slower because miners shut down, it falls. Each adjustment is capped at a factor of four in either direction, and the minimum difficulty is 1, the level of the first blocks in 2009. Because the adjustment looks backward, block times can drift between adjustments, so 10 minutes is an average, not a guarantee for any single block.
Difficulty also connects directly to network hashrate. The expected number of hashes needed to find one block is about difficulty × 2^32 (2^32 is about 4.29 billion). Take a hypothetical difficulty of 100 trillion. Finding a block would take about 4.3 × 10^23 hashes on average. Spread over 600 seconds, that implies the network is computing about 7.2 × 10^20 hashes per second, or 720 exahashes per second. This is why hashrate is quoted in exahashes (quintillions of hashes per second). It is also why a single machine’s odds on any given block are so small.
Proof of Work, Confirmations and Security
The system just described is called proof of work. A valid block hash is proof that someone spent real computing effort, and therefore real electricity and hardware, to produce it. Verifying that proof takes almost no effort. Any node can hash the header once and see that it meets the target.
Proof of work is one part of how the network reaches consensus. The other part is the rule that nodes follow the valid chain with the most accumulated work. Occasionally two miners find valid blocks at nearly the same moment and the network briefly splits. Miners keep building, and once one branch gets a further block, every node switches to it. The block on the losing branch becomes “stale,” its reward disappears, and its transactions go back to the mempool to be included later.
A transaction gets its first confirmation when it is included in a block, and one more for each block added after that. Many exchanges and merchants wait for several confirmations, with six a long-standing convention for larger amounts. Reversing a transaction six blocks deep would require out-mining the rest of the network over that stretch, generally by controlling a majority of total hashrate, an attack known as a 51% attack. On a network this large, that much hardware and electricity costs a great deal to assemble.
Mining Rewards: Block Subsidy, Fees and the Halving
The winning miner’s coinbase transaction can pay itself two things:
- The block subsidy: newly created bitcoin, set by the protocol.
- Transaction fees: the sum of the fees attached to every transaction in the block.
The subsidy began at 50 BTC per block when Satoshi Nakamoto mined the genesis block in January 2009. It halves every 210,000 blocks, which works out to roughly every four years:
| Halving | Approximate date | Block height | Subsidy per block |
|---|---|---|---|
| Launch | January 2009 | 0 | 50 BTC |
| First | 2012 | 210,000 | 25 BTC |
| Second | 2016 | 420,000 | 12.5 BTC |
| Third | May 2020 | 630,000 | 6.25 BTC |
| Fourth | April 2024 | 840,000 | 3.125 BTC |
| Fifth (expected) | 2028 | 1,050,000 | 1.5625 BTC |
Each halving cuts the issuance of new coins by half. The total converges on 21 million BTC, and the subsidy is expected to reach zero around 2140, after which miners will be paid only through transaction fees. Fees rise and fall with demand for block space, and whether they alone can support the same level of security is an open question in Bitcoin’s design.
Two protocol rules apply to the reward. First, a miner cannot claim more than the subsidy plus fees. Nodes reject any block that tries. Second, newly mined coins cannot be spent until 100 more blocks have been added on top. This protects the network if the block later ends up on a losing branch.
The reward’s value in dollars depends entirely on the bitcoin price, so mining revenue can swing sharply even when nothing about the operation changes.
How Long Does It Take to Mine 1 Bitcoin?
There is no fixed answer, because nobody mines bitcoin one coin at a time. Miners win whole blocks or nothing (or, in a pool, a share of what the pool wins). Two questions are worth separating.
How fast does the network create one bitcoin? Divide the average block time by the block subsidy:
Average block time ÷ Block subsidy = Minutes per newly created BTC
At a 10-minute average and a 3.125 BTC subsidy, that is 10 ÷ 3.125 = 3.2 minutes per bitcoin across the whole network. After the expected 2028 halving it becomes 6.4 minutes, and after the following one 12.8 minutes. When blocks run slightly faster or slower than 10 minutes, the rate shifts with them.
How long would it take you? That depends on your share of total hashrate. Here is a hypothetical example with illustrative figures:
- Your machine: 200 terahashes per second (2 × 10^14 H/s)
- Network hashrate: 1,000 exahashes per second (10^21 H/s)
- Your share: 2 × 10^14 ÷ 10^21 = 0.00002% of the network
- Blocks per day: about 144
- Expected blocks you find per day: 144 × 0.0000002 = 0.0000288
- Expected time to find one block solo: about 34,700 days, or roughly 95 years
- Expected bitcoin earned per day (subsidy only, no fees): 0.0000288 × 3.125 ≈ 0.00009 BTC
- Expected time to accumulate 1 BTC: about 11,100 days, or roughly 30 years
Mining solo, you would most likely receive nothing for years and then, if lucky, a whole block at once. This variance is the main reason pools exist. The figures also assume a constant network, while in practice rising hashrate pushes difficulty up and your share down.
What You Need to Mine Bitcoin
Mining at a meaningful level takes five things:
- Mining hardware, in practice one or more ASIC miners.
- Electricity, available continuously and priced low enough to leave a margin.
- Cooling and space, because the machines turn nearly all the power they draw into heat and noise.
- Mining software and a pool account, which connect the hardware to the network and pay out rewards.
- A Bitcoin wallet address to receive payouts, with its keys kept under your control.
Internet bandwidth matters less than people expect. Mining sends small amounts of data. Latency, the delay in communicating with the pool or network, matters more, because a miner who hears about a new block late wastes effort on a block that can no longer win.
Mining Hardware: From CPUs to ASICs
Mining hardware has gone through four phases.
CPUs (2009 to 2010). In Bitcoin’s first years, ordinary desktop processors could find blocks, and early participants mined on home computers. As more people joined, difficulty rose and CPUs fell behind.
GPUs. Graphics cards, built to run many simple calculations in parallel, hashed far faster than CPUs and dominated for a period, though they used a lot of power and were not designed for constant mining loads. Miner demand across cryptocurrencies also caused graphics card shortages.
FPGAs. Field-programmable gate arrays offered better efficiency for a short time before being overtaken.
ASICs. Application-specific integrated circuits are chips that do nothing except compute SHA-256 hashes. They are many orders of magnitude faster and more energy efficient than CPUs or GPUs at this task, and they now make up nearly all of Bitcoin’s hashing power. Their prices range from several hundred dollars for older or smaller units to tens of thousands of dollars for top models.
Two specifications matter most when comparing ASICs:
- Hashrate, in terahashes per second (TH/s).
- Efficiency, in joules per terahash (J/TH). This is the energy needed to compute one trillion hashes. Lower is better. A machine rated at 16 J/TH draws 16 watts for each terahash per second of output, so a 335 TH/s unit at that rating would draw about 5,360 watts.
Each new chip generation improves efficiency, and efficiency decides who stays profitable when margins tighten. An older machine may now cost more in electricity than it earns. A home computer, gaming PC or phone cannot meaningfully mine bitcoin today. Even a high-end graphics card is a vanishingly small share of a network built on ASICs.
Mining Pools
A mining pool is a service, run by a third party, that combines the hashrate of many miners and splits the rewards among them. The pool works on a single candidate block. Each participant’s machines search different parts of the nonce space and submit “shares,” which are hashes that miss the real target but meet an easier one set by the pool. Shares prove how much work each participant contributed. When anyone in the pool finds a valid block, the reward goes to the pool and is divided according to the shares.
Pools do not raise your expected earnings. Your share of total network hashrate is the same either way, and the pool takes a fee. What a pool changes is variance. Instead of a lottery-style wait for a full block, you get small, regular payouts. In the hypothetical example above, a pool member would expect roughly 0.00009 BTC per day before pool fees instead of a single block after decades.
Pools use different payout methods. Two common ones are:
- Pay per share (PPS): the pool pays a fixed amount for each valid share and absorbs the luck of how often the pool actually finds blocks.
- Pay per last N shares (PPLNS): when the pool finds a block, the reward is split among the shares submitted in a recent window, so payouts vary with the pool’s luck.
Fee levels, minimum payout thresholds and whether transaction fees are passed on differ from pool to pool. A small number of large pools also coordinate a big share of the network’s hashrate. Miners can switch pools at any time, but a handful of operators decide which transactions go into a large share of blocks.
Bitcoin Farms
A “bitcoin farm” is a large facility full of ASIC miners. Industrial operators place farms where electricity is cheap, negotiate power contracts directly with utilities and engineer cooling at scale, from high-volume air systems to immersion and hydro cooling. This scale advantage is why most of the network’s capacity sits with large firms and pools rather than individuals.
The Economics: Is Mining Bitcoin Worth It?
Mining is a business with predictable costs and uncertain revenue. The basic test is simple:
Daily profit = (Expected BTC earned per day × BTC price) − (Power draw in kW × 24 × Electricity price per kWh) − Pool fees − Other running costs
The hardware cost then has to be recovered from that daily profit before the machine becomes obsolete.
Here is a hypothetical example built on the 200 TH/s machine from earlier. All figures are illustrative assumptions.
- Efficiency: 17.5 J/TH, so power draw = 200 × 17.5 = 3,500 watts (3.5 kW)
- Energy use: 3.5 kW × 24 hours = 84 kWh per day
- Electricity at a hypothetical $0.10 per kWh: $8.40 per day
- Electricity at a hypothetical $0.20 per kWh: $16.80 per day
- Expected output: about 0.00009 BTC per day (subsidy only, before pool fees)
Whether that output covers $8.40 or $16.80 a day depends on the bitcoin price on the day you sell or value it, and on how much network hashrate and difficulty rise while you run the machine. Cooling adds to the power bill. The machine’s purchase price has to be paid back on top. At the next halving, expected output in BTC drops by half overnight unless transaction fees make up the gap.
The inputs that decide the outcome:
- Electricity price. Usually the largest ongoing cost and the main reason home mining in high-rate regions struggles.
- Hardware efficiency. A more efficient machine keeps earning longer as difficulty rises.
- Network difficulty. It tends to rise as new machines come online, shrinking each machine’s share.
- Bitcoin price. It sets the dollar value of every reward and can move faster than any other input.
- Halvings and fees. Each halving cuts the subsidy at a known block height. Fees add revenue, more during heavy network use.
Online mining calculators estimate returns from hashrate, power draw and electricity rate, but they only project current conditions forward. If your goal is to own bitcoin rather than run hardware, buying it is usually simpler: you pay the market price, take no equipment risk and skip the electricity bill. Our comparison of the best crypto exchanges and apps covers where to buy.
Downsides of Bitcoin Mining
Financial Risk
The risks for an individual miner are mostly financial. Equipment costs hundreds to thousands of dollars per unit, it loses value as newer models arrive, and a fall in the bitcoin price or a jump in difficulty can push a machine below break-even. Resale prices for used ASICs tend to drop when mining margins are thin, which is exactly when owners want to sell.
Energy Use
Proof of work is energy intensive by design, since the cost of electricity is what makes attacking the network expensive. Researchers, including the University of Cambridge’s Bitcoin electricity consumption index, have estimated the network’s annual power use as comparable to that of some smaller countries. The impact depends heavily on the energy source. Some operators use hydro, geothermal, solar or stranded natural gas that would otherwise be flared, and some buy carbon offsets. Critics argue the total demand is the problem regardless.
Electronic Waste and Heat
Because competitiveness depends on efficiency, large operations replace hardware regularly, and ASICs cannot be repurposed for other computing tasks. Digiconomist has estimated Bitcoin’s annual e-waste at around 21 kilotons. On a home scale, the heat output is substantial. A single ASIC running around the clock can noticeably raise room temperatures and cooling costs, and many are loud enough to be impractical in living spaces.
Speed and Scalability
Mining sets Bitcoin’s base-layer throughput. With a block roughly every 10 minutes and limited space in each, the network processes only a handful of transactions per second, far below card networks such as Visa, which can handle around 1,700 per second. Making blocks much bigger or faster could raise hardware and bandwidth demands on nodes and push the network toward centralization. Second-layer systems such as the Lightning Network move many payments off the main chain, but scaling remains a long-running debate.
Is Bitcoin Mining Legal?
Bitcoin mining is legal in many countries, including the United States, but it is increasingly regulated, mainly over strain on electrical grids and climate concerns. Rules vary from outright bans to punitive energy pricing. Examples of actions governments have taken:
- China enacted a general ban on cryptocurrency mining in 2021. Before that, China hosted a large share of global mining, and the crackdown pushed operations to other countries, with the United States becoming one of the largest mining locations in Cambridge’s estimates.
- Kazakhstan raised taxes on electricity used for mining in 2022 and 2023 and moved to allow mining only when the grid has surplus energy.
- Sweden sharply increased the tax on electricity used for crypto mining, a rise reported at around 6,000%.
- Norway announced plans for a temporary ban on new power-intensive crypto mining data centers.
Rules can also differ within a country through local utility rates, zoning, noise limits and tax treatment. In the United States, mined coins are generally treated as taxable income at their fair market value when received, and a later sale can trigger capital gains or losses. Confirm the rules where the equipment will operate, including whether a residential power contract permits commercial-scale use.
Can Bitcoin Mining Be Traced?
Yes, at the level of the blockchain. Every coinbase transaction pays a specific address, and anyone can follow where those coins move afterward. Addresses carry no names, so identity usually enters when coins pass through a service that collects personal information, such as an exchange with know-your-customer checks, or through pool accounts and payout addresses. Mining also leaves physical traces. Where it is banned or its power use is heavily taxed, an unusual jump in a property’s electricity use can draw attention from utilities or authorities.
Avoiding Bitcoin Mining Scams
Mining attracts fraud because it promises a steady income from something most people cannot easily verify. Common traps include:
- Cloud mining offers. These claim to rent you hashing power in remote facilities. Some are legitimate businesses. Others pay early “returns” out of new deposits. Guaranteed daily returns, pressure to recruit others and no verifiable hardware data are warning signs.
- Fake wallets. Counterfeit wallet apps or websites capture your private keys or seed phrase. Use wallet software from its official source.
- Fake exchanges and platforms. Scammers reach out by email, messaging apps or social media and steer victims to deposit funds on sites they control.
- Hidden mining malware (cryptojacking). Malicious software or browser scripts secretly use your computer to mine for someone else. Unexplained slowdowns, fan noise and higher power bills are typical symptoms.
The basic rule covers most cases: never share private keys, seed phrases or passwords, and be skeptical of services and people without an established, verifiable track record.
Alternatives to Mining It Yourself
Besides buying bitcoin, you can buy shares of publicly traded miners such as Hut 8 (HUT), MARA Holdings (MARA) and CleanSpark (CLSK). They add company-level risk on top of the bitcoin price: debt, hardware spending, power contracts, management decisions and dilution. Their prices have tended to swing as sharply as bitcoin, sometimes more, because halvings and difficulty changes hit their revenue directly.
FAQ
Do miners decide which transactions get confirmed?
Miners, or the pools that build their block templates, choose which valid transactions go into a block, typically favoring higher fees. They cannot create invalid transactions, spend coins they do not control or pay themselves more than the subsidy plus fees, because every full node checks each block and rejects any that breaks the rules.







