What is Bitcoin Mining? How It Works, the Halving, and What Happens Next
Most people know Bitcoin mining involves computers and electricity. Few understand what is actually happening at a technical level, why it matters, or what the long-term economics look like as the supply runs out.
This guide goes deep. It covers how mining works at a technical level, the economics of block rewards and the halving, what miners do beyond just minting Bitcoin, and what happens when the last coin is mined.
How Bitcoin Mining Works
At its core, Bitcoin mining is the process by which new transactions are verified, grouped into blocks, and permanently added to the blockchain. Miners are the participants who do this work. In return, they are rewarded with newly created Bitcoin.
But the mechanics of how they do it are more interesting than that description suggests.
Hash Functions and SHA-256
Every block added to the Bitcoin blockchain must contain a valid proof of work. This proof is generated using a cryptographic hash function called SHA-256.
A hash function takes any input, a transaction, a document, a word, and converts it into a fixed-length string of characters called a hash. SHA-256 always produces a 64-character hexadecimal output. The same input always produces the same output. But change even one character in the input and the output changes completely and unpredictably.
For example, the word "Bitval" might produce a hash like:
3b4c8f2a1e9d7c6b5a4f3e2d1c0b9a8...
Change it to "bitval" and you get something entirely different:
9f1e3d7c5b4a2f8e6d0c9b7a5e4f3d2...
This property, called the avalanche effect, is what makes SHA-256 useful for securing the Bitcoin network.
The Target Hash and the Nonce
When a miner wants to add a new block to the blockchain, they must produce a hash of that block's header that is below a specific target value. The target is a number set by the network, and meeting it is computationally difficult by design.
The block header contains several pieces of data including the hash of the previous block, a timestamp, a summary of the transactions in the block called the merkle root, and a field called the nonce.
The nonce is a number that miners are free to change. Because changing the nonce changes the input to the hash function, it changes the output. Miners increment the nonce billions of times per second, hashing the block header each time, until they find a hash that meets the target.
This is what mining actually is. Not digging for Bitcoin. Running billions of calculations per second in a race to find a number that produces a valid hash. When a miner finds it, they broadcast the new block to the network. Other nodes verify it in milliseconds. If it is valid, it is added to the chain and the miner receives the block reward.
What is Inside a Bitcoin Block?
Each block contains:
Block header: A summary of the block's metadata. Includes the hash of the previous block (which is what creates the chain), a timestamp, the difficulty target, the nonce, and the merkle root.
Merkle root: A single hash that summarises all transactions in the block. Constructed by hashing pairs of transaction IDs together repeatedly until a single root hash remains. This allows anyone to verify that a specific transaction is included in a block without downloading the entire block.
Transaction list: Every transaction included in the block. Miners select which transactions to include, generally prioritising those with higher fees.
Coinbase transaction: The first transaction in every block. This is where the block reward is sent to the miner's address. It is also where the miner can embed a small message into the blockchain. Satoshi Nakamoto famously embedded the headline "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" into the genesis block.
Mining Difficulty and the Difficulty Adjustment
Bitcoin is designed to produce a new block every ten minutes on average. But as more miners join the network and total computing power increases, blocks would be found faster if nothing adjusted.
The difficulty adjustment solves this. Every 2,016 blocks, which is approximately every two weeks, the Bitcoin protocol automatically recalculates the difficulty target based on how long the last 2,016 blocks took to mine. If they were found too quickly, difficulty increases. If they were found too slowly, difficulty decreases.
This is one of Bitcoin's most elegant design features. No central authority sets the difficulty. The protocol adjusts itself automatically to maintain the ten minute block time regardless of how much or how little computing power is pointed at the network.
In practical terms, this means Bitcoin's block production is extraordinarily predictable. Despite enormous swings in the total hash rate over Bitcoin's history, the average block time has remained close to ten minutes for over fifteen years.
The Block Reward and Bitcoin Supply
When a miner successfully adds a block to the blockchain, they receive a block reward consisting of two components: newly created Bitcoin and transaction fees from the transactions included in the block.
The current block reward is 3.125 BTC per block, following the April 2024 halving.
At roughly 144 blocks per day (ten minutes per block, six per hour, 144 per day), this means approximately 450 new Bitcoin are created every day under the current reward schedule.
Annualised, that is approximately 164,250 new Bitcoin per year at the current rate.
Approximately 19.7 million Bitcoin have been mined so far. The maximum supply is capped at 21 million. That leaves roughly 1.3 million Bitcoin still to be mined, to be released gradually over the next century.
The Bitcoin Halving
The halving is one of the most important and most discussed events in Bitcoin's economic calendar.
Every 210,000 blocks, which takes approximately four years, the block reward is cut in half. This is hard-coded into the Bitcoin protocol and cannot be changed.
History of Bitcoin halvings:
| Date | Block | Reward Before | Reward After |
|---|---|---|---|
| November 2012 | 210,000 | 50 BTC | 25 BTC |
| July 2016 | 420,000 | 25 BTC | 12.5 BTC |
| May 2020 | 630,000 | 12.5 BTC | 6.25 BTC |
| April 2024 | 840,000 | 6.25 BTC | 3.125 BTC |
| ~2028 | 1,050,000 | 3.125 BTC | 1.5625 BTC |
The halving reduces the rate at which new Bitcoin enters circulation. Combined with the fixed maximum supply, it creates a predictable and diminishing supply schedule that is unlike any other asset or currency in history.
Historically, halvings have preceded significant bull markets. The logic is straightforward: the same demand, or more demand, competing for less new supply tends to push prices higher. However, past performance does not guarantee future results and the relationship between halvings and price is debated.
What is not debated is the supply math. The halving will continue until the block reward reaches zero, which is estimated to happen around the year 2140. At that point, no more Bitcoin will ever be created.
Mining Hardware
Mining hardware has evolved dramatically since Bitcoin's launch in 2009.
CPUs (2009): Satoshi Nakamoto mined the first blocks on a standard laptop CPU. Anyone could mine Bitcoin from their home computer.
GPUs (2010): Graphics processing units are better at the parallel calculations required for SHA-256 hashing. GPU mining quickly replaced CPU mining and made home CPU mining non-competitive.
FPGAs (2011): Field-programmable gate arrays offered more efficiency than GPUs but were complex to program and short-lived as the dominant hardware.
ASICs (2013 onwards): Application-specific integrated circuits. Chips designed exclusively for SHA-256 hashing. Nothing else. They are orders of magnitude more efficient than any general-purpose hardware and have completely dominated Bitcoin mining ever since. A modern ASIC can perform over 100 terahashes per second, which means over 100 trillion hash calculations every second.
The dominance of ASICs has significant implications. Mining is no longer accessible to individuals with standard hardware. It requires substantial capital investment in specialised equipment, cheap electricity, and often industrial-scale operations to be profitable.
Mining Pools
Because the probability of a single miner finding a valid block hash is proportional to their share of the total network hash rate, solo mining is statistically viable only for operations with enormous hash power.
Mining pools solve this by combining the hash power of many miners. When the pool finds a block, the reward is distributed among participants proportionally to the hash power they contributed.
Pools smooth out income for individual miners. Instead of potentially waiting months or years between solo block finds, pool participants receive small, frequent payouts.
The tradeoff is centralisation risk. The top five mining pools currently control a majority of Bitcoin's total hash rate. If a single entity were to control more than 50% of the network's hash power, they would theoretically be able to execute a 51% attack, rewriting recent transaction history. In practice, the cost of such an attack and the damage it would do to the value of the attacker's own Bitcoin holdings makes it economically irrational, but it remains a theoretical concern.
What Happens When All Bitcoin is Mined?
The last Bitcoin is estimated to be mined around 2140. At that point, the block reward drops to zero and miners receive no new Bitcoin for adding blocks to the chain.
The network's long-term security model therefore shifts entirely to transaction fees.
Today, transaction fees represent a relatively small portion of miner revenue. As the block reward continues to halve and eventually reaches zero, fees must grow to compensate. The assumption is that as Bitcoin's adoption grows and the network processes more transactions and higher-value transactions, aggregate fee revenue will be sufficient to incentivise continued mining.
This is one of Bitcoin's open economic questions. Whether transaction fees alone can sustain the level of mining security that Bitcoin currently enjoys is not fully resolved. It depends on future adoption, transaction volume, fee market dynamics, and the evolution of the protocol itself.
Secondary Actions of Miners
Beyond minting new Bitcoin, miners play several other important roles in the Bitcoin ecosystem.
Transaction fee selection and prioritisation
Miners choose which transactions to include in their blocks. In practice, they prioritise transactions with higher fees per byte. During periods of high network congestion, users compete by increasing their fees to have transactions confirmed faster. Miners benefit directly from this competition.
Ordinals and inscription data
Since 2023, the Ordinals protocol has allowed arbitrary data to be inscribed onto individual satoshis (the smallest unit of Bitcoin) by embedding data in transaction witness fields. Miners process these inscription transactions like any other, and the fee revenue from Ordinals activity has at times been significant, briefly making inscription fees a substantial portion of total miner revenue.
Protocol upgrade signalling
Bitcoin protocol upgrades are deployed through a signalling mechanism where miners include flags in their blocks to indicate support for proposed changes. The activation of Segregated Witness (SegWit) in 2017 and Taproot in 2021 both relied on miners signalling readiness. This gives miners a meaningful role in Bitcoin's governance, though it is not an absolute veto since users and nodes also play a role in determining which rules they enforce.
Mempool management and fee market shaping
Miners observe the mempool, the pool of unconfirmed transactions waiting to be included in a block, and make decisions about transaction selection that influence the fee market. Some large mining operations run sophisticated fee estimation algorithms to maximise revenue per block.
Merge mining
Certain other blockchains use the same SHA-256 hashing algorithm as Bitcoin and allow miners to mine both chains simultaneously without additional computational work. This is called merge mining. Namecoin was the first merge-mined chain. It allows miners to earn additional revenue from other networks while contributing to their security.
Key Takeaway
Bitcoin mining is the mechanism that secures the network, validates transactions, and introduces new Bitcoin into circulation. Miners compete to find a valid hash for each new block by iterating through billions of nonce values per second. The difficulty adjusts automatically every two weeks to maintain a ten minute block time. The block reward halves approximately every four years, creating a predictable and diminishing supply schedule that will end around 2140 when the last Bitcoin is mined. At that point, the network's security will rely entirely on transaction fees. Beyond minting Bitcoin, miners also select transactions, shape the fee market, signal for protocol upgrades, and play an increasingly important role in the broader Bitcoin ecosystem through inscription activity and merge mining.
Ready to start your crypto journey? Sign up on bitval.com
FAQ
What do Bitcoin miners actually do?
Miners verify transactions, group them into blocks, and compete to add those blocks to the blockchain by finding a hash that meets the network's current difficulty target. They do this by incrementing a number called the nonce billions of times per second until a valid hash is found. In return, they receive newly created Bitcoin and transaction fees.
How long does it take to mine one Bitcoin?
This depends entirely on your hash rate relative to the total network hash rate. The network mines approximately 450 Bitcoin per day across all miners combined. A solo miner with a single ASIC representing a tiny fraction of total network hash rate would statistically wait years between block finds. In a mining pool, that same miner would receive proportional fractions of block rewards continuously.
How many Bitcoin are mined per day?
Approximately 450 Bitcoin per day under the current 3.125 BTC block reward, at roughly 144 blocks per day. This number will halve to approximately 225 per day after the next halving in approximately 2028.
Is Bitcoin mining profitable?
Profitability depends on several factors: hardware efficiency, electricity cost, Bitcoin price, and network difficulty. Industrial-scale operations with access to cheap renewable electricity can be highly profitable. Small-scale home mining is generally not competitive at current difficulty levels. Mining profitability calculators exist to model specific scenarios.
What happens when all Bitcoin is mined?
No new Bitcoin will be created. Miners will rely entirely on transaction fees for revenue. The long-term security of the network depends on whether fee revenue is sufficient to incentivise continued mining at a scale that makes the network secure. This is one of Bitcoin's open economic questions, with the answer depending on future adoption and transaction volume.