How Bitcoin Mining Actually Works: Hashing, Difficulty, and the Energy Question


Bitcoin mining is usually introduced with a line about computers solving hard math problems. It is a useful shorthand and a misleading one. Miners are not working out an answer to anything. They are guessing numbers, billions and trillions of times a second, hoping one guess produces an output that happens to fall below a threshold the network set in advance. This article explains what miners actually compute, why the network stays on a ten-minute rhythm, how miners get paid, and what the energy use is for — without any claims about whether mining is profitable for anyone.

The puzzle is a lottery, not a math problem

Every Bitcoin block carries a header: 80 bytes containing the protocol version, a link to the previous block, a fingerprint of all the transactions inside the block, a timestamp, the current difficulty target, and a free-form number called the nonce. Miners hash that header with SHA-256 twice — a process called double SHA-256 — and compare the result to the target. A valid block is one whose double hash, read as a number, is lower than the target. In practice, that means a hash starting with many zero bits.

There is no way to work backward from a target to a nonce that satisfies it. SHA-256 is preimage-resistant: for any given output, there is no known way to find an input that produces it except by trying inputs. Change one bit of the input and about half the output bits change, unpredictably. So the only method is to change the nonce — or the timestamp, or the extra data inside the block — and hash again, over and over. A modern mining machine, packed with many ASIC chips, does this hundreds of trillions of times per second.

The race, and why it secures the chain

Mining is competitive. Thousands of mining operations worldwide try to find a valid nonce for the same block height at the same time, and whoever finds one first gets the reward. Each miner picks slightly different transactions for their candidate block, so their candidate headers differ — finding a nonce for your candidate does not help anyone else, and no one can work from someone else's progress. Hashing is uniformly random in expectation: a miner with 1 percent of global hash rate finds, on average, 1 percent of blocks, but which specific block, and when, is genuinely random.

The thermostat: difficulty adjustment

Bitcoin aims for a block every ten minutes, and it enforces that with a difficulty adjustment every 2,016 blocks — roughly every two weeks. The network looks at how long the last 2,016 blocks took. If they took less than two weeks, difficulty goes up, making future blocks harder. If they took more than two weeks, difficulty goes down. The adjustment is precisely proportional, capped at a factor of four in either direction, which prevents a single strange fortnight from producing an extreme swing.

The scale of the adjustment is hard to grasp. Difficulty has gone up roughly 10^14 times since the genesis block, because hash power has scaled up by that much. As of October 2026, difficulty stood at about 140.6 trillion, with the network running at roughly 1,020 to 1,030 exahashes per second — over one zettahash per second, or one sextillion hashing attempts per second. Expected hashes per block are roughly the difficulty multiplied by 2^32: on the order of 6 x 10^23 hashes for each block found, which the whole network gets through in around ten minutes. There is no committee and no central operator: every node runs the same arithmetic independently, on a fixed schedule, forever.

How miners get paid

A miner who finds a valid block is paid in two parts. The block subsidy is newly created bitcoin, per the supply schedule: 3.125 BTC since the April 2024 halving, halving every 210,000 blocks until it rounds to zero around 2140. Transaction fees are the sum of fees from every transaction included in the block, variable with mempool conditions. The miner constructs the coinbase transaction paying themselves both amounts — the only place new bitcoin enters circulation.

Hardware, pools, and the energy question

Mining hardware has gone through generations: CPUs, then GPUs and FPGAs, and since about 2013, ASICs — application-specific integrated circuits designed to do SHA-256 and nothing else — which have been the only economically viable hardware since around 2014. Efficiency is measured in joules per terahash; modern machines achieve under 20 joules per terahash. A single miner's odds of finding a block alone are minuscule, so most miners join mining pools that aggregate hash rate, smooth out variance, and pay members proportionally. In the year to October 2026, the four largest pools together mined more than two-thirds of all blocks — a structural concentration the community watches, mitigated in part by miners' ability to switch pools at will and by protocols like Stratum V2, which let individual miners choose which transactions go into blocks.

Bitcoin mining draws about 140 to 160 terawatt-hours a year, depending on the estimation method — roughly half of one percent of the world's electricity, a figure that moves with price and hash rate. Estimates of the renewable share vary; one 2026 summary put it at roughly 43 percent. The energy is what makes the security real: to attack consensus, an attacker would need to match the network's hash rate, which means matching its hardware investment and electricity consumption. Mining also has an unusual property as an electricity customer: it can be switched off in seconds and back on in under a minute, which makes it a flexible load for grids. Texas grid operator ERCOT runs demand-response programs that pay enrolled loads to cut back when the grid is tight, and mining facilities are named as the kind of customer they are for. Whether that is a public service or a subsidy is argued both ways; the flexibility itself is a documented property of the load.

Mining is the mechanism that turns electricity and computation into an immutable record. Every ten minutes, a block header and the right nonce prove that someone spent enormous computational effort to produce it. Stack hundreds of thousands of those together, and the result is a chain whose history cannot plausibly be rewritten. That is what mining is for.

Sources: mining mechanics, difficulty adjustment, and energy figures as explained by LearnBitcoin, Blockstream, CoinAsity, and Web3Wagmi. Hash rate, difficulty, and energy figures are dated snapshots from October 2026 reporting and move continuously. This article explains a protocol mechanism; it is not financial advice and makes no profitability claims. The image on this post is an AI illustration.

Post a Comment

Previous Post Next Post