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.

Probability of
P(X = 3)0.1157
Mean6
Std deviation5.4772
1: 0.166712: 0.13893: 0.11574: 0.096545: 0.08046: 0.06707: 0.055878: 0.04659: 0.038810: 0.03231011: 0.026912: 0.022413: 0.01871314: 0.015615: 0.013016: 0.01081617: 0.009018: 0.007519: 0.00631920: 0.005221: 0.004322: 0.00362223: 0.003024: 0.002525: 0.00212526: 0.001727: 0.001528: 0.00122829: 0.001030: 0.000831: 0.00073132: 0.000633: 0.000534: 0.00043435: 0.0003

P(X = 3) = (1 − 0.1667)^2 × 0.1667 = 0.1157

Full probability table
kP(X = k)P(X ≤ k)
10.16670.1667
20.13890.3056
30.11570.4213
40.09650.5177
50.08040.5981
60.06700.6651
70.05580.7209
80.04650.7674
90.03880.8062
100.03230.8385
110.02690.8654
120.02240.8878
130.01870.9065
140.01560.9221
150.01300.9351
160.01080.9459
170.00900.9549
180.00750.9624
190.00630.9687
200.00520.9739
210.00430.9783
220.00360.9819
230.00300.9849
240.00250.9874
250.00210.9895
260.00170.9913
270.00150.9927
280.00120.9939
290.00100.9949
300.00080.9958
310.00070.9965
320.00060.9971
330.00050.9976
340.00040.9980
350.00030.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.

Keep exploring