<p>The parameters you need to calculate this are:</p>

<p>E - the mining efficiency, measured in MHash/J. Data on this for various hardware is available in <a href="https://en.bitcoin.it/wiki/Mining_hardware_comparison">Mining hardware comparison</a> (though this take into account only the card's power and not of the system it is in). Or you can calculate it for a given system by dividing the total hashrate (in MHash/s) by the power consumed (in W).</p>

<p>c - the cost of electricity, measured in $/KWh.</p>

<p>B - the bitcoin reward per block.</p>

<p>D - the difficulty.</p>

<p>The cost to generate 1 BTC is:</p>

<p>c*D/(838*B*E)</p>

<p>For example, if E=2, c=0.1, B=50 and D=1,500,000, this is
0.1*1500000/(838*50*2) = $1.79</p>

<p>The 838 "magic number" comes from the various unit conversion factors - 2^32 hashes per difficulty-1 hash, 3,600,000 Joules per Kilowatt-hour, 1,000,000 Hashes per MHash.</p>

CC BY-SA 3.0
2013-03-07T04:01:50.933Z
can you revisit this? http://bitcoin.stackexchange.com/questions/8196/pricing-bitcoins
CQM
CC BY-SA 3.0
2011-10-17T21:28:59.067Z
I hate specifying the units in which each quantity should be measured. The proper way is to specify only the dimension and let the unit be part of the data encoded in the variable. But that would just add confusion for the purposes of this answer.
Meni Rosenfeld
CC BY-SA 3.0
2011-10-17T21:25:39.633Z
2011-10-17T21:25:39.633Z
Meni Rosenfeld
<p>As Bitcoin mining is very heterogeneous (that is, a lot of people use a wide variety of hardware), figuring this out would be really hard without the use of polling (as in, asking people questions, not long polling). One would need to get some statistical data on what hardware people have, how much they spend on electricity, and how much hashpower they have, not to mention how much they mine each day. Having all that, we could average it out and calculate something.</p>

<p>If you want to check how much your coin costs you, check out my calculator: <a href="http://tpbitcalc.appspot.com/" rel="nofollow">http://tpbitcalc.appspot.com/</a> .</p>

CC BY-SA 3.0
2011-10-17T20:39:23.633Z
2011-10-17T20:39:23.633Z
ThePiachu
<p><a href="https://bitcoin.stackexchange.com/questions/1606/world-wide-price-for-generating-1btc/1609#1609">Meni Rosenfeld's formula</a> is what you are you are looking for. It is not possible to calculate the production cost of one bitcoin because of these two variables:</p>

<blockquote>
  <p>E - the mining efficiency, measured in MHash/J. </p>
  
  <p>c - the cost of electricity, measured in $/KWh.</p>
</blockquote>

<p>There is a broad range of hardware which is not limited to GPUs - some people are mining with FPGAs for example - so you can't easily calculate the mining efficiency. The same happens with the cost of electricity because there are different prices for each country, hour of the day, residential/industrial systems, etc. And there are other factors such as the temperature (which reduces cooling costs) and alternative electricity sources (some people could be using solar panels for example). </p>

<p>That being said, you could grab the formula, find the <a href="http://www.theoildrum.com/node/7215" rel="nofollow noreferrer">average electricity price per country</a>, estimate an average mining efficiency (maybe based on the <a href="https://en.bitcoin.it/wiki/Mining_hardware_comparison" rel="nofollow noreferrer">hardware wiki list</a>) and reach a number, but it would be very inaccurate.</p>

<p>I made a script with a few examples:</p>

<pre><code>B = 50
D = 1500000
Cost: $0.536992840095   E = 2 c = 0.03
Cost: $2.14797136038    E = 2 c = 0.12
Cost: $3.75894988067    E = 2 c = 0.21
Cost: $0.894988066826   E = 1.2 c = 0.03
Cost: $3.5799522673     E = 1.2 c = 0.12
Cost: $6.26491646778    E = 1.2 c = 0.21
Cost: $3.5799522673     E = 0.3 c = 0.03
Cost: $14.3198090692    E = 0.3 c = 0.12
Cost: $25.0596658711    E = 0.3 c = 0.21

Cost: $0.171837708831   E = 25 c = 0.12
</code></pre>

<p>I chose 3 values for mining efficiency in Mhash/J: 2, 1.2 and 0.3 (the greater the better) and 3 values for electricity cost in USD: 0.03, 0.12, 0.21 (the smaller the better).<br>
Some boards, such as the 5850, have higher efficiency but we have to consider the system as a whole so 2 is still a high value. The average price of electricity per country can be found <a href="http://www.theoildrum.com/node/7215" rel="nofollow noreferrer">here</a>, but I am going to list a few examples:</p>

<ul>
<li>High electricity price - Ireland, Italy, Japan </li>
<li>Medium electricity price - US, France, Poland</li>
<li>Low electricity price - Mexico, Taiwan, Kazakhstan</li>
</ul>

<p>Using GPUs, the value ranges from $0.5 to $25 so it's not a small interval. The last line corresponds to the price of one bitcoin produced by an FPGA with electricity cost at $0.12 per KW/h: $0.17.</p>

CC BY-SA 3.0
2011-10-18T01:10:21.520Z
2011-10-18T02:16:46.810Z
2017-04-13T12:47:34.187Z
nmat
<p>As Meni Rosenfeld example indicates you can estimate the cost per coin for an individual system given you know the hashing hardware efficiency and electrical cost.</p>

<p>There is currently no way to estimate this for entire global network as hashing hardware and energy costs estimates.</p>

<p>One could use geo-location to determine the physical location from the IP of generating block and if you had a database of energy costs (even estimate per country) could get energy cost per block.</p>

<p>One extra complexity is that currently about 92% of blocks are created by pools so you will get the pool's IP address not the actual miner.  Pool's can have miners from all over the world making it difficult to estimate cost.</p>

<p>It would be possible to calculate this in real time however you would need the support of miners, miner software developers, and pool operators.  OpenCL library allows a miner software to query device name.  If miner's returned that data to the pool operators could see what hardware is being used in realtime.  If pool operators shared that data you could get an aggregate of global hardware distribution giving you the aproximate global efficiency.  With that you could use data on geolocation of nodes to aproximate average energy cost and thus determine global production price per coin.</p>

CC BY-SA 3.0
2011-10-17T21:52:51.093Z
2011-10-17T21:52:51.093Z
DeathAndTaxes
<p>Can we find an algorithm to compute the average price (as energy consumption) of 1 BTC being generated if we know: hash rate, difficulty, energy price?</p>

CC BY-SA 3.0
2011-10-17T20:19:36.560Z
This is very localized in time. Or are you looking for some method to gather that information automatically?
D.H.
CC BY-SA 3.0
2011-10-17T20:40:58.653Z
If this was a more general question of whether there are any reports on how much does it cost on average to generate 1BTC, or how would one calculate it, the question would be quite interesting. Care to alter it, John?
ThePiachu
CC BY-SA 3.0
2011-10-17T21:20:30.073Z
You also need to know energy consumed. With hash rate, difficulty, energy consumed, energy price, and block payout (currently 50 bitcoins per block) you can calculate the cost to produce one bitcoin.
David Schwartz
<mining-profitability><energy-consumption>
World-wide price for generating 1BTC
John
# World-wide price for generating 1BTC

(Asked by: username_0 on 2011-10-17)

Can we find an algorithm to compute the average price (as energy consumption) of 1 BTC being generated if we know: hash rate, difficulty, energy price?

**Tags:** mining-profitability, energy-consumption

> **Comments:**
> **username_1**: This is very localized in time. Or are you looking for some method to gather that information automatically?  
> **username_2**: If this was a more general question of whether there are any reports on how much does it cost on average to generate 1BTC, or how would one calculate it, the question would be quite interesting. Care to alter it, username_0?  
> **username_3**: You also need to know energy consumed. With hash rate, difficulty, energy consumed, energy price, and block payout (currently 50 bitcoins per block) you can calculate the cost to produce one bitcoin.  

---

## 4 answers

### Answer by username_4 on 2011-10-17. Score: 7

The parameters you need to calculate this are:

E - the mining efficiency, measured in MHash/J. Data on this for various hardware is available in [Mining hardware comparison](https://en.bitcoin.it/wiki/Mining_hardware_comparison) (though this take into account only the card's power and not of the system it is in). Or you can calculate it for a given system by dividing the total hashrate (in MHash/s) by the power consumed (in W).

c - the cost of electricity, measured in $/KWh.

B - the bitcoin reward per block.

D - the difficulty.

The cost to generate 1 BTC is:

c\*D/(838\*B\*E)

For example, if E=2, c=0.1, B=50 and D=1,500,000, this is
0.1\*1500000/(838\*50\*2) = $1.79

The 838 "magic number" comes from the various unit conversion factors - 2^32 hashes per difficulty-1 hash, 3,600,000 Joules per Kilowatt-hour, 1,000,000 Hashes per MHash.

> **Comments:**
> **username_4**: I hate specifying the units in which each quantity should be measured. The proper way is to specify only the dimension and let the unit be part of the data encoded in the variable. But that would just add confusion for the purposes of this answer.  
> **username_5**: can you revisit this? http://bitcoin.stackexchange.com/questions/8196/pricing-bitcoins  

---

### Answer by username_2 on 2011-10-17. Score: 3

As Bitcoin mining is very heterogeneous (that is, a lot of people use a wide variety of hardware), figuring this out would be really hard without the use of polling (as in, asking people questions, not long polling). One would need to get some statistical data on what hardware people have, how much they spend on electricity, and how much hashpower they have, not to mention how much they mine each day. Having all that, we could average it out and calculate something.

If you want to check how much your coin costs you, check out my calculator: <http://tpbitcalc.appspot.com/> .


---

### Answer by username_6 on 2011-10-18. Score: 2

[username_4 username_4's formula](https://bitcoin.stackexchange.com/questions/1606/world-wide-price-for-generating-1btc/1609#1609) is what you are you are looking for. It is not possible to calculate the production cost of one bitcoin because of these two variables:

> E - the mining efficiency, measured in MHash/J.
>
> c - the cost of electricity, measured in $/KWh.

There is a broad range of hardware which is not limited to GPUs - some people are mining with FPGAs for example - so you can't easily calculate the mining efficiency. The same happens with the cost of electricity because there are different prices for each country, hour of the day, residential/industrial systems, etc. And there are other factors such as the temperature (which reduces cooling costs) and alternative electricity sources (some people could be using solar panels for example).

That being said, you could grab the formula, find the [average electricity price per country](http://www.theoildrum.com/node/7215), estimate an average mining efficiency (maybe based on the [hardware wiki list](https://en.bitcoin.it/wiki/Mining_hardware_comparison)) and reach a number, but it would be very inaccurate.

I made a script with a few examples:

```
B = 50
D = 1500000
Cost: $0.536992840095   E = 2 c = 0.03
Cost: $2.14797136038    E = 2 c = 0.12
Cost: $3.75894988067    E = 2 c = 0.21
Cost: $0.894988066826   E = 1.2 c = 0.03
Cost: $3.5799522673     E = 1.2 c = 0.12
Cost: $6.26491646778    E = 1.2 c = 0.21
Cost: $3.5799522673     E = 0.3 c = 0.03
Cost: $14.3198090692    E = 0.3 c = 0.12
Cost: $25.0596658711    E = 0.3 c = 0.21

Cost: $0.171837708831   E = 25 c = 0.12

```

I chose 3 values for mining efficiency in Mhash/J: 2, 1.2 and 0.3 (the greater the better) and 3 values for electricity cost in USD: 0.03, 0.12, 0.21 (the smaller the better).  
Some boards, such as the 5850, have higher efficiency but we have to consider the system as a whole so 2 is still a high value. The average price of electricity per country can be found [here](http://www.theoildrum.com/node/7215), but I am going to list a few examples:

* High electricity price - Ireland, Italy, Japan
* Medium electricity price - US, France, Poland
* Low electricity price - Mexico, Taiwan, Kazakhstan

Using GPUs, the value ranges from $0.5 to $25 so it's not a small interval. The last line corresponds to the price of one bitcoin produced by an FPGA with electricity cost at $0.12 per KW/h: $0.17.


---

### Answer by username_7 on 2011-10-17. Score: 0

As username_4 username_4 example indicates you can estimate the cost per coin for an individual system given you know the hashing hardware efficiency and electrical cost.

There is currently no way to estimate this for entire global network as hashing hardware and energy costs estimates.

One could use geo-location to determine the physical location from the IP of generating block and if you had a database of energy costs (even estimate per country) could get energy cost per block.

One extra complexity is that currently about 92% of blocks are created by pools so you will get the pool's IP address not the actual miner. Pool's can have miners from all over the world making it difficult to estimate cost.

It would be possible to calculate this in real time however you would need the support of miners, miner software developers, and pool operators. OpenCL library allows a miner software to query device name. If miner's returned that data to the pool operators could see what hardware is being used in realtime. If pool operators shared that data you could get an aggregate of global hardware distribution giving you the aproximate global efficiency. With that you could use data on geolocation of nodes to aproximate average energy cost and thus determine global production price per coin.


---

