<blockquote>
  <p>How can someone calculate the current/real-time value of a Bitcoin
  block?</p>
</blockquote>

<p>Steps:</p>

<ol>
<li>run <code>bitcoin-cli getblockcount</code> to get current <strong>block_height</strong></li>
<li>current_block_reward = 50 / [(block_height MOD 210000) + 1]</li>
</ol>

<blockquote>
  <p>What is the equation/algorithm used to determine this?</p>
</blockquote>

<p>Value the of a Bitcoin block defined <a href="https://github.com/bitcoin/bitcoin/blob/v0.10.0/src/main.cpp#L1223" rel="nofollow">here</a>. The default value is 50 * 100,000,000 Satoshis. <br/></p>

<p>After every "<strong>SubsidyHalvingInterval</strong>" blocks, the reward of each block halved. The <strong>SubsidyHalvingInterval</strong> is defined <a href="https://github.com/bitcoin/bitcoin/blob/v0.10.0/src/chainparams.cpp#L118" rel="nofollow">here</a></p>

<pre><code>CAmount GetBlockValue(int nHeight, const CAmount&amp; nFees)
{
    CAmount nSubsidy = 50 * COIN;
    int halvings = nHeight / Params().SubsidyHalvingInterval();

    // Force block reward to zero when right shift is undefined.
    if (halvings &gt;= 64)
        return nFees;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy &gt;&gt;= halvings;

    return nSubsidy + nFees;
}
</code></pre>

CC BY-SA 4.0
2023-03-18T09:33:28.170Z
Actually the block reward is `50/(2**(630001 // 210000))`
ManuelSchneid3r
CC BY-SA 3.0
2015-04-09T18:27:09.720Z
2015-04-09T18:27:09.720Z
moshaholo
<p>You can also use the <a href="http://blockexplorer.com/q/totalbc" rel="nofollow">BlockExplorer API</a> <em>totalbc</em> query: <code>http://blockexplorer.com/q/totalbc/####</code>, where <code>####</code> can be a past or future block number, and the return value is the total BTC in circulation. <em><a href="http://blockexplorer.com/q/bcperblock" rel="nofollow">bcperblock</a></em> may also be helpful.</p>

<p>See <a href="http://blockexplorer.com/q/" rel="nofollow">BlockExplorer.com/q/</a> for a full list of queries. </p>

CC BY-SA 3.0
2015-04-14T08:11:36.140Z
2015-04-14T08:11:36.140Z
Wizard Of Ozzie
<p>How can someone calculate the current/real-time value of a Bitcoin block?</p>

<p>What is the equation/algorithm used to determine this?</p>

<p>I've found a few resource online, but I'm a little confused</p>

CC BY-SA 3.0
2015-04-09T18:03:00.707Z
By value, are you asking about the size of the reward, or the rules about whether it's valid? Or are you talking about the value of Bitcoin?
Nick ODell
CC BY-SA 3.0
2015-04-09T18:33:24.953Z
Reward for valid block
Mark
<mining-reward>
Bitcoin Block Reward value
Mark
# Bitcoin Block Reward value

(Asked by: username_0 on 2015-04-09)

How can someone calculate the current/real-time value of a Bitcoin block?

What is the equation/algorithm used to determine this?

I've found a few resource online, but I'm a little confused

**Tags:** mining-reward

> **Comments:**
> **username_1**: By value, are you asking about the size of the reward, or the rules about whether it's valid? Or are you talking about the value of Bitcoin?  
> **username_0**: Reward for valid block  

---

## 2 answers

### Answer by username_2 on 2015-04-09. Score: 1 | Accepted answer

> How can someone calculate the current/real-time value of a Bitcoin
> block?

Steps:

1. run `bitcoin-cli getblockcount` to get current **block\_height**
2. current\_block\_reward = 50 / [(block\_height MOD 210000) + 1]

> What is the equation/algorithm used to determine this?

Value the of a Bitcoin block defined [here](https://github.com/bitcoin/bitcoin/blob/v0.10.0/src/main.cpp#L1223). The default value is 50 \* 100,000,000 Satoshis.

After every "**SubsidyHalvingInterval**" blocks, the reward of each block halved. The **SubsidyHalvingInterval** is defined [here](https://github.com/bitcoin/bitcoin/blob/v0.10.0/src/chainparams.cpp#L118)

```
CAmount GetBlockValue(int nHeight, const CAmount& nFees)
{
    CAmount nSubsidy = 50 * COIN;
    int halvings = nHeight / Params().SubsidyHalvingInterval();

    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;

    return nSubsidy + nFees;
}

```

> **Comments:**
> **username_3**: Actually the block reward is `50/(2**(630001 // 210000))`  

---

### Answer by username_4 on 2015-04-14. Score: 1

You can also use the [BlockExplorer API](http://blockexplorer.com/q/totalbc) *totalbc* query: `http://blockexplorer.com/q/totalbc/####`, where `####` can be a past or future block number, and the return value is the total BTC in circulation. *[bcperblock](http://blockexplorer.com/q/bcperblock)* may also be helpful.

See [BlockExplorer.com/q/](http://blockexplorer.com/q/) for a full list of queries.


---

