user11124: I was wondering if any of you could help me in making my own mining calculator. I know there are many good web apps out there, but I would like to make one myself. 
What I don't understand is how to calculate the statistical outcome, knowing a given hardware's hashrate per second and the difficulty level.
Do you know what formula should I use?

user10377: If you have Excel, try:

BTC Per Day = (B3*POWER(10,9)/B1)*(B4*B6)/B5 
B1 = 907549524 (Difficulty Factor - obtained from http://bitcoindifficulty.com/ or
http://bitcoinwatch.com/) 
B3 = 70 (Hashing Rate in GH/s) 
B4 = 25 (Block Award in BTC)
B5 = POWER(2,32) (Is a constant, is the number of integer nonce
values that can be hashed with a 32 bit integer register) 
B6 = 86400 (seconds per day)

Answer for #1 is 0.038790162 when the data from B3, B4, B5 and B6.
I add two other fields in my spreadsheet: 1) Difficulty Factor Compound Rate in % per 2048 Blocks (somewhere around 15% to 20%), 2) the value in BTC denominated in USD. The remainder of the spreadsheet I use determines risks associated with late ASIC hardware deliveries in terms of BTC or USD opportunity losses.  Absolutely, don't use any of the online mining calculators to make big Mining H/W acquisition decisions... You must take into account the non-linear difficulty factor compounding rate to make reasonable computations of what your profits are likely to be. Otherwise, your estimated profits are likely to be losses...

11124: <p>I was wondering if any of you could help me in making my own mining calculator. I know there are many good web apps out there, but I would like to make one myself. </p>

<p>What I don't understand is how to calculate the statistical outcome, knowing a given hardware's hashrate per second and the difficulty level.</p>

<p>Do you know what formula should I use?</p>
 10377: <p>If you have Excel, try:</p>

<ol>
<li>BTC Per Day = (B3*POWER(10,9)/B1)*(B4*B6)/B5 </li>
<li>B1 = 907549524 (Difficulty Factor - obtained from <a href="http://bitcoindifficulty.com/" rel="nofollow">http://bitcoindifficulty.com/</a> or
<a href="http://bitcoinwatch.com/" rel="nofollow">http://bitcoinwatch.com/</a>) </li>
<li>B3 = 70 (Hashing Rate in GH/s) </li>
<li>B4 = 25 (Block Award in BTC)</li>
<li>B5 = POWER(2,32) (Is a constant, is the number of integer nonce
values that can be hashed with a 32 bit integer register) </li>
<li>B6 = 86400 (seconds per day)</li>
</ol>

<p>Answer for #1 is 0.038790162 when the data from B3, B4, B5 and B6.</p>

<p>I add two other fields in my spreadsheet: 1) Difficulty Factor Compound Rate in % per 2048 Blocks (somewhere around 15% to 20%), 2) the value in BTC denominated in USD. The remainder of the spreadsheet I use determines risks associated with late ASIC hardware deliveries in terms of BTC or USD opportunity losses.  Absolutely, don't use any of the online mining calculators to make big Mining H/W acquisition decisions... You must take into account the non-linear difficulty factor compounding rate to make reasonable computations of what your profits are likely to be. Otherwise, your estimated profits are likely to be losses...</p>
