Network and blocks
What is Bitcoin mining?
Bitcoin mining is running machines that hash Bitcoin block headers to add new blocks and earn the block reward.
- Algorithm
- SHA-256, run twice
- Average block time
- 10 minutes
- Blocks a day
- about 144
- Paid in
- bitcoin: subsidy plus fees
- Machine
- SHA-256 ASIC
- Pays best when
- power is cheap and the machine efficient
What it means in practice
Miners compete to find a block header whose SHA-256 hash is below the network target. The winner adds the block and collects the subsidy plus the fees of the transactions in it. Today this is done with ASIC miners built only for SHA-256, almost always connected to a mining pool that shares out rewards by hashrate. What a miner earns depends on its hashrate, the network difficulty, the Bitcoin price and fees, and what it costs to power it.
How Bitcoin mining works, step by step
Transactions wait in a queue called the mempool. A miner packs some into a block, adds a header, and hashes that header over and over with a changing number, the nonce, until the result falls below the target the network has set. The first miner to find such a hash broadcasts the block; everyone else checks it in a moment and builds on it.
For that work the miner is paid new coins plus the fees inside the block. The target is adjusted every 2,016 blocks so that blocks keep arriving about every ten minutes however many machines join.
Why it takes machines
Guessing is all there is to it, so the winner is whoever can guess fastest for the least power. That is why mining moved from computers to graphics cards and then to ASICs, chips that do nothing but SHA-256.
What a miner is paid for
Security. To rewrite history an attacker would have to redo the work faster than everyone else combined, so the electricity spent today is what makes yesterday’s payments hard to reverse.
Who does what: miner, pool, node, wallet
The miner is the machine that guesses. The pool collects the guesses of thousands of machines and evens out the luck. The node checks every block and transaction against the rules. The wallet holds the keys to the coins. They are four separate things, often run by four different parties.
An owner normally runs only the first and the last. Coins go from the pool to the wallet, and nobody else needs to hold them in between.
A day of mining, calculated
Example figures: machine 200 TH/s, network 1,000 EH/s, 144 blocks, 3.125 BTC subsidy and 0.075 BTC fees per block. The share is 200 ÷ 1,000,000,000 = 0.0000002. Times 144 × 3.2 BTC gives 0.00009216 BTC, or 9,216 satoshis a day before the pool’s fee.
Energy on the other side: 3.5 kW × 24 = 84 kWh. At $0.07 that is $5.88. Whether the day ends positive depends on the price of bitcoin on that day, and on a dear power tariff the same machine can lose money. The calculator puts in live figures.
Four things that move the result
Difficulty follows the hashrate of everyone else and is set anew about every two weeks. The bitcoin price moves by the minute. Fees rise when blocks are full and fall when they are not. The subsidy halves about every four years.
None of them is in your hands. Three others are: the efficiency of the machine, the price you pay for power and the hours it runs. Those three are what buying and hosting decisions are about.
From a laptop to a rack
In 2009 a normal processor was enough. Graphics cards took over in 2010, programmable chips followed for a short time, and the first ASICs arrived in 2013. Each step brought many times more work for the same power, and each made the step before it uneconomic within months.
Today the chips improve more slowly, from one generation to the next rather than overnight. A machine stays useful as long as the value of its work is above the price of its power, which is why older models live on where power is cheap.
Home, hosted or shared site
At home you see and hear the machine, and you can use its heat. In a hosting site it runs beside thousands of others on industrial power. A company with its own team may rent space and look after the fleet itself. The machine and the pool are the same in all three cases.
The choice comes down to three local facts: the price of power, the noise the place can bear, and who will be there when a fan stops.
Worked example
A 200 TH/s machine on a network of 1,000 EH/s holds 0.00002% of the hashrate, so it can expect that share of the roughly 144 blocks found each day.
Example figures, not live data.
Step by step
- Find your full price per kWh, with taxes and delivery.
- Choose a machine and look at its figures in the calculator.
- Decide where it runs: a circuit at home or a hosting site.
- Create a wallet and a pool account, and enter the payout address.
- Point the machine at the pool and compare its hashrate after 24 hours.
Common mistakes
- Choosing by hashrate alone and overlooking the watts.
- Using a month of high fees as if every month were like it.
- Keeping mined coins on a pool balance for a long time.
Common questions
What is cryptocurrency mining?
The same work on any coin that uses proof of work: machines guess for the next block and the finder is paid in that coin. Bitcoin is the largest; Litecoin, Dogecoin, Kaspa, Zcash and others are mined the same way on their own algorithms.
Is Bitcoin mining legal or illegal?
In the United States and many other countries it is legal. Some countries ban or restrict it, and state and local rules on power, noise and buildings still apply. Check the rules where the machine will run.
Can I mine Bitcoin on a PC?
Bitcoin is mined with ASIC machines, which do far more work per watt than a PC. A small home miner such as a Bitaxe is the easiest way to start.
How long does it take to mine one Bitcoin?
It depends on your hashrate. Blocks are found about every ten minutes by the whole network; a single machine earns a tiny part of a coin each day. Our cost-to-mine page works it out for each machine at today’s difficulty.
Does mining slow down when fewer people do it?
For a while. Blocks come late until the next difficulty change, which makes them easier, and the ten-minute average is restored.
What happens when all bitcoin is mined?
Miners are then paid by transaction fees alone. By the halving rule the subsidy ends around the year 2140.
Do I need fast internet?
No. A machine uses a few megabytes an hour at most. A steady connection matters more than a fast one.