user74515: I would like to see real-time mining profitability. The bitinfocharts web only shows day average. Is it possible to see how many hashes were actually needed to mine most recent Bitcoin block?

user208: You cannot know how many hashes were actually performed for every block, because non-winning hashes aren't published.
There is however a simple formula to compute the expected number of hashes a block needs. Across many blocks of the same difficulty, that expected number is the average of the number of hashes per block.
The formula is almost exactly: 4295032833 times the difficulty.
This derives from the definition of difficulty: it is the ratio between the target hashes need to beat at difficulty 1 (0xffff0000000000000000000000000000000000000000000000000000 = 65535 ⋅ 2208), and the current target. The ratio between 2256 (the number of possible hashes) and that difficulty 1 target is 248 / 65535, which is 4295032833.000015259...

74515: <p>I would like to see real-time mining profitability. The bitinfocharts web only shows day average. Is it possible to see how many hashes were actually needed to mine most recent Bitcoin block?</p>
 208: <p>You cannot know how many hashes were <em>actually</em> performed for every block, because non-winning hashes aren't published.</p>
<p>There is however a simple formula to compute the <em>expected</em> number of hashes a block needs. Across many blocks of the same difficulty, that expected number is the average of the number of hashes per block.</p>
<p>The formula is almost exactly: 4295032833 times the difficulty.</p>
<p>This derives from the definition of difficulty: it is the ratio between the target hashes need to beat at difficulty 1 (0xffff0000000000000000000000000000000000000000000000000000 = <em>65535 ⋅ 2<sup>208</sup></em>), and the current target. The ratio between <em>2<sup>256</sup></em> (the number of possible hashes) and that difficulty 1 target is <em>2<sup>48</sup> / 65535</em>, which is 4295032833.000015259...</p>
