<p>If the current difficulty is D, then the target hash (the value below which block hashes must go) is:</p>

<blockquote>
  <p>0x00000000FFFF0000000000000000000000000000000000000000000000000000 / D</p>
</blockquote>

<p>(by definition of difficulty, which is a fraction of the maximum target), or otherwise put, the number of valid hashes is:</p>

<blockquote>
  <p>65535 * 2<sup>208</sup> / D</p>
</blockquote>

<p>Which means that the ratio of all hashes over valid hashes would be:</p>

<blockquote>
  <p>2<sup>256</sup> / (65535 * 2<sup>208</sup> / D) =
  D * 2<sup>48</sup> / 65535 =
  D * 4295032833</p>
</blockquote>

<p>Which, at the current (January 2017) difficulty of D =  392963262344.3704 means that one hash in</p>

<blockquote>
  <p>392963262344.3704 * 4295032833 = 1687790113931869416948</p>
</blockquote>

<p>results in a valid block, or each attempt has a chance of</p>

<blockquote>
  <p>1 / 1687790113931869416948 = 0.000000000000000000059 %</p>
</blockquote>

CC BY-SA 3.0
2013-04-30T08:23:12.807Z
I think the third equation is the formula for all possible hashes, not "the fraction of valid hashes to all possible hashes", isn't it? Shouldn't there be a "1/" in front?
Steven Roose
CC BY-SA 3.0
2013-04-30T00:31:31.173Z
2017-01-26T18:06:59.737Z
2017-01-26T18:06:59.737Z
Pieter Wuille
<p>I have problem finding this. The Bitcoin wiki mentions the probability <a href="https://en.bitcoin.it/wiki/Target#What_is_the_target_now.3F" rel="nofollow">here</a>, but only with a link to the <a href="http://blockexplorer.com/q/probability" rel="nofollow">current value on BlockExplorer</a>.</p>

<p>The wiki page on <a href="https://en.bitcoin.it/wiki/Difficulty" rel="nofollow">difficulty</a> doesn't mention the formula for the probability either.</p>

CC BY-SA 3.0
2013-04-30T01:50:43.577Z
What probability are you after? The probability of a hash solving a block (as per Peter's explanation), or a share solving a block? Or the number of blocks you might solve or shares you might submit in a given time period?
organofcorti
CC BY-SA 3.0
2013-04-30T13:47:14.137Z
The probability of a hash solving a block. I don't know how the share system works, isn't that implemented differently for each different pool specification?
Steven Roose
CC BY-SA 3.0
2013-05-01T05:59:45.637Z
Yes, variable difficulty shares means that strictly speaking "shares per block" is meaningless. In this context though most would take "shares per block" to mean "Difficulty 1 shares per block", which have a probability of exactly 1/Difficulty.
organofcorti
<difficulty><mining-profitability><hashpower>
How is the probability of winning a block calculated from the difficulty?
Steven Roose
# How is the probability of winning a block calculated from the difficulty?

(Asked by: username_0 on 2013-04-30)

I have problem finding this. The Bitcoin wiki mentions the probability [here](https://en.bitcoin.it/wiki/Target#What_is_the_target_now.3F), but only with a link to the [current value on BlockExplorer](http://blockexplorer.com/q/probability).

The wiki page on [difficulty](https://en.bitcoin.it/wiki/Difficulty) doesn't mention the formula for the probability either.

**Tags:** difficulty, mining-profitability, hashpower

> **Comments:**
> **username_1**: What probability are you after? The probability of a hash solving a block (as per Peter's explanation), or a share solving a block? Or the number of blocks you might solve or shares you might submit in a given time period?  
> **username_0**: The probability of a hash solving a block. I don't know how the share system works, isn't that implemented differently for each different pool specification?  
> **username_1**: Yes, variable difficulty shares means that strictly speaking "shares per block" is meaningless. In this context though most would take "shares per block" to mean "Difficulty 1 shares per block", which have a probability of exactly 1/Difficulty.  

---

## 1 answers

### Answer by username_2 on 2013-04-30. Score: 7 | Accepted answer

If the current difficulty is D, then the target hash (the value below which block hashes must go) is:

> 0x00000000FFFF0000000000000000000000000000000000000000000000000000 / D

(by definition of difficulty, which is a fraction of the maximum target), or otherwise put, the number of valid hashes is:

> 65535 \* 2208 / D

Which means that the ratio of all hashes over valid hashes would be:

> 2256 / (65535 \* 2208 / D) =
> D \* 248 / 65535 =
> D \* 4295032833

Which, at the current (January 2017) difficulty of D = 392963262344.3704 means that one hash in

> 392963262344.3704 \* 4295032833 = 1687790113931869416948

results in a valid block, or each attempt has a chance of

> 1 / 1687790113931869416948 = 0.000000000000000000059 %

> **Comments:**
> **username_0**: I think the third equation is the formula for all possible hashes, not "the fraction of valid hashes to all possible hashes", isn't it? Shouldn't there be a "1/" in front?  

---

