Bitcoin Forum
April 19, 2014, 05:03:21 PM *
News: Due to the OpenSSL heartbleed bug, changing your forum password is recommended.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2  All
  Print  
Author Topic: Bitcoin mining profitability calculator  (Read 38220 times)
phelix
Hero Member
*****
Offline Offline

Activity: 1120


nmc:id/phelix


View Profile

Ignore
April 14, 2011, 02:27:00 PM
 #1

Hi everybody!

I created an online calculator to estimate mining profitability.

Please check it out at http://bitcoinx.com/profit/

It is still in beta phase so be careful with the results. I am open for suggestions / additional features.


If you are interested, these are the main calculation formula:

    $hashTime = ((float) $difficulty) * (pow(2.0, 32) / ($hashRate * 1000.0)) ;
    $powerCostPerYear = 365.25 * 24.0 * $powerConsumption / 1000.0 * $electricityRate;
    $blocksPerYear =  (365.25 * 24.0 * 3600.0) / $hashTime ;
    $coinsPerYear = $blockCoins * $blocksPerYear;
    $revenuePerYear = $coinsPerYear * $conversionRate;
    $profitPerYear = $revenuePerYear - $powerCostPerYear;
    $netProfit1st = $revenuePerYear - $costHardware - $powerCostPerYear;
    if ($profitPerYear <= 0) $breakEvenTime = -1;
    else $breakEvenTime = $costHardware / ($profitPerYear / (365.25 * 24.0 * 3600.0));

    edit: v0.8.1
    edit: v0.8.2


[BPS] Bitcoin Project of the Season: Winter 2014 - Winner: BitWasp
EasyWinBuilder - build your own Bitcoin-Qt
namecoin.info - namecoind sendtoalias phelix 1.00
blockchained.com ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
1397927001
Hero Member
*
Offline Offline

Posts: 1397927001

View Profile Personal Message (Offline)

Ignore
1397927001
Reply with quote  #2

1397927001
Report to moderator
1397927001
Hero Member
*
Offline Offline

Posts: 1397927001

View Profile Personal Message (Offline)

Ignore
1397927001
Reply with quote  #2

1397927001
Report to moderator
    mBitCASINOWIN BITCOINS IN OUR
24/7 LIVE DEALER CASINO

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1397927001
Hero Member
*
Offline Offline

Posts: 1397927001

View Profile Personal Message (Offline)

Ignore
1397927001
Reply with quote  #2

1397927001
Report to moderator
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile

Ignore
April 14, 2011, 02:29:48 PM
 #2

I'm afraid that without factoring future increases in difficulty, this is fairly useless.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
phelix
Hero Member
*****
Offline Offline

Activity: 1120


nmc:id/phelix


View Profile

Ignore
April 14, 2011, 03:03:09 PM
 #3

How would you do that? You can still increase the fixed difficulty by hand.

Also there seems to be a correlation to some extend between difficulty and price which partly compensates the increase in difficulty:

http://www.bitcoinmoney.com/post/3573286726/price-drives-capacity
http://bitcointalk.org/index.php?topic=4339.0


[BPS] Bitcoin Project of the Season: Winter 2014 - Winner: BitWasp
EasyWinBuilder - build your own Bitcoin-Qt
namecoin.info - namecoind sendtoalias phelix 1.00
blockchained.com ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Grinder
Hero Member
*****
Offline Offline

Activity: 944


View Profile

Ignore
April 14, 2011, 03:32:20 PM
 #4

I've been thinking of making just that, but I didn't have a site to put it on.

You could also add a calculation of the break even difficulty level for the given hash rate, power consumption and bitcoin price.
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile

Ignore
April 14, 2011, 03:36:40 PM
 #5

How would you do that? You can still increase the fixed difficulty by hand.

Exponential fit. There is a calculator online:
http://www.taters.net/btcgc.php

Quote
Also there seems to be a correlation to some extend between difficulty and price which partly compensates the increase in difficulty:

As long as mining is marginally profitable, difficulty will increase even with constant BTC prices. And a claim of increase in BTC price is a pure speculation.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
phelix
Hero Member
*****
Offline Offline

Activity: 1120


nmc:id/phelix


View Profile

Ignore
April 14, 2011, 04:37:25 PM
 #6

