How Bitcoin Mining Works and Why Miners Do It
Bitcoin mining is the process where computers solve math puzzles to verify transactions and earn newly created bitcoin as a reward
Bitcoin mining is not about digging or extracting bitcoin from the ground. Instead, miners use powerful computers to solve complex mathematical puzzles. When a miner solves a puzzle correctly, they get to add a new block of transactions to the blockchain — the permanent record of all bitcoin transfers — and receive newly created bitcoin plus transaction fees as payment.
Think of miners as both accountants and security guards. They check that transactions are legitimate (you actually own the bitcoin you're sending), record those transactions in a block, and then prove they did the work by solving the puzzle. This process keeps the bitcoin network running without needing a bank or central authority in the middle.
Key Takeaways
- Miners use computers to solve math puzzles, and the first to solve it gets to add the next block of transactions to the blockchain and earn bitcoin.
- The puzzle difficulty adjusts automatically so that a new block is solved roughly every 10 minutes, no matter how many miners are competing.
- Mining requires significant electricity and specialized hardware called ASICs, which makes it profitable only in places with cheap power or at large scale.
- Miners compete directly with each other, so joining a mining pool lets you share the work and split rewards with other miners rather than mining alone.
What the math puzzle actually is
The puzzle miners solve is called a proof of work. Here's what happens: a miner takes a batch of pending transactions, adds a random number to them, and runs the whole thing through a mathematical function called SHA-256. The function produces a result — a long string of characters called a hash.
The puzzle is to find a random number that, when combined with the transactions and run through SHA-256, produces a hash that starts with a certain number of zeros. The more zeros required, the harder the puzzle. Miners don't solve this by thinking — they guess random numbers over and over, millions of times per second, until one produces the right result. The first miner to find it wins the right to add that block and gets the reward.
This puzzle has no shortcut. You cannot predict which random number will work; you have to try them. That's why it requires raw computing power, and why it's called "proof of work" — the miner has to do actual computational labor to prove they solved it.
How mining rewards work
When a miner successfully adds a block, they receive two types of payment. The first is block reward — newly created bitcoin that didn't exist before. The second is transaction fees — small amounts of bitcoin that people include in their transactions to incentivize miners to process them quickly.
The block reward started at 50 bitcoin per block in 2009 and is cut in half roughly every four years in an event called a halving. After the most recent halving in 2024, the reward is 6.25 bitcoin per block. This schedule is built into bitcoin's code and will continue until around 2140, when no new bitcoin will be created. After that, miners will earn only transaction fees.
Because a new block is solved roughly every 10 minutes, a miner who solves a block earns that reward when ready. However, the bitcoin is not spendable for 100 blocks (about 16 hours) — this rule prevents miners from spending rewards from blocks that might later be reversed if the network rejects their work.
Why difficulty adjusts automatically
As more miners join the network and computing power increases, blocks would be solved faster than 10 minutes if nothing changed. To keep the pace steady, the network automatically adjusts the puzzle difficulty every 2,016 blocks (roughly two weeks). If blocks are being solved too fast, the difficulty increases — more zeros are required in the hash. If blocks are being solved too slowly, difficulty decreases.
This adjustment is why bitcoin mining remains competitive even as technology improves. A miner with better hardware doesn't permanently solve blocks faster; the network straightforward makes the puzzle harder for everyone. The 10-minute target is maintained by design, which keeps the blockchain growing at a predictable rate and gives the network time to reach agreement on which transactions are valid.
Mining pools and solo mining
A solo miner competes against every other miner on the network to solve each puzzle. With millions of miners worldwide, a solo miner might wait months or years before solving a block and earning a reward. Most miners instead join a mining pool — a group that combines their computing power and shares rewards based on how much work each miner contributed.
In a pool, miners don't solve the full puzzle themselves. Instead, they solve smaller versions of it and submit their work to the pool operator, who combines everyone's efforts. When someone in the pool solves the full puzzle, the pool receives the block reward and distributes it to all members according to their contribution. This approach gives miners steady, predictable income instead of waiting for a rare big payout.
The trade-off is that pool operators take a fee — typically 1 to 3 percent of rewards — for organizing the work and distributing payments. Even with this fee, most miners earn more through a pool than they would mining alone.
Hardware and electricity costs
Bitcoin mining requires specialized computers called ASICs (process-specific integrated circuits). These are not regular computers; they are designed solely to solve bitcoin's puzzle as fast as possible. A modern ASIC costs between $500 and $10,000 depending on its power and efficiency.
The real cost of mining is electricity. An ASIC consumes 1,000 to 3,000 watts continuously, which translates to hundreds of dollars per month in power costs depending on your local electricity rate. In places where electricity is expensive, mining is unprofitable. In places where it's cheap — Iceland, parts of China, regions with abundant hydroelectric power — mining can be worthwhile.
A miner's profit depends on three things: the price of bitcoin, the cost of electricity, and the total computing power competing on the network. When bitcoin's price rises, mining becomes more profitable, which attracts new miners and increases difficulty. When price falls, unprofitable miners shut down, difficulty decreases, and the remaining miners earn more per block. The system self-corrects.
Mining and the bitcoin network
Mining serves two critical functions for bitcoin. First, it processes transactions — miners bundle pending transactions into blocks and add them to the blockchain, which is how transfers actually happen. Second, it secures the network. To reverse a past transaction, an attacker would have to redo all the computational work that miners did to create the blocks containing that transaction, which becomes exponentially harder the older the transaction is.
This security model is why bitcoin requires mining at all. Unlike a bank that uses a central database and trusts employees to keep it honest, bitcoin uses mining to create a distributed consensus — thousands of independent miners must agree that a transaction is valid before it's recorded. No single entity can control the network or reverse transactions.
Frequently Asked Questions
Can I mine bitcoin on my regular computer?
Technically yes, but you will not earn anything. ASICs are millions of times faster at solving the puzzle than a regular CPU or GPU. Your computer would spend years solving a single block while other miners solve thousands. The electricity cost would far exceed any reward.
How long does it take to mine one bitcoin?
A solo miner with a single modern ASIC might wait months or years. A miner in a pool with the same hardware might earn a fraction of bitcoin every few days, depending on the pool's size and the miner's share of its computing power. The exact time varies based on total network difficulty and your hardware's speed.
Is bitcoin mining bad for the environment?
Bitcoin mining uses significant electricity — estimates vary, but it consumes roughly as much as some countries. Whether this is "bad" depends on the energy source. Mining powered by renewable energy has a different environmental impact than mining powered by coal. The bitcoin network itself does not control where miners locate or what energy they use.
Do I need to mine to own bitcoin?
No. You can purchase bitcoin on an exchange, receive it as payment, or obtain it through other means. Mining is one way to acquire bitcoin, but it requires capital investment in hardware and ongoing electricity costs. For most people, buying bitcoin is simpler than mining it.
What happens when all 21 million bitcoin are mined?
Bitcoin's code limits the total supply to 21 million. Once all are mined (expected around 2140), no new bitcoin will be created. Miners will then earn only transaction fees. The network will continue to function as long as miners find transaction fees worth the cost of running their hardware.
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.