 # Help calculating profit per day (Making my own profitability calculator)

Hi everyone. First off I would like to apologize if this is the wrong place for this.

I am trying to make my own profitability calculator based on data from whattomine and am a little confused in regards to equihash coins. I’m hoping someone can tell me what I am doing wrong here. This is the equation I am using and I have confirmed that it works when I use it for ethash coins:

``````hashes_per_day / difficulty * block_reward * exchange_rate
``````

As a specific example, if I have a hashrate of 400/s that equates to 34560000 hashes per day. According to the data on http://whattomine.com/coins.json, the difficulty for Zcash is 3948366.55255825, the block reward size is 10 ZEC, and the average exchange rate over the last 24 hours (to BTC) is 0.0630193181258134. This makes the equation as follows:

``````34560000 / 3948366.55255825 * 10 * 0.0630193181258134
``````

Based on this equation it should be 5.51607254 BTC worth of ZEC per day. That is obviously very wrong and the calculator built in to whattomine seems to indicate that something around 0.00066 BTC per day would be more realistic for 400h/s. However, this same equation seems to be spot on for ethash coins. Does anyone know what is different about equihash that would require me to adjust my equation?

1 Like

We are tired of all these crappy calculators SO… That’s nice. I’m not making it for other people though. I’m making it for myself. The reason why isn’t relevant as that does not change how the equation works. Let’s please keep this on-topic and refrain from posting meme images.

1 Like

Maybe try dividing by the network or pool hashrate instead of the difficulty?

I think that this is better if you are minning in a pool.

True. But I don’t think @Lyle-Tafoya is solo mining. But you never know I guess.

Why electricity cost not included in calculator? If no cost included, it’s revenue, not profit.

I also made my own, i wanted it to query my miners for their hash rate, and Electrical use. This way its more accurate in the moment.

I will try to explain my variables as some aren’t show where they are grabbed.

fBlockTime is the blocktime as a float from the network API
poolHash is the hashrate of the pool i am in.
fnetworkHash is the network hashrate from the network API
hashRate is my own hashRate
fzecPrice is of course the ZEC Price.
wattsCost is the power cost in my region. I set that in the app.
poolPercent is the fee by the pool.

so i calculate mBlockTime, which is how long it takes to get a block in hours.
The i convert that to blocks per hour (bpHour)
mBPHour is my personal blocks per hour, instead of the pools.
hPerBLock is hours per block.
dperBlock is days per block (for myself).
the bottom part is just making the calculations to give better stats in different time periods.

Not sure if this helps, but its how i did mine ``` var mBlockTime = fBlockTime / (poolHash / fnetworkHash) / 3600; var bpHour = 1 / mBlockTime; var mBPHour = ((hashRate/poolHash)*bpHour)*10; var hPerBlock = 1 / mBPHour; var dPerBlock = 0f; if (hPerBlock > 24f) { dPerBlock = hPerBlock / 24f; } var hourly = mBPHour * fzecPrice; var tWattCost = (watts / 1000) * wattsCost; var tpoolCost = hourly * poolFeePercent; var fHourly = hourly - tWattCost - tpoolCost; var fDaily = fHourly * 24; ```

2 Likes

Thank you. That does help. I would still like to figure out how to calculate this based on the difficulty rather than by using the block time and network hashrate. However, this is my new equation:

``````hashes_per_sec/network_hashrate*(seconds_per_day/block_time*block_reward)*exchange_rate
``````

This gives me much more accurate calculation for equihash coins compared to what I was doing before and it works for both ethash and equihash coins.

Still though, I am confused as to what the difficulty value represents for equihash coins. In ethash, the difficulty represents the chances of solving the block and receiving the block reward with any given 1 hash. So if the difficulty were 10 (just as a simple albeit unrealistic example), that would mean I have a 1/10 chance of solving the block with any given hash I produce and would then receive the full block reward. I can’t understand why that doesn’t apply to Zcash and this method of calculation I am using now seems like a workaround which involves an unnecessarily large amount of variables. Using this method produces slightly different values than what whattomine reports when I use their calculator, but at least it’s in the same ballpark for equihash coins now. When I use difficulty to do calculations for ethash coins, the resulting value I calculate is exactly the same as whattomine.

1 Like

I did some looking, and it seems that if you want to use Difficulty you have to use the sol/block modifier of 8192.

SO the calculation seems to be

``` ( hashRate / ( difficulty * 8192 ) ) * 10 ```

or hourly as
``` ( hashRate / ( difficulty * 8192 ) ) * 10 * 3600 ```

Currently that would be (for example)
``` 450 / (3976111.1 * 8192 ) ) * 10 * 3600 = 0.000497355 ZEC / Hour ```

4 Likes

Interesting and thanks again! Would you mind linking me to the resource where you find that info?

I reversed it from the javascript on one of the calculator pages. I am trying to figure out where they got the number from still lol.

EDIT!

It looks like 8192 is the work size currently set by the ZCash network.

2 Likes

When building my tracking/profit spreadsheet, I used the formula on this MinerGate page to calculate my ZEC profits:

`Reward = ((hashrate * block_reward) / current_difficulty * 2^13) * (1 - pool_fee) * 3600`

I use the JSON provided by my pool to get current difficulty, etc.

1 Like

Still not sure how to calculate H/s to sol/s, but I’m getting a pretty mixed bag between Minergate’s ZCash Calculator, My Crypto Buddy and mining speed dot com.

Are any of these accurate for you guys?

H/S vs SOl/S is just naming. Its the same number, no conversion required.

1 Like

Good to know @Jqe

What about the calculators that I listed? Do you find any of them accurate? If I enter Supernova’s info network hash and my resources (~2,888 sol/s) into miningspeed.com, it shows a 56.345748 ZEC/mo. profit.

Does this seem right?

i didn’t check the resources you listed. However i think at 2888 you are more like 2 zec / month.

I run at 3120 sol/s and i am currently coming in at 1 zec every 14 days or so.

1 Like

Really? Which pool is this with? Seems like a pretty low ROI on equipment & yield in general.

Pool has nothing to do with it.

Its the currency. Do the calculation listed in this thread. Even if you do it manually.

1 Like

Really?!

I’m new, so please excuse my lack of knowledge in this area, but why is everyone so obsessed with the pool that they mine with if the pool does not effect their yield?