Proof of work: what Bitcoin mining really does

Proof of work: what Bitcoin mining really does

Last updated: February 11, 2026

You’ve probably heard that Bitcoin uses more electricity than all of Switzerland. You might also have heard that miners are “solving complex equations.”

One of these statements is true. The other is nonsense. Neither explains what mining actually does, and they divert from a more interesting question: whether or not Bitcoin’s consumption is even a flaw to be fixed.

In this guide, I’ll use interactive diagrams to demonstrate what the miners are really doing with all that electricity. We’ll discover how mathematics and game theory guarantee Bitcoin’s security and issuance schedule, and explore how the entire system represents something which was thought to be impossible before 2009.

A trustless ledger

Imagine four friends who regularly transact with one another. To avoid constantly settling debts in person, they agree to maintain a shared ledger: a running list of who paid whom, and how much. At any point, they can tally up the transactions to see everyone’s balance.

📒 Transaction Ledger

Balances

Alice
10.0 BTC
Bob
10.0 BTC
Charlie
10.0 BTC
Mallory
10.0 BTC

Transactions

Click "Add transaction" to begin...

This works fine - as long as someone trustworthy maintains the ledger. A bank does exactly this for millions of customers. But what if there’s no bank? What if you want to transact directly with strangers across the world, without any central authority being able to veto transactions or seize your funds?

If everyone keeps their own copy of the ledger, you have a new problem: how do you prevent someone from writing a fraudulent transaction? How do you get thousands of strangers to agree on which transactions are valid and in what order they occurred?

This is a problem closely related to those described above. When you send a file over the internet - an email attachment, say - you’re not actually transferring anything; you’re copying information. You and the recipient both have your own copy of the file.

In the context of digital currencies, how can you be sure that the coins you’ve received haven’t simultaneously been sent to someone else without a trusted intermediary? With physical cash - or any other bearer asset - this isn’t a problem. But in a digital context, nothing is scarce.

This is known as the double spend problem, and it was one of the biggest unsolved challenges facing the creation of true digital cash before the invention of Bitcoin.

Mining lies at the intersection of all these questions.

Before we dive into an interactive example of mining, we must first take a brief detour to familiarize ourselves with hashing.

Digital fingerprints

Hashing is fundamental to many aspects of Bitcoin. A hash function takes any input - a word, a sentence, an entire novel - and produces a fixed-length output called a hash or digest. Bitcoin uses the SHA-256 algorithm, which always outputs 256 bits (64 hexadecimal characters).

🔐 SHA-256 Hash Demo

SHA-256 Hash:

Try typing something above, then change a single character and watch what happens.

A few properties make hash functions useful:

This is the building block of everything that follows.

The mining lottery

A Bitcoin miner’s job is to find a hash “below a target value”. In practice, this means the hash needs to start with a certain number of zeros. The more leading zeros required, the harder it is to find. A hash starting with 0000... is rarer than one starting with 00..., which is rarer than one starting with 0....

Because hash functions are one-way, there are no shortcuts. You can’t work backwards from a desired hash to find the input. The only way to find a valid one is to guess.

Each miner takes the latest batch of unconfirmed Bitcoin transactions - known as a “candidate block” - and starts guessing. The block has a special field called a nonce: simply a number that miners increment with each attempt to produce a different hash. They keep guessing until they find one that meets the current difficulty requirement, and when this happens, they’re rewarded with freshly minted bitcoins.

🎲 Mining Lottery

Block Data:

Alice pays Bob 1 BTC, Charlie pays Diana 0.5 BTC

Choose a Nonce

Resulting Hash:

Click a nonce to see the hash...

Mining is a lottery. Each hash is a ticket, and the vast majority of tickets lose. There’s no skill involved, no clever trick that lets you guess better. The only way to improve your odds is to guess faster - to submit more lottery tickets per second. This is why miners invest in specialized hardware called ASICs that can compute trillions of hashes per second.

Every block contains a special transaction called the coinbase. The miner who finds a valid block gets to include a coinbase transaction paying themselves the current block reward (currently 3.125 BTC) plus any transaction fees.

This is the only way new bitcoins are created. There’s no central bank, no printing press. Just the protocol’s rules, enforced by every node on the network.

The term “proof of work” is apt. The work is the proof. Finding a valid hash demonstrates that you did the computational work to find it. It cannot be faked.

But this raises an interesting question: why can’t a supercomputer simply mine all the Bitcoin at once? Think about it - the power and sheer number of computer chips mining Bitcoin since 2009 has grown astronomically. As Bitcoin’s market cap has ballooned, so too has the economic incentive to obtain more of it as quickly as possible. How has the issuance rate remained so steady?

Chaining blocks

This is where difficulty adjustment comes in - and it’s arguably Bitcoin’s most important innovation. Below, I’ve created a mining simulator to demonstrate how it works: you can mine blocks, adjust the difficulty, and watch the blockchain grow.

⛏️ Mining Simulator

Candidate Block

Previous hash 0000000000000000000000000000000000000000000000000000000000000000 Transactions Nonce

Resulting Hash

Click "Mine once" to hash...
3 leading zeros required
At this difficulty: ~6 blocks/sec
Nonces tried: 0

Blockchain

#1
next block

