Bitcoin Mining – Step-by-Step Guide

Understand exactly how Bitcoin mining works: from transactions and blocks to proof-of-work, difficulty, and mining rewards.

1. What Is Bitcoin Mining?

Bitcoin mining is the process of adding new blocks of transactions to the Bitcoin blockchain. Miners:

  • Collect unconfirmed transactions from the network (the mempool).
  • Package them into a candidate block.
  • Compete to find a valid proof-of-work by trying many different nonces.
  • Broadcast the winning block to the network and receive a block reward plus transaction fees.

2. Prerequisites for Mining

2.1. Hardware

Modern Bitcoin mining is done with ASIC miners (Application-Specific Integrated Circuits) designed only for SHA-256.

  • Examples: Antminer S19, Whatsminer M30, etc.
  • GPUs and CPUs are no longer profitable for Bitcoin (too low hash rate compared to difficulty).

2.2. Electricity

Profitability depends heavily on your electricity price and hardware efficiency (Joules per TH/s).

  • Lower electricity price = higher potential profit.
  • Miners often search for cheap renewable energy (hydro, solar, wind).

2.3. Cooling & Location

ASICs produce heat and noise. You need proper ventilation, cooling and a place where 70–80 dB noise is acceptable.

2.4. Network & Wallet

  • Stable internet connection (even low bandwidth is enough).
  • Bitcoin wallet to receive your mining rewards.
  • Account in a mining pool (if you don’t solo-mine).

3. How the Mining Process Works (Step by Step)

  1. Step 1: New Transactions Are Broadcast

    Users send Bitcoin transactions. Each transaction is signed with a private key and broadcast to the network. Nodes verify basic rules (signatures, double-spend, balances) and store valid transactions in the mempool.

  2. Step 2: Miners Build a Candidate Block

    A miner selects transactions from the mempool, usually prioritizing those with higher fees. The miner creates a coinbase transaction – the special transaction that pays the block reward + fees to the miner’s address.

    All transactions (including the coinbase) are grouped and a Merkle root is calculated. This root, together with other block fields, will form the block header.

  3. Step 3: Constructing the Block Header

    The block header contains:

    • Version
    • Previous block hash
    • Merkle root (for all included transactions)
    • Timestamp
    • Difficulty target (nBits)
    • Nonce (number that miners change)

    Miners will repeatedly hash this header with SHA-256 (actually SHA-256 twice) while changing the nonce and other tweakable fields.

  4. Step 4: Proof-of-Work – Searching for a Valid Hash

    The goal is to find a hash of the block header that is lower than the current difficulty target. Because SHA-256 is unpredictable, the only way is brute-force:

    • Try a nonce.
    • Hash the header.
    • Check if the hash < target.
    • If not, change nonce and repeat.

    The miner that first finds such a hash has a valid proof-of-work.

  5. Step 5: Broadcasting the New Block

    The winning miner broadcasts the new block to the network. Nodes independently verify:

    • All transactions are valid and not double-spends.
    • The block hash meets the difficulty target.
    • The block correctly references the previous block hash.

    If valid, nodes add it to their local copy of the blockchain and remove its transactions from the mempool.

  6. Step 6: Block Reward and Fees

    The miner receives the block subsidy (newly created BTC) plus all transaction fees in the block:

    • The subsidy halves every 210,000 blocks (roughly every 4 years) – this is the halving.
    • Over time, BTC issuance goes to zero and miners will be paid mostly by transaction fees.
  7. Step 7: Chain Selection (Longest Chain Rule)

    If two miners find a valid block at almost the same time, a temporary fork can appear. Nodes follow the chain with the most accumulated proof-of-work (often called “the longest chain”). Losing blocks become orphans.

4. Difficulty, Hashrate and Halving

4.1. Difficulty Adjustment

Every ~2 weeks (2016 blocks) Bitcoin automatically adjusts the mining difficulty so that blocks are found on average every 10 minutes.

If blocks were found too fast → difficulty increases. Too slow → difficulty decreases.

4.2. Network Hashrate

Hashrate measures how many hashes per second are produced by all miners together. Higher hashrate means:

  • Stronger security (harder to attack the network).
  • More competition between miners for the same block reward.

4.3. Halving

Approximately every 4 years the block subsidy is cut in half. This enforces Bitcoin’s fixed supply of 21 million BTC and makes mining rewards more scarce over time.

5. Mining Methods: Solo vs Pool

Solo Mining

  • You run your own ASICs and connect directly to the Bitcoin node.
  • If you find a block → you keep 100% of the reward.
  • Very high variance: for small hashrate, you might never find a block.

Pool Mining

  • You join a mining pool (F2Pool, Foundry, etc.).
  • The pool combines hashrate of many miners and pays out proportionally to your contribution (PPS, FPPS, PPLNS models).
  • Much more stable, predictable income compared to solo mining.

6. Economics & Risks of Bitcoin Mining

  • Hardware price and delivery time (ASIC market is cyclical).
  • Electricity price and possible changes in energy contracts.
  • Bitcoin price volatility.
  • Difficulty increases when more miners join.
  • Regulation and local restrictions in some countries.

Many operators use profitability calculators to estimate expected return, but all inputs (BTC price, difficulty, electricity) can change.

7. Summary

Bitcoin mining transforms electricity and specialized hardware into network security. Miners:

  • Verify and order transactions.
  • Compete via proof-of-work.
  • Secure the blockchain by making attacks extremely expensive.
  • Receive newly issued BTC and transaction fees as a reward.

Whether you plan to mine yourself or just want to understand the system, knowing how mining works is essential to understanding Bitcoin as sound money.

8. Go Deeper into Bitcoin Mining

This page gives you a structured overview of how mining works. If you want to go much deeper into the technology, economics and future of Proof-of-Work, check out our dedicated book:

Bitcoin Mining: The Complete Guide to the Technology, Economics & Future of Proof-of-Work

by The BTC Media

  • Explains mining from first principles – blocks, nodes, PoW, difficulty and security.
  • Breaks down profitability, CAPEX/OPEX, electricity, and real-world business models.
  • Covers energy, grids, and how mining fits into the broader Bitcoin ecosystem.
📘 Get the book on Amazon