How do you calculate when 98% of Bitcoin will be mined? Trying to find a calculation to work out what year will an arbitrary percentage of bitcoin will be mined, specifically 98%.
I know it takes 10 minutes to mine 1 block but unsure how to use this?
Thank you for any help :)
I have created this Google sheet to calculate various metrics of the reward schedule. The numerical maximum of bitcoins that could be created is 20,999,949.9769 BTC.
0.98 × max = 20,579,950.977362

So, the network will have issued more than 98% of all bitcoins once there are more than 20,579,950.977362 BTC. Looking at the table I linked above, we see that at the end of the fifth epoch, 20,343,700 BTC will have been mined, and 20,671,825 BTC at the end of the sixth. This means that 98% of all bitcoin will be issued some time in the sixth reward epoch, i.e. the time between the fifth and sixth halving. Since the block subsidy is constant for the whole epoch, we can calculate how much will need to be issued in the sixth epoch to reach 98%:
98%×max - supply_after_5th_halving = amount_to_issue_in_6th_epoch

To reach 98%, 236,250.977362 BTC need to be mined in the sixth epoch.
The block subsidy is 1.5625 BTC per block in the sixth epoch.
236,250.977362 ÷ 1.5625 = 151,200.63

I calculate that 98% of all bitcoins will have been issued with the 151,201st block in the sixth epoch. Since the genesis block was at height 0, and each epoch has 210,000 blocks, the first block of the second epoch was 210,000. Likewise, the first block of the sixth epoch is 1,050,000 which makes the 151,201st block occur at height 1,201,200. Since the fifth halving is projected to happen in 2028 and the sixth halving in 2032, and 151,201 is slightly less than 3/4 of 210,000, the network should have issued 98% of all bitcoins in 2030 or 2031.