Bitcoin networkBeginner10 min read

Bitcoin mining: hashes, targets, pools and electricity costs

Follow a block template through proof of work, understand pool shares and reward variance, and calculate operating costs with explicit assumptions.

A valid template is hashed against a target; pools measure work while operating costs continue regardless of luck.
A valid template is hashed against a target; pools measure work while operating costs continue regardless of luck.

The quick answer

Mining repeatedly hashes candidate block headers until a hash satisfies the network target. A valid block must also obey every consensus rule; hashing power cannot make invalid transactions acceptable to validating nodes.

A target turns hashing into measurable work

Each trial has a tiny independent probability of falling at or below the target. More hashes create more opportunities, not progress toward a guaranteed win. Difficulty summarizes how demanding the target is relative to a reference target.

Before you start

  • Basic knowledge of blocks, transactions and confirmations.
  • A distinction between hash rate in H/s and power in watts.
  • Actual hardware and electricity figures if calculating a personal scenario.
  • The pool’s current payout rules, fees and minimum withdrawal policy if comparing pools.

Step by step

  1. 1

    Understand the candidate block

    A mining node or pool prepares a template containing a valid chain reference, transactions and a coinbase transaction. Mining hardware searches variations of its header.

  2. 2

    Separate blocks from shares

    A pool asks workers for easier proofs called shares to measure contributed work. Most shares are not valid network blocks and do not create new bitcoin.

  3. 3

    Calculate a full operating scenario

    Use measured wall power, electricity tariff, pool terms, expected uptime and realistic hardware costs. Test several revenue and difficulty assumptions instead of treating a calculator output as income.

Worked example

A miner drawing 3 kW uses 72 kWh per day. At 0.10 currency units per kWh, electricity costs 7.20 per day. If gross daily receipts are 8.00 and a 2% pool fee applies, 0.64 remains before hardware, cooling, repairs and other costs.

Detailed walkthrough

Treat every hash as an independent trial

Bitcoin proof of work hashes the block header with SHA256 twice. Interpreted as a number, the resulting hash must be no greater than the target. For an ideal uniformly distributed 256-bit hash, the success probability for one trial is approximately the number of acceptable values divided by 2 to the power 256. Lowering the target leaves fewer acceptable results and increases the expected work.

Mining hardware changes permitted header inputs and tries again at high speed. A failed hash is not partly successful work that another trial finishes. Ten minutes is the network’s target average block interval, not a countdown timer. Sometimes several blocks arrive quickly and sometimes there is a long gap, even if total hash rate has not changed.

Many different header hashes miss the target; an independently generated hash at or below it provides valid proof of work.
Figure 1 · Many different header hashes miss the target; an independently generated hash at or below it provides valid proof of work.

Connect target, difficulty and network adjustment

Difficulty expresses a ratio between a reference target and the current target. Higher difficulty means a smaller target and, on average, more hashes per block. Hash rate measures attempted hashes per second; difficulty describes the acceptance threshold. They are related through block production but are not interchangeable units, and the network does not directly read every miner’s live hash rate.

On Bitcoin mainnet, the normal difficulty adjustment occurs every 2,016 blocks using the elapsed time of the adjustment period, subject to protocol bounds. The intended long-run pace is roughly one block per ten minutes. If hash rate rises, blocks can arrive faster until adjustment; if it falls, blocks can arrive slower. A revenue estimate that fixes difficulty indefinitely hides an assumption that may dominate its result.

Understand what the miner is actually hashing

A block template includes a reference to the previous block, candidate transactions and information needed to construct the coinbase transaction. The header commits to the transaction set through its Merkle root and includes fields such as time, encoded target and nonce. A worker can vary the nonce and other permitted work data; changing coinbase extra data changes the Merkle root and creates more candidate headers.

The coinbase transaction may claim at most the allowed block subsidy plus included transaction fees. For block heights 840,000 through 1,049,999, the subsidy is 3.125 BTC; fees vary independently. Finding a sufficiently low hash is necessary but insufficient. Other nodes still check the block’s transactions, subsidy, weight and all other rules. A block paying an excessive reward is rejected even when its proof of work is valid.

Validated transactions and a coinbase transaction determine the Merkle root in a header linked to the previous block.
Figure 2 · Validated transactions and a coinbase transaction determine the Merkle root in a header linked to the previous block.

Separate pool shares, accepted blocks and payouts

A mining pool coordinates work and sets a share target easier than the Bitcoin network target. A submitted share demonstrates a sample of hashing work. Only a share that also satisfies the network target can be a candidate Bitcoin block, and the full block must remain valid. Accepted-share counts therefore measure contribution rather than the number of network blocks mined.

