Geometric distribution calculator
How long until the first success? Each bar is one more try, and every bar is a fixed fraction of the one before it.
X = the trial on which the first success happens (1, 2, 3, …). Default p = 1/6: rolling until the first six.
P(X = 3) = (1 − 0.1667)^2 × 0.1667 = 0.1157
Full probability table
| k | P(X = k) | P(X ≤ k) |
|---|---|---|
| 1 | 0.1667 | 0.1667 |
| 2 | 0.1389 | 0.3056 |
| 3 | 0.1157 | 0.4213 |
| 4 | 0.0965 | 0.5177 |
| 5 | 0.0804 | 0.5981 |
| 6 | 0.0670 | 0.6651 |
| 7 | 0.0558 | 0.7209 |
| 8 | 0.0465 | 0.7674 |
| 9 | 0.0388 | 0.8062 |
| 10 | 0.0323 | 0.8385 |
| 11 | 0.0269 | 0.8654 |
| 12 | 0.0224 | 0.8878 |
| 13 | 0.0187 | 0.9065 |
| 14 | 0.0156 | 0.9221 |
| 15 | 0.0130 | 0.9351 |
| 16 | 0.0108 | 0.9459 |
| 17 | 0.0090 | 0.9549 |
| 18 | 0.0075 | 0.9624 |
| 19 | 0.0063 | 0.9687 |
| 20 | 0.0052 | 0.9739 |
| 21 | 0.0043 | 0.9783 |
| 22 | 0.0036 | 0.9819 |
| 23 | 0.0030 | 0.9849 |
| 24 | 0.0025 | 0.9874 |
| 25 | 0.0021 | 0.9895 |
| 26 | 0.0017 | 0.9913 |
| 27 | 0.0015 | 0.9927 |
| 28 | 0.0012 | 0.9939 |
| 29 | 0.0010 | 0.9949 |
| 30 | 0.0008 | 0.9958 |
| 31 | 0.0007 | 0.9965 |
| 32 | 0.0006 | 0.9971 |
| 33 | 0.0005 | 0.9976 |
| 34 | 0.0004 | 0.9980 |
| 35 | 0.0003 | 0.9983 |
Waiting for the first success
The geometric distribution answers "how many tries until it works?" when every try is independent with the same success chance p. To succeed first on trial k you must fail k − 1 times and then succeed:
P(X = k) = (1 − p)ᵏ⁻¹ · p P(X ≤ k) = 1 − (1 − p)ᵏ
Every bar in the chart is (1 − p) times the bar before it, a constant ratio, which is where the name geometric comes from (as in a geometric sequence).
Worked example
Rolling a die until a six: P(first six on roll 3) = (5/6)² × 1/6 ≈ 0.1157. The chance of needing more than 10 rolls is (5/6)¹⁰ ≈ 0.1615, and on average you need 1/p = 6 rolls.
Memorylessness and the gambler's fallacy
If you have already rolled ten times without a six, the chance of a six on the next roll is still 1/6. Nothing is "due". The law of large numbers page shows why long-run averages still settle down anyway.
Still not clicking? Ask the tutor
An AI tutor that sees the numbers you entered above and explains them. It can make mistakes, so check anything important against the worked steps.
Questions students ask
What is the geometric distribution formula?
P(X = k) = (1 − p)^(k − 1) × p: k − 1 failures followed by one success. The cumulative probability is P(X ≤ k) = 1 − (1 − p)^k.
What is the expected value of a geometric distribution?
The mean number of trials until the first success is 1 / p. With p = 1/6 (rolling a six) you wait 6 rolls on average.
Is the geometric distribution memoryless?
Yes. If you have already failed 10 times, the chance the next trial succeeds is still p. Past failures do not make success "due".
Why do textbooks define it differently?
Some count the trials up to and including the first success (X = 1, 2, 3, …), which this page uses. Others count only the failures before it (Y = 0, 1, 2, …), so Y = X − 1.