<p>You can calculate the total amount of when you know the last block in the block chain. You can check the number of block by holding your mouse on the icon in the lower right corner of the Bitcoin-Qt client.</p>

<p>Then you will need to use <a href="https://en.bitcoin.it/wiki/Controlled_Currency_Supply#Projected_Bitcoins_Long_Term" rel="nofollow">this table</a> to calculate the total amount of bitcoins there exist. This table just lists up the block rewards, which halves every 210,000 blocks and starts at 50 BTC.</p>

<p>Currently you can easily add the 10,500,000 BTC from the first 210,000 blocks with 25 times the current block count minus 210,000.</p>

<p>If you want to have an implementation that you can use forever, it would look like this (I used <a href="http://www.python.org/" rel="nofollow">Python</a>):</p>

<pre><code>def total_bitcoins(current_block_count):
    count = current_block_count
    reward = 5000000000 # satoshi
    total = 0 
    while count &gt; 0:
        total += min(count, 210000) * reward
        count -= 210000
        reward /= 2
    return total / 100000000.0
</code></pre>

<p>Note that this process limits the total amount of bitcoins that will ever be created to 20,999,999.9769.</p>

CC BY-SA 3.0
2013-11-12T15:09:19.267Z
It gives an error here: `prog.go:12: constant 5000000000 overflows int`
Steven Roose
CC BY-SA 3.0
2013-11-12T15:58:05.907Z
Golang implementation, updated version (seems the cloud instances aren't always 64-bit) http://play.golang.org/p/NfkefjHLED
Druska
CC BY-SA 3.0
2014-08-28T23:14:12.243Z
Thanks. Where do the values in the table that you linked to come from? Also, from where is the code that you pasted above?  Is it in the bitcoin core?
Alex Millar
CC BY-SA 3.0
2013-05-02T22:39:26.483Z
2013-05-02T22:58:51.893Z
2013-05-02T22:58:51.893Z
Steven Roose
<p>I know how to obtain this information from other means, I specifically want to know if it's possible for me to obtain this information using the Bitcoin-Qt client alone.</p>

<p>I am running it on Windows Vista and I don't have a miner set up.</p>

<p>Thanks.</p>

CC BY-SA 3.0
2013-05-02T21:47:24.847Z
The amount of bitcoins created is a simple function of the amount of blocks times the bitcoins per block. It seems rather pointless to make a command for that, if we already have a command that shows the block count.
Tom van der Woerdt
CC BY-SA 3.0
2013-05-02T22:08:58.110Z
Well, if you want it really accurately, you need to take unclaimed fees and duplicate coinbase transactions into account. The actual total sum of values of all unspent transaction outputs is 11105964.80381183 (as of block 234244).
Pieter Wuille
CC BY-SA 3.0
2013-05-02T23:01:04.793Z
@PieterWuille He askes "that have been created", not "that are in circulation".
Steven Roose
<bitcoin-core>
Is there a command I can type into Bitcoin-Qt to see the total number of bitcoins that have been created?
user991987
# Is there a command I can type into Bitcoin-Qt to see the total number of bitcoins that have been created?

(Asked by: username_0 on 2013-05-02)

I know how to obtain this information from other means, I specifically want to know if it's possible for me to obtain this information using the Bitcoin-Qt client alone.

I am running it on Windows Vista and I don't have a miner set up.

Thanks.

**Tags:** bitcoin-core

> **Comments:**
> **username_1**: The amount of bitcoins created is a simple function of the amount of blocks times the bitcoins per block. It seems rather pointless to make a command for that, if we already have a command that shows the block count.  
> **username_2**: Well, if you want it really accurately, you need to take unclaimed fees and duplicate coinbase transactions into account. The actual total sum of values of all unspent transaction outputs is 11105964.80381183 (as of block 234244).  
> **username_3**: @username_2 He askes "that have been created", not "that are in circulation".  

---

## 1 answers

### Answer by username_3 on 2013-05-02. Score: 3

You can calculate the total amount of when you know the last block in the block chain. You can check the number of block by holding your mouse on the icon in the lower right corner of the Bitcoin-Qt client.

Then you will need to use [this table](https://en.bitcoin.it/wiki/Controlled_Currency_Supply#Projected_Bitcoins_Long_Term) to calculate the total amount of bitcoins there exist. This table just lists up the block rewards, which halves every 210,000 blocks and starts at 50 BTC.

Currently you can easily add the 10,500,000 BTC from the first 210,000 blocks with 25 times the current block count minus 210,000.

If you want to have an implementation that you can use forever, it would look like this (I used [Python](http://www.python.org/)):

```
def total_bitcoins(current_block_count):
    count = current_block_count
    reward = 5000000000 # satoshi
    total = 0 
    while count > 0:
        total += min(count, 210000) * reward
        count -= 210000
        reward /= 2
    return total / 100000000.0

```

Note that this process limits the total amount of bitcoins that will ever be created to 20,999,999.9769.

> **Comments:**
> **username_3**: It gives an error here: `prog.go:12: constant 5000000000 overflows int`  
> **username_4**: Golang implementation, updated version (seems the cloud instances aren't always 64-bit) http://play.golang.org/p/NfkefjHLED  
> **username_5**: Thanks. Where do the values in the table that you linked to come from? Also, from where is the code that you pasted above?  Is it in the bitcoin core?  

---