Payout systems distribute risk differently. A pay-per-share arrangement generally pays according to accepted work under the pool’s terms; a proportional or last-N-shares arrangement depends more directly on blocks the pool finds and its accounting window. Labels such as PPS, FPPS and PPLNS require reading the actual fee and payout rules. Check stale or rejected shares, withdrawal thresholds, custody of unpaid balances and whether transaction fees are included.

Observed resultWhat it means
Accepted shareWork meets the pool’s assigned target
Network-valid proofHeader also meets Bitcoin’s harder target
Accepted Bitcoin blockProof and every consensus rule pass
Pool payoutPool accounting sends the worker an amount under its terms

Calculate expectations without promising a schedule

Consider a purely illustrative 200-TH/s miner and a 1,000-EH/s network. Convert units first: the miner contributes about 0.0000002 of network hash rate. At an assumed 144 blocks per day, its expected solo result is 0.0000288 blocks per day, corresponding to about 34,722 days per expected block. These are hypothetical inputs, not current network measurements or a prediction that a block arrives on that day.

A small miner can find a block immediately or never find one during its useful life. Under a simplified independent-trial model, long-run expectation and the probability of any near-term payout are very different. A pool can reduce payout variability by sharing many workers’ results, while fees and counterparty exposure remain. Compare expected net receipts and variance separately; multiplying hash share by block rewards does not establish a guaranteed daily cash flow.

The same expected work can produce uneven rewards; pooling changes payout variance rather than making proof of work certain.
Figure 3 · The same expected work can produce uneven rewards; pooling changes payout variance rather than making proof of work certain.

Calculate electricity and test the full cost scenario

Measure power at the wall, including the power supply and any dedicated cooling. Convert watts to kilowatts, then multiply by operating hours to obtain kWh. In the worked example, 3 kW times 24 hours is 72 kWh. At 0.10 currency units per kWh that costs 7.20. Gross receipts of 8.00 minus a 2% pool fee leave 7.84, then electricity leaves 0.64 before other costs.

That simplified example breaks even on electricity alone at about 0.1089 currency units per kWh: 7.84 divided by 72. Hardware purchase, depreciation, repairs, ventilation, connectivity, downtime and other charges lower the affordable tariff. Repeat the calculation with lower receipts, higher difficulty and realistic uptime. Include rejected shares and pool withdrawal costs where relevant. A positive operating margin is not the same as recovering the equipment purchase price.

Troubleshooting

ProblemLikely causeWhat to do
The profitability estimate differs by a factor of 1,000Hash-rate or power units were mixed, such as TH/s with PH/s or watts with kilowatts.Convert every input to a common unit before calculating.
The pool sees fewer accepted hashes than the device reportsStale work, rejected shares, connectivity or reporting windows can differ.Compare accepted work over matching time periods and inspect rejection reasons.
Shares arrive but no network block is foundThe pool’s share target is easier than Bitcoin’s target.Treat shares as work measurements and evaluate block luck over an appropriate period.
Revenue covers power but the setup loses money overallHardware and other operating costs were omitted.Include depreciation, cooling, repairs, downtime and all applicable charges.

Before you continue

A related question

Does running Bitcoin Core mine bitcoin?

A normal full node validates and relays. Competitive mainnet mining requires specialized hashing hardware or an explicit mining arrangement; running node software alone does not earn rewards.

More questions

Can a pool make an invalid block valid?

No. Every validating node applies its own consensus rules. A pool’s hash rate does not authorize extra subsidy or invalid spends.

Does difficulty immediately follow a miner switching off?

Mainnet difficulty changes at adjustment boundaries under the protocol. Block intervals can change between those adjustments as hash rate changes.

Is a quoted pool return guaranteed?

Read the payout contract and assumptions. Hash rate, accepted work, network conditions, pool fees, downtime and payment policies affect what you actually receive.

Try it with a tool

Sources & further reading

Source links checked on 16 Oct 2026. Examples explain the mechanics; provider fees and features can change.

  1. Bitcoin Developer Guide: mining developer.bitcoin.org
  2. Bitcoin Developer Reference: block headers developer.bitcoin.org
  3. Bitcoin Core 31: getblocktemplate bitcoincore.org
  4. Bitcoin Core 31: proof of work and difficulty github.com
  5. Braiins Pool: rewards and payouts academy.braiins.com

Keep learning

All tutorials

Search 1Bitcoin

Tools & guides

Hub listings