Notice how each block includes the previous block’s hash. This is what makes it a chain. If you wanted to change a transaction in an old block, you’d need to:

  1. Recalculate that block’s hash (finding a new valid nonce)
  2. Recalculate every subsequent block’s hash (since they all reference the one before)
  3. Do all this faster than the rest of the network is extending the chain

This is what gives Bitcoin its immutability. The deeper a block is buried under subsequent blocks, the more “confirmations” it has, and the more computational work would be required to alter it. The network always accepts the longest valid chain as the canonical history.

The three steps above describe a 51% attack: an attempt to rewrite the blockchain’s history by outpacing the rest of the network. An attacker would need more than half of the network’s total hash power, because mining is a race - they’d need to re-mine the target block and every block since, all while the honest majority continues extending the legitimate chain.

Even then, a successful attacker cannot create bitcoin out of thin air, change the protocol’s rules, or steal coins from other wallets. They could only attempt to reverse their own recent transactions (double spending) or censor others’. The scope of what’s achievable is surprisingly narrow.

Anyone capable of mounting a 51% attack has, by definition, invested enormously in mining hardware - hardware that is purpose-built for Bitcoin mining. A successful attack would destroy confidence in the network, tanking the value of the very asset their hardware is designed to produce. The attacker’s most profitable move is simply to mine honestly. A non-financially motivated attack by a nation state isn’t outside the realm of possibility, but even then, the sheer cost and logistical challenge of acquiring and sustaining majority hash power makes it an extraordinarily difficult undertaking.

For a deeper technical breakdown, see Greg Walker’s excellent explainer on 51% attacks.

A decentralized clock

Bitcoin targets one new block every 10 minutes, on average, and the difficulty is adjusted automatically to maintain this frequency. Every 2,016 blocks (roughly two weeks), the network measures how long the previous batch took. If blocks came too fast, difficulty increases. Too slow, it decreases. The target is always 10 minutes.

“No matter how hard you dig for this digital gold, at a certain point you won’t be able to get more bitcoin out of it.” - Gigi, 21 Lessons

The orange line below shows Bitcoin’s total supply approaching its hard cap of 21 million coins. The dashed lines mark halvings: every 210,000 blocks, the mining reward is cut in half. Toggle the hash rate series using the chart legend and notice how it has grown exponentially - yet the supply curve doesn’t care. It marches on at the same predetermined pace.

📈 Bitcoin Issuance

Unlike gold, where a higher price incentivizes more mining and thus more supply, Bitcoin’s issuance schedule is fixed. Double the hash power, and you don’t get twice the bitcoin - you just make the puzzle twice as hard. The difficulty adjustment ensures that no amount of computational power can accelerate Bitcoin’s monetary policy.

Prior attempts at digital scarcity lacked this self-correcting mechanism, relying instead on human oversight or trusted third parties. Bitcoin replaced human restraint with mathematics.

There’s another way to think about this. As Gigi writes in 21 Lessons, Bitcoin solves a problem that had never been solved before: telling time in a decentralized system. Without a central authority, how do distributed participants agree on the order of events, or ensure everyone adheres to an issuance schedule?

“Bitcoin isn’t about computation. It is about independently agreeing on the order of things.”

The blockchain is a decentralized clock and a decentralized ledger. Each block of transactions is a tick. Proof of work is the mechanism that makes the ticking trustworthy. The difficulty adjustment is what keeps the clock accurate, no matter how the network’s computational power changes over time.

When a significant portion of miners go offline - as happened when China banned mining in 2021, or following Bitcoin’s price crash in early 2026 - blocks temporarily slow down. The network continues functioning, just with longer intervals between blocks.

After 2,016 blocks (however long that takes), difficulty adjusts downward, and the 10-minute target is restored. The system is self-correcting. No human intervention required.

The cost of trust

Remember the two claims we started with? That miners are “solving complex equations,” and that Bitcoin uses more electricity than Switzerland.

You now know the first is nonsense. Miners aren’t solving anything. They’re guessing trillions of times per second in a lottery that no-one controls and no-one can rig.

The second statement might be true. But after seeing how proof of work actually functions, the interesting question isn’t how much energy Bitcoin consumes but what that energy buys.

It buys the first system of absolute digital scarcity. With that in mind, some believe it’s more relevant to compare the network’s energy consumption with that of the global banking system.

Bitcoin’s energy footprint is real, but the picture is more nuanced than headlines suggest. Miners are location-agnostic - they can set up wherever electricity is cheapest, which often means stranded renewables or flared natural gas that would otherwise go to waste. A Cambridge University study found that Bitcoin mining’s sustainable energy mix now exceeds most industries, and there’s growing evidence that mining can actually accelerate renewable development by acting as a buyer of last resort for energy producers.

To learn more about this, I recommend reading Lyn Alden’s excellent article on this topic.

Before Bitcoin, copying digital information was essentially free. Proof of work made it expensive, and the difficulty adjustment made it permanent. Building on ideas from hashcash and the ambitions of DigiCash and bit gold, Bitcoin achieved something none of its predecessors could: money with no issuer, secured by nothing but physics and mathematics.

Each hash is trivial. But collectively, the trillions of hashes computed every second create something that had never existed before 2009: a system where strangers across the world can agree on a shared history - and transfer genuine scarcity - without trusting anyone.

Thanks for reading! If you found this guide valuable, consider supporting my work:

And subscribe to be notified when I publish new articles: