Bitcoin Forum
May 25, 2024, 06:12:44 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Formula to figure out BTC Per Day?  (Read 427 times)
blizz3010 (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
May 04, 2014, 05:25:34 PM
 #1

Anyone know the formula to figure out BTC per day? Been working on coding again and making an app for myself and havent seemed to locate it anywhere yet. Figured someone here might know it off hand.

Thanks.
ncsupanda
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
May 04, 2014, 05:43:06 PM
 #2

Code:
The average amount of time (in seconds) to find a single share is:

difficulty * 2^32 / hashrate
In that equation, difficulty is the difficulty of a share and hashrate is your hash rate in hashes per second. A day has 86,400 seconds in it, so the number of shares you'll find in 24 hours is:

86,400 / (difficulty * 2^32 / hashrate)
A slightly more complex formula, using PHP:

$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));

Copied from a google search.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!