<p>Most mining software will have that number available for you.  Or you can join a pool for a day or two and most of the bigger ones (eg slush, 50btc) make these stats available for your miner(s).</p>

<p>If you are trying to programmatically calculate this for software you are writing probably best to take an average every minute or so. As in most cases, the formula is built right into the unit -- num of hashes per (ie divided by) num of seconds. </p>

<p>Actually it's Mh/s (1,000,000 hash/sec) usually now so more like (Num hashes / 1,000,000) / sec</p>

CC BY-SA 3.0
2013-12-07T16:42:35.800Z
And that is so absolutly an example how to provide a useless answer. The question is "HOW IS IT CALCULATED" and your answer is "look at the number on your screen". Nice.
TomTom
CC BY-SA 3.0
2013-12-07T17:03:48.893Z
Please don't get defensive. I answered that exact question and offered some additional information.   You are right that it seems like too basic of a question; but i think it would be more productive to assume that maybe he meant something slightly different than what was written (ie how do I time hashes when mining on x hardware with y driver?).
Neil Neyman
CC BY-SA 3.0
2013-12-08T09:21:43.500Z
lol, the getmininginfo command of bitcoin-cli provides this info once bitcoind has finished downloading block data.
Sean McCully
CC BY-SA 3.0
2014-04-24T19:52:40.700Z
kilo = 1 000, mega = 1 000 000. You've got something mixed up in your last sentence.
Tim S.
CC BY-SA 3.0
2014-04-24T23:49:51.020Z
@TimS oops, you're right! Wow that went unnoticed far too long. Fixed
Neil Neyman
CC BY-SA 3.0
2013-12-07T16:35:13.897Z
2014-04-24T23:48:01.017Z
2014-04-24T23:48:01.017Z
Neil Neyman
<p>Ah, you start generating, after one second you cound how many you generated. If that is too random (generation of one takes too long), you generate for 10 seconds, count, divide by 10.</p>

<p>Is that THAT hard? Counting things and dividing by time are pretty obvious, or?</p>

CC BY-SA 3.0
2013-12-07T16:38:13.393Z
This is a little unnecessarily condescending I think.
Neil Neyman
CC BY-SA 3.0
2013-12-07T16:41:55.907Z
You are right. Not everyone using a computer can use a clock and count. At least it seems to be the case...
TomTom
CC BY-SA 3.0
2013-12-07T08:01:14.953Z
2013-12-07T08:01:14.953Z
TomTom
<p>lol the Q/A contains far too much flaming and too little answers.</p>

<p>Obviously, hashes per second can be computed by some sort of some of hashes per time frame, divided by time in frame.</p>

<p>like... 0% of mining hardware will deliver its full-on however-millions-of-hashes directly to the mining software. From what I can tell, there's 2 other ways to measure the metric:</p>

<ol>
<li># of qualified nonces to produce hash. As far as I know, this figures in the 'difficulty 1' mask. Some mining software when dealing with pools will throw out a great number of these unless they match the suggested share difficulty. Brings me to metric #2</li>
<li># of submitted shares, given current share difficulty. I believe this is how pools calculate your H/s. It's more variant because of the lower number of shares. I believe this can be computed by your 'accepted' rate, the share difficulty, and the block difficulty (i think???)</li>
</ol>

<p>Any clarification on these would be.... really awesome </p>

CC BY-SA 3.0
2014-04-24T19:44:22.837Z
2014-04-24T19:44:22.837Z
Colin Godsey
<p>How exactly do you calculate how many hashes your hardware is generating?</p>

<hash><hashpower>
How to calculate Hashes per Second
Sean McCully
# How to calculate Hashes per Second

(Asked by: username_0 on 2013-12-07)

How exactly do you calculate how many hashes your hardware is generating?

**Tags:** hash, hashpower


---

## 3 answers

### Answer by username_1 on 2013-12-07. Score: 2 | Accepted answer

Most mining software will have that number available for you. Or you can join a pool for a day or two and most of the bigger ones (eg slush, 50btc) make these stats available for your miner(s).

If you are trying to programmatically calculate this for software you are writing probably best to take an average every minute or so. As in most cases, the formula is built right into the unit -- num of hashes per (ie divided by) num of seconds.

Actually it's Mh/s (1,000,000 hash/sec) usually now so more like (Num hashes / 1,000,000) / sec

> **Comments:**
> **username_2**: And that is so absolutly an example how to provide a useless answer. The question is "HOW IS IT CALCULATED" and your answer is "look at the number on your screen". Nice.  
> **username_1**: Please don't get defensive. I answered that exact question and offered some additional information.   You are right that it seems like too basic of a question; but i think it would be more productive to assume that maybe he meant something slightly different than what was written (ie how do I time hashes when mining on x hardware with y driver?).  
> **username_0**: lol, the getmininginfo command of bitcoin-cli provides this info once bitcoind has finished downloading block data.  
> **username_3**: kilo = 1 000, mega = 1 000 000. You've got something mixed up in your last sentence.  
> **username_1**: @TimS oops, you're right! Wow that went unnoticed far too long. Fixed  

---

### Answer by username_2 on 2013-12-07. Score: 0

Ah, you start generating, after one second you cound how many you generated. If that is too random (generation of one takes too long), you generate for 10 seconds, count, divide by 10.

Is that THAT hard? Counting things and dividing by time are pretty obvious, or?

> **Comments:**
> **username_1**: This is a little unnecessarily condescending I think.  
> **username_2**: You are right. Not everyone using a computer can use a clock and count. At least it seems to be the case...  

---

### Answer by username_4 on 2014-04-24. Score: -1

lol the Q/A contains far too much flaming and too little answers.

Obviously, hashes per second can be computed by some sort of some of hashes per time frame, divided by time in frame.

like... 0% of mining hardware will deliver its full-on however-millions-of-hashes directly to the mining software. From what I can tell, there's 2 other ways to measure the metric:

1. # of qualified nonces to produce hash. As far as I know, this figures in the 'difficulty 1' mask. Some mining software when dealing with pools will throw out a great number of these unless they match the suggested share difficulty. Brings me to metric #2
2. # of submitted shares, given current share difficulty. I believe this is how pools calculate your H/s. It's more variant because of the lower number of shares. I believe this can be computed by your 'accepted' rate, the share difficulty, and the block difficulty (i think???)

Any clarification on these would be.... really awesome


---

