Right off the bat – you can’t mine a bitcoin. You can mine a block of bitcoins.
Update June 7th 2018:
The Bitcoin hashrate jumped nearly 5 exahash in the last 2 weeks alone. To put that gain in perspective, it took ~8.5 years for the entire network hashrate to reach 5 EH for the first time. Miners are entering at an astonishing rate.
The average cost to mine 1 bitcoin: most recent numbers between 4k and $6k. It’s going up fairly quickly.
Now, read on for more in depth explanation …
This question has no fixed answer as there is something called mining difficulty. It is a dynamic parameter that controls hash power needed to mine a bitcoin block.
New bitcoins are generated roughly every 10 minutes, but your ability to earn those newly created bitcoins is dependent on how much computational power you have relative to how much computational power is on the network.
One of the points of bitcoin is that the cost of successive bitcoins increases steadily. So there is no standard difficulty: the first ones were easy, the last will be incredibly hard. Let’s make couple of points clear:
- You can’t “mine a bitcoin”. What you can mine is a block, which is currently rewarded with 12,5 bitcoins (plus the fees of included transactions)
- there’s a (more or less) fixed number of 1,800 BTC gained from mining each day, until the block reward halves in 2021. Those coins can be viewed as being shared by the whole network proportionally to the computing power of each player.
- What most small miners do (and even some big ones) is pooled mining: you contribute your computing power to a pool, which does the actual mining and reward you with a fraction of the mined bitcoin. With this system, you will have earned 1 bitcoin when you have contributed about 1/25th of the computing power to mine a block (approximately; the details depend on the pool’s rules and the transaction fees too).
- The problem is that the Bitcoin difficulty is constantly adjusting to keep the average time between two blocks more or less constant at 5 minutes. Which mean that the more computing power is dedicated to mining bitcoin (in total), the more computing power you will need to mine the next blocks. This has driven an insane arms race among the miners, which means that it is now practically impossible to mine anything significant with non-specialized hardware (regular PCs).
Miners now use ASICs, specialised hardware designed to mine bitcoin (and cryptocurrencies with the same cryptographic basis) that can do nothing else but are several order of magnitude faster (and more energy efficient) than general purpose computers for that specific task.
To mine bitcoin you need Application Specific Integrated Circuit (ASIC) equipment that has been made just for mining bitcoin.
To achieve a whole block (12,5 BTC) with solo mining in a month you’re going to need about 3000 TH/s.
Total hashrate: 14Million TH/s divided by 6*24*365/12 = 4380 blocks a month = 3000TH/s
So you need about 115x AntMiner S9s which cost about US$ 1,288 each, so US$ 148,120.
Mining bitcoin is now a business, in the hands of professional miners that have invested significant money in infrastructure. If you don’t want to be a professional miner and invest at very least a few thousands of €$£ in it, just give up mining. Historically, more often than not, people are better off buying Bitcoins directly for cash and holding them and let the price appreciate versus putting that money directly into hardware equipment.