Learn · The short answer

How does Bitcoin mining work?

By the CloudMineCrypto teamUpdated 5 min read

The short answer

Miners pack waiting transactions into a block, then guess. They hash the block’s 80-byte header over and over, changing one number, the nonce, until the hash falls below a target. That takes the whole network about 10 minutes. The winner adds the block to the chain and collects the reward: 3.125 BTC of new bitcoin plus the block’s fees.

Key takeaways

  • A block is a batch of transactions with an 80-byte header on top.
  • Mining is guessing: change the nonce, hash, check, repeat.
  • Finding a valid hash is hard. Checking one takes a single hash.
  • The reward is new bitcoin plus fees, paid in the block’s first transaction.

One real block, step by step

Block 969,006, the latest

1. Collect transactions

The miner takes waiting transactions from its mempool, best fee rates first, until the block is full. This one holds 4,233 transactions. The first is special: the coinbase, where the miner pays itself.

How does Bitcoin mining work, in plain words?

Definition · Bitcoin mining

The process of adding the next block of transactions to Bitcoin’s ledger by finding a block hash below the network’s target, which takes huge numbers of guesses. The winner is paid in new bitcoin plus fees.

Think of a lottery where tickets cost electricity. Every miner builds its own candidate block and then buys tickets as fast as it can by hashing. Most tickets lose. Roughly every 10 minutes somebody somewhere draws a winner, shows it to everyone, and the race starts again on top of that block.

Go deeper · the complete guide

Bitcoin mining, explained from the ground up

Rewards, halvings, difficulty, hardware, pools, energy and whether mining pays today, with live numbers.

What are the steps of mining a block?

The hero above plays them on block 969,006. Here they are in words:

  1. 1

    Collect transactions

    Take waiting transactions from the mempool, highest fee rate first, and add a coinbase that pays the miner.

  2. 2

    Build the merkle root

    Hash the transactions in pairs, level by level, down to one hash that stands for them all.

  3. 3

    Fill in the header

    Six fields in 80 bytes: version, previous block hash, merkle root, time, target and nonce.

  4. 4

    Hash, change the nonce, repeat

    Run the header through SHA-256 twice. If the result is too big, change the nonce and try again.

  5. 5

    Land below the target

    A hash below the target is the proof of work. Other nodes check it with one hash.

  6. 6

    Collect the reward

    The block joins the chain and its coinbase pays the subsidy plus fees. Everyone moves on to the next block.

When the 4.3 billion possible nonces run out, which takes a modern machine well under a second, the miner changes a spare field in the coinbase instead. That gives a new merkle root and a fresh set of nonces to try.

Why is Bitcoin mining so hard?

Because SHA-256 can’t be predicted. Change one bit of the header and the hash changes completely, so there’s no shortcut. The only way to find a winner is to try, and the target is set so that the whole network needs about 10 minutes.

950 EH/s

network hashrate

live, updated hourly

5.7 × 1023

hashes per block, on average

hashrate × 600 s

~10 min

average block time

the difficulty’s target

2,016

blocks between difficulty changes

about two weeks

If more machines join, blocks come faster for a while, and at the next adjustment the target gets harder. If miners leave, it gets easier. The difficulty guide tracks the next change live.

Can I try mining a block myself?

Yes, right here. This runs real double SHA-256 in your browser on a simplified block. Set the difficulty to 5 or 6 leading zeros and watch how much longer it takes:

Interactive · mine a block in your browser

Real SHA-256d proof of work, simplified header

Block #1Previous hash0000000000000000000000000000000000000000000000000000000000000000Nonce0

Block hash (double SHA-256)

Edit the transactions: the hash changes completely with a single letter.

Attempts: 0

Your hashrate: n/a

Time: 0.0 s

Each extra zero makes it about 16 times harder. Real blocks need around 19 or 20. For the hashing itself, a header you can edit byte by byte and what a 51% attack would take, see proof of work.

Why does Bitcoin need mining?

Bitcoin has no bank to decide which payments happened first. Mining does that job. Each block puts a batch of transactions in order, and because every block builds on the one before, changing an old payment would mean redoing all the work since. That’s what makes a confirmed payment hard to reverse.

It’s also how new bitcoin is issued, on a fixed schedule that halves every four years. The reward side is covered in the block reward and the halving.

Can you mine Bitcoin yourself?

With a specialised ASIC, cheap power and a mining pool, yes, though margins are thin. A phone or laptop is millions of times too slow to matter.

The easy way to start is the CloudMineCrypto app. You mine for free with the free plan, ads, games, offers and daily check-ins, with no hardware, noise or power bill, and withdraw to your own wallet over Lightning, Bitcoin on-chain or BNB Smart Chain. Paid plans are an optional add-on. Rewards are estimates based on live network data and aren’t guaranteed.

Go deeper · the complete guide

Bitcoin mining, explained from the ground up

Rewards, halvings, difficulty, hardware, pools, energy and whether mining pays today, with live numbers.

Frequently asked questions

How does Bitcoin mining work in simple terms?

Miners bundle waiting transactions into a block and then guess a number, the nonce, until the block’s hash comes out below a target. The first to find one adds the block to the chain and earns the block reward.

What exactly are miners solving?

Nothing clever. They’re looking for a header whose double SHA-256 hash is below a target. The only way to find one is to keep changing the nonce and hashing again, trillions of times a second.

How long does it take to mine a block?

About 10 minutes on average for the whole network. The difficulty adjusts every 2,016 blocks to keep it there, whatever the total hashrate.

What do miners get for a block?

The block subsidy, 3.125 BTC since April 2024, plus the fees of every transaction in the block. Most blocks are found by pools, which share the reward among their miners.

Can I mine Bitcoin at home?

Only with a specialised ASIC machine, cheap electricity and a pool, and even then it often doesn’t pay. A phone or laptop is far too slow. Apps like CloudMineCrypto let you mine for free without running hardware yourself. Rewards are estimates.

Sources and further reading

  1. Bitcoin: A Peer-to-Peer Electronic Cash System (the whitepaper) · Satoshi Nakamoto, 2008
  2. Block chain guide: headers, merkle trees, proof of work · Bitcoin developer documentation
  3. Mining guide: solo mining and pools · Bitcoin developer documentation
  4. Block hashing algorithm · Bitcoin Wiki
  5. Merkle trees · Bitcoin Wiki
  6. Difficulty · Bitcoin Wiki

Live figures on this page come from the CloudMineCrypto API or from the public blockchain data services named next to them, refresh on a schedule, and are labelled where they appear. This guide is educational and not financial advice. CloudMineCrypto is not an investment product; rewards in the app are estimates and aren’t guaranteed.

You’ve read how it works. Now watch it happen.

Claim a free 8-hour mining plan in the CloudMineCrypto app and see your estimated BTC tick up from live network data. No hardware, no card.