Inside a Bitcoin mining machine, countless calculations take place every second. Most attempts produce no useful result. Occasionally, one succeeds, allowing a new block of transactions to be added to the Bitcoin blockchain.
This process, known as Bitcoin mining, does more than generate new coins. It helps the network maintain a shared transaction history without relying on a central authority.
At the heart of mining is a mechanism called Proof of Work (PoW), which requires miners to perform repeated cryptographic calculations to find a result that meets the network’s requirements.
How Does Bitcoin Mining Begin?
Mining starts when a miner prepares a candidate block containing transactions that may be added to the blockchain.

These transactions are generally selected from the mempool, a collection of unconfirmed transactions maintained by individual Bitcoin nodes. Miners can choose which valid transactions to include, often giving preference to those offering higher transaction fees.
For a closer look at how transactions reach this stage, see How Bitcoin Transactions Work: From Wallet to Blockchain.
The miner also creates a special transaction called a coinbase transaction, which allows the miner to claim the permitted block reward if the block becomes part of the accepted blockchain.
Once the transactions are arranged, mining software constructs an 80-byte block header. This contains several important pieces of information, including the previous block’s hash, a timestamp, the difficulty target in encoded form, and a value called a nonce.
The header also contains a Merkle root, a cryptographic summary derived from the transactions included in the block.
These components connect mining to the underlying blockchain structure, explained further in What Is Blockchain? The Technology Behind Bitcoin.
How Do Miners Find a Valid Hash?
This is the central part of Bitcoin mining.
A miner must find a block header hash whose numerical value is equal to or lower than a specific threshold known as the target.
A hash is a fixed-length output produced by a cryptographic function. Bitcoin mining applies SHA-256 (Secure Hash Algorithm 256-bit) twice to the block header, producing a 256-bit result.
The hash is commonly displayed as a string of hexadecimal characters, but Bitcoin evaluates it as a number.
To find a valid result, mining hardware repeatedly changes the nonce and calculates a new hash.
Each attempt produces a different, effectively unpredictable result. There is no practical way to determine in advance which nonce will generate a hash that meets the target.
If the available nonce values are exhausted, mining software can change additional data, such as an extra nonce inside the coinbase transaction. This changes the Merkle root and creates a new block header for further attempts.
The process resembles a lottery in which each hash calculation represents another attempt. A faster machine can make more attempts, but it cannot guarantee when a valid result will appear.
That repeated computational effort is what Proof of Work represents. Finding a valid hash is difficult, while checking the result is comparatively straightforward.
Why Does Bitcoin Mining Require Specialized Hardware?
During Bitcoin’s early years, mining could be performed using ordinary computer processors, known as Central Processing Units (CPUs).

As competition increased, mining shifted toward more powerful and specialized equipment.
Modern Bitcoin mining generally relies on ASICs (Application-Specific Integrated Circuits). These chips are designed to perform specific calculations efficiently rather than handle the broad range of tasks performed by conventional computers.
Bitcoin mining ASICs specialize in repeated SHA-256 hashing.
Their performance is measured by hashrate, which represents the number of hash calculations a machine can perform per second.
A higher hashrate generally increases a miner’s probability of finding a valid block, although success still depends on chance.
Because individual miners may face long periods without finding a block, many participate in mining pools. These groups combine computing resources and distribute earnings according to contributed work and the pool’s payout rules.
Mining also requires electricity to operate the hardware and supporting infrastructure. Equipment efficiency and energy costs therefore play an important role in mining operations.
What Happens When a Miner Finds a Valid Block?
Once a miner discovers a hash that meets the network’s target, the completed block can be broadcast to other Bitcoin nodes.
However, finding a suitable hash does not automatically make the block acceptable.
Computers running full nodes independently verify the block’s Proof of Work, transactions, structure, and compliance with Bitcoin’s consensus rules.
A block containing invalid transactions or an excessive reward will be rejected, even if its hash meets the required target.
If the block passes validation, it can become part of the node’s accepted blockchain. When competing valid chains exist, nodes follow the chain with the greatest accumulated Proof of Work.
The successful miner can claim a block reward consisting of newly issued Bitcoin, known as the block subsidy, and transaction fees from the included transactions.
The block subsidy decreases through Bitcoin’s halving schedule. This mechanism is explained in Why Is Bitcoin Limited to 21 Million Coins?.
Why Does Bitcoin Adjust Mining Difficulty?
Bitcoin is designed to produce a new block approximately every 10 minutes on average. This does not mean a block appears precisely every 10 minutes.
Some blocks are discovered quickly, while others take considerably longer.
To maintain the intended average, Bitcoin adjusts mining difficulty every 2,016 blocks, roughly once every two weeks.
If blocks have been produced faster than the target pace, the difficulty increases. If they have been produced too slowly, it decreases.
This adjustment changes the target that miners must satisfy.
A lower numerical target makes finding a valid hash more difficult, requiring more attempts on average. A higher target makes the process easier.
The adjustment helps maintain a relatively stable block production rate even as the network’s total computing power changes.
Why Is Mining Important to Bitcoin?
Bitcoin mining makes adding new blocks computationally expensive while allowing full nodes to verify the results independently.
It also contributes to the security of the transaction history. Attempting to replace an older block would require rebuilding the affected portion of the blockchain and producing a competing valid chain with more accumulated Proof of Work.
The deeper a block is buried beneath newer blocks, the more computational effort is generally required to reverse its transactions.
Mining does not make Bitcoin immune to every possible attack. Its security depends on the interaction between Proof of Work, independent validation, and the computing resources participating in the network.
Together, these mechanisms allow Bitcoin to maintain a shared transaction record without assigning control to a single organization.
References
- Nakamoto, S. (2008). Bitcoin: A Peer-to-Peer Electronic Cash System. Sections 4–6.
https://bitcoin.org/bitcoin.pdf - Bitcoin Developer Documentation. Mining.
https://developer.bitcoin.org/devguide/mining.html - Bitcoin Developer Documentation. Block Chain.
https://developer.bitcoin.org/devguide/block_chain.html - Bitcoin.org. Frequently Asked Questions — Mining.
https://bitcoin.org/en/faq#mining