@Grinder:
I added a new result so it is easier to iterate there for now. This would go well together with Raulo's suggestion.

@Raulo:
> And a claim of increase in BTC price is a pure speculation.
isn't it the same with the difficulty?

The idea of the exponential fit is interesting but I will leave that for a later version as it is much more complicated.

There are clear cases as my own where mining is not very profitable with current hardware because of too high energy costs (0.30$/kWh) and the calculator can help point in the right direction.

[BPS] Bitcoin Project of the Season: Winter 2014 - Winner: BitWasp
EasyWinBuilder - build your own Bitcoin-Qt
namecoin.info - namecoind sendtoalias phelix 1.00
blockchained.com ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
epii
Full Member
***
Offline Offline

Activity: 196



View Profile

Ignore
April 14, 2011, 04:45:57 PM
 #7

I'm afraid that without factoring future increases in difficulty, this is fairly useless.
It doesn't take into account future increases in BTC value, either (which could offset this).  There are many variables, but I for one think this is a useful tool for demonstrating that mining can be profitable.

Vires In Numeris.
mrjones
Newbie
*
Offline Offline

Activity: 14


View Profile

Ignore
April 14, 2011, 05:08:52 PM
 #8

How would you do that? You can still increase the fixed difficulty by hand.
Take a look at this graph.  It shows difficulty versus time on a logarithmic scale.  (There's also a linear scale version available here.)  You can see that difficulty has increased from roughly 200 to 80000 (i.e. by a factor of 400) since the middle of July 2010.  That's 9 months, or 39 weeks.  Difficulty adjusts every two weeks, so that is 19 adjustment periods.  That means an average of roughly a 37% increase in difficulty every two weeks over this time period, since 1.3719 ~= 400.

You can work this into your equations easily.  You start with the equation:

factor(rate, numPeriods) = (1 + rate - (1 + rate)-numPeriods) / rate

In PHP, that would be:

Code:
$factor = (1 + $rate - pow(1 + $rate, -$numPeriods)) / $rate;

You need to allow the user to enter in a rate, which is how much they expect the difficulty to increase per two week period.  You could default this to 0.37 for example, or to a more conservative value like 0.20 if you think the number of people mining bitcoins isn't going to keep increasing at the historical rate.

For your specific code, you'd change it to be something like this:

Code:
...
$blocksInFirstTwoWeeks = $blockCoins * (14.0 * 24.0 * 3600.0) / $hashTime;
$factor = (1 + $rate - pow(1 + $rate, -26)) / $rate;
$blocksPerYear = $blocksInFirstTwoWeeks * $factor;
...

As an example, your current page with the default values shows 2676.80 coins per year (you say blocks, but mean coins). That's 103 per two week period.  We then calculate "factor" as above, assuming a rate of 0.20:

Code:
factor = (1 + 0.20 - (1 + 0.20)^(-26)) / 0.20 = 5.96

For a final answer of 613.88, rather than 2676.80.  This is a huge difference, but is very real.  If you use a rate of 0.37, you get a factor of 3.70, for a final answer of 381.1 coins, which is seven times less.

I would also suggest that you allow people to enter the number of periods, rather than one year.

1AVpan1kfmpgWP3XvqRYMt5sFoxgqAoRru
EPiSKiNG
Hero Member
*****
Offline Offline

Activity: 668



View Profile

Ignore
April 14, 2011, 05:25:24 PM
 #9

How would you do that? You can still increase the fixed difficulty by hand.
Take a look at this graph.  It shows difficulty versus time on a logarithmic scale.  (There's also a linear scale version available here.)  You can see that difficulty has increased from roughly 200 to 80000 (i.e. by a factor of 400) since the middle of July 2010.  That's 9 months, or 39 weeks.  Difficulty adjusts every two weeks, so that is 19 adjustment periods.  That means an average of roughly a 37% increase in difficulty every two weeks over this time period, since 1.3719 ~= 400.

You can work this into your equations easily.  You start with the equation:

factor(rate, numPeriods) = (1 + rate - (1 + rate)-numPeriods) / rate

In PHP, that would be:

Code:
$factor = (1 + $rate - pow(1 + $rate, -$numPeriods)) / $rate;

You need to allow the user to enter in a rate, which is how much they expect the difficulty to increase per two week period.  You could default this to 0.37 for example, or to a more conservative value like 0.20 if you think the number of people mining bitcoins isn't going to keep increasing at the historical rate.

For your specific code, you'd change it to be something like this:

Code:
...
$blocksInFirstTwoWeeks = $blockCoins * (14.0 * 24.0 * 3600.0) / $hashTime;
$factor = (1 + $rate - pow(1 + $rate, -26)) / $rate;
$blocksPerYear = $blocksInFirstTwoWeeks * $factor;
...

As an example, your current page with the default values shows 2676.80 coins per year (you say blocks, but mean coins). That's 103 per two week period.  We then calculate "factor" as above, assuming a rate of 0.20:

Code:
factor = (1 + 0.20 - (1 + 0.20)^(-26)) / 0.20 = 5.96

For a final answer of 613.88, rather than 2676.80.  This is a huge difference, but is very real.  If you use a rate of 0.37, you get a factor of 3.70, for a final answer of 381.1 coins, which is seven times less.

I would also suggest that you allow people to enter the number of periods, rather than one year.

Bump!  Thanks for your time and effort.  I'll donate when it's done!

YOU CAN TRUST ME! EPiSKiNG-'s COINS!! BUYING / SELLING BTC - USA --- View my OTC Trading Feedback!!
<gribble> You are identified as user EPiSKiNG-, with GPG key id 721730127CD7574D, key fingerprint EBFC267F8F10EFD1FB84854D721730127CD7574D, and bitcoin address 1EPiSKiNG139bzcwTm8rxMFNfFFdanLW5K
VELORIO, California Latin-Dance Rock
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile

Ignore
April 14, 2011, 05:36:41 PM
 #10

It doesn't take into account future increases in BTC value, either (which could offset this).  There are many variables, but I for one think this is a useful tool for demonstrating that mining can be profitable.

Of course it is profitable (certainly if you already own hardware) but calculations without factoring difficulty increase are very misleading.

BTC price increases are possible but definitely not certain. Heck, the BTC price can even fall hard. If there was a futures market, it would show very similar prices to the spot prices because future is not know and the current value is the best bet. But as long as mining is marginally (i.e. BTC income larger than electricity costs)  profitable, people will join mining and difficulty will increase (that's how arbitrage works). And if the BTC price increases, the difficulty will increase even more. The rate of difficulty increase is not known but this thread is a proof that people still join the mining game and we are far from difficulty saturation.

I don't think we will see difficulty increases of 20% per 2106 blocks (as mrjones suggests) but 10-15% is very real in the nearest future.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
mrjones
Newbie
*
Offline Offline

Activity: 14


View Profile

Ignore
April 14, 2011, 05:48:45 PM
 #11

But as long as mining is marginally (i.e. BTC income larger than electricity costs)  profitable, people will join mining and difficulty will increase (that's how arbitrage works).
Exactly!

I don't think we will see difficulty increases of 20% per 2106 blocks (as mrjones suggests) but 10-15% is very real in the nearest future.
And even with that very conservative estimate of a 10% change per two weeks, difficulty increases by a factor of 12 (1.1026 = 11.92) over the course of a year.  By the end of that year, a rig that generated 50 BTC per week initially becomes one that takes an entire three months to generate 50 BTC!

1AVpan1kfmpgWP3XvqRYMt5sFoxgqAoRru
epii
Full Member
***
Offline Offline

Activity: 196



View Profile

Ignore
April 14, 2011, 05:51:43 PM
 #12

It doesn't take into account future increases in BTC value, either (which could offset this).  There are many variables, but I for one think this is a useful tool for demonstrating that mining can be profitable.

Of course it is profitable (certainly if you already own hardware) but calculations without factoring difficulty increase are very misleading.

Of course it is profitable if the value of your earned BTC exceeds your hardware and electricity costs, but now we're venturing into the realm of tautology.  It's not "of course" profitable for everyone, and reading the forum, many people are skeptical it can be profitable for anyone.  Some simple math, and clearly it can.  I gather that's why this calculator was made.

Vires In Numeris.
Grinder
Hero Member
*****
Offline Offline

Activity: 944


View Profile

Ignore
April 14, 2011, 06:17:10 PM
 #13

Unfortunately GPU mining can become unprofitable just as suddenly as CPU mining did when someone starts large scale mining with ASICs. It's only a matter of time. http://bitcointalk.org/index.php?topic=5496
Meni Rosenfeld
Donator
Hero Member
*
Offline Offline

Activity: 1148



View Profile WWW

Ignore
April 14, 2011, 06:43:18 PM
 #14

You have a line "Generated blocks per year", but the displayed value is the number of coins, not blocks. It would be nice to have both.

1EofoZNBhWQ3kxfKnvWkhtMns4AivZArhr   |   Who am I?   |   bitcoin-otc WoT
Bitcoil - Exchange bitcoins for ILS (thread)   |   Israel Bitcoin community homepage (thread)
Analysis of Bitcoin Pooled Mining Reward Systems (thread, summary)  |   PureMining - Infinite-term, deterministic mining bond
MoonShadow
Hero Member
*****
Offline Offline

Activity: 1358



View Profile

Ignore
April 14, 2011, 09:36:12 PM
 #15

Unfortunately GPU mining can become unprofitable just as suddenly as CPU mining did when someone starts large scale mining with ASICs. It's only a matter of time. http://bitcointalk.org/index.php?topic=5496

Which is one reason I'm not inclined to run out to buy a new GPU.  I'm not a gamer, so have little additional reason to upgrade.  However, if a relatively cheap dedicated mining card is developed, I'd be all over it.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
phelix
Hero Member
*****
Offline Offline

Activity: 1120


nmc:id/phelix


View Profile

Ignore
April 14, 2011, 09:54:14 PM
 #16

You have a line "Generated blocks per year", but the displayed value is the number of coins, not blocks. It would be nice to have both.
done

Unfortunately GPU mining can become unprofitable just as suddenly as CPU mining did when someone starts large scale mining with ASICs. It's only a matter of time. http://bitcointalk.org/index.php?topic=5496
definitely. I'd like the ASICS better too, especially with their lower power consumption.

<difficulty growth>
I see it like this. Difficulty depends in some way on BTC price. It does not have to grow exponentially. The exponential growth might have been because of the improvement in software and the switch from CPU to GPU or result from more and more people mining. From the difficulty plots one could even read a beginning saturation (temporary?).

Fitting the BTC price to extrapolate it is not the right way to go in the calculator. Accordingly I am not sure if it is the right thing to exponentially extrapolate difficulty because it basically depends on the price.

[BPS] Bitcoin Project of the Season: Winter 2014 - Winner: BitWasp
EasyWinBuilder - build your own Bitcoin-Qt
namecoin.info - namecoind sendtoalias phelix 1.00
blockchained.com ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
qed
Full Member
***
Offline Offline

Activity: 196


View Profile

Ignore
April 15, 2011, 10:41:28 AM
 #17

A so long prediction is kinda useless. Too many variables.

Mobile App (Android)

Monitor miners, exchange rates and Bitcoin network stats.
Littleshop
Hero Member
*****
Offline Offline

Activity: 1148



View Profile WWW

Ignore
April 15, 2011, 02:11:04 PM
 #18

If you add a box to increase difficulty rate at a percent rate per change such as 10% it might be pretty close to reality. 

I see the difficulty rate rising at about 10% a change for at least a few months. 

phelix
Hero Member
*****
Offline Offline

Activity: 1120


nmc:id/phelix


View Profile

Ignore
April 15, 2011, 05:09:04 PM
 #19

Added a time frame parameter.

[BPS] Bitcoin Project of the Season: Winter 2014 - Winner: BitWasp
EasyWinBuilder - build your own Bitcoin-Qt
namecoin.info - namecoind sendtoalias phelix 1.00
blockchained.com ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
phelix
Hero Member
*****
Offline Offline

Activity: 1120


nmc:id/phelix


View Profile

Ignore
August 13, 2011, 07:44:37 PM
 #20


please check out the latest update: http://bitcoinx.com/profit

finally I found the time to implement a more reasonable estimate.

what do you say?

[BPS] Bitcoin Project of the Season: Winter 2014 - Winner: BitWasp
EasyWinBuilder - build your own Bitcoin-Qt
namecoin.info - namecoind sendtoalias phelix 1.00
blockchained.com ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Pages: [1] 2  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!