Why 21 Million Is The Maximum Number Of Bitcoins Can Be Created

Artiom Baloian
3 min readDec 18, 2018

--

Introduction

While Bitcoin investors continue to buy and sell Bitcoin (BTC is the ticker of Bitcoin), I would like to show you why 21 million is the maximum Bitcoins that can be created. Why 21 million and why not billions?

In this post I am going to provide a mathematical explanation to justify why it is 21 million. An economical explanation is beyond the scope of this post, although I am always following and/or reading articles about this topic written by economists.

Bitcoin Transaction

A transaction is a transfer of Bitcoin value and all transactions are stored in the blockchain. In order to make transactions happen and verify them, a miner has to mine a block. After mining, a block will be added to the blockchain. While a miner is mining a block, at the same time they are also creating new Bitcoins from scratch and getting Bitcoins (besides transaction fee) as a reward for mining a block. In Bitcoin protocol mining one block takes about 10 minutes.

If a generation transaction as an input has a “coinbase” parameter instead of “scriptSig/ scriptPubKey” it will create Bitcoin from nothing. It is another topic to talk about and provide details on how mining and transactions work in Bitcoin protocol.

Calculate Bitcoins

The Bitcoin protocol specifies that the reward for adding a block will be halved every 210,000 blocks (approximately every four years). Eventually, the reward will decrease to zero and will be reached sometime in 2140 (Yes, you see it correct, it is 122 years from now [December, 2018]).

1 block per 10 minutes
(60 / 10) = 6 blocks per hour
(24 * 6) = 144 blocks per day
(365 * 144) = 52560 blocks per year
(4 * 52560) = 210240 ~= 210,000 blocks in four years

A Genesis Block is the first block of a Bitcoin Blockchain. Reward for the first block was 50 BTC and went to 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa Bitcoin address, which is most probably Satoshi’s address.

Note that after 210,000 blocks, the reward is divided by 2 and mining complexity increases. Let’s calculate the sum of all the block rewards.

50 + 25 + 12.5 + 6.25 + 3.125 + 1.5625 + … + 0.000000001 = 100

As all 210,000 blocks get the same reward, therefore, 210,000 * 100 = 21,000,000 (21 million).

I have to mention that 0.000000001 is the monetary unit of Bitcoin, which is called Satoshi.
So, 1 Satoshi = 0.000000001 BTC, therefore 2.1 quadrillion monetary units of currency (Satoshi) will be by 2140. This is likely the largest number estimated to be needed for a global currency.

The next reward drop day is on 26 May 2020 and the coin reward will decrease from 12.5 to 6.25 coins. If you want to follow Bitcoin blockchain data in real time check out Bitcoin Block Reward Halving Countdown.

Bitcoin Halving and Reward in Source Code

This may come as a surprise, but Bitcoin initial reward and maximum number of Bitcoins are hardcoded.

The initial reward was 50 * COIN, which is the constant 100 million satoshis. Line 1157 specifies that if 50 has been divided 64 times, the last Bitcoin will be released into the market and the total 21 million Bitcoins will be in circulation.

Here is the Bitcoin hard-coded amount.

As you can see line 14 specifies Bitcoin unit (satoshi) and line 25 specifies maximum number of Bitcoins.

--

--