How to calculate Hashes per Second How exactly do you calculate how many hashes your hardware is generating?
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