What this calculator does
The geometric distribution describes how long you wait for the first success in repeated independent trials. At a 25% success rate, the chance the first success lands exactly on the fourth trial is 10.5%.
The expected wait is 1 divided by the probability, so 4 trials here, but the mean is a poor summary of this distribution. The most likely single outcome is always the first trial, and there is already a 57.8% chance of success by trial 3. The mean sits above the median because the long right tail drags it upward.
The formula
The probability that the first success occurs on trial k is the chance of failing k−1 times multiplied by the chance of succeeding once. The cumulative figure is one minus the chance of failing every trial up to k. The mean is 1/p and the standard deviation is √(1−p)/p, both of which grow quickly as p falls.
| Term | Meaning |
|---|---|
| p | The success probability on each individual trial, assumed constant. |
| Memorylessness | Past failures do not change future chances. The geometric is the only discrete distribution with this property. |
| Expected trial | 1/p, the average wait for the first success. |
| Cumulative probability | The chance of at least one success within k trials. |
The inputs explained
| Field | What to enter |
|---|---|
| Success probability per trial (%) | Success probability per trial, as a percentage. It must stay constant across trials. |
| Trial of the first success (k) | The trial number to evaluate. Must be a positive whole number. |
When to use it
Quality inspection
How many items must be checked before finding the first defect, at a known defect rate.
Estimating attempts needed
Any repeated attempt at a fixed success rate, from sales calls to drilling prospects.
Understanding gambling odds
The wait for a first win, and why a long run of losses does not make a win any more likely.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How long until the first success at 25%?
The chance the first success lands on each trial.
| Trial (k) | P(first success on trial k) | P(success within k trials) | Expected trial of first success |
|---|---|---|---|
| Trial 1 | 25.0% | 25.0% | 4.00 |
| Trial 2 | 18.8% | 43.8% | 4.00 |
| Trial 3 | 14.1% | 57.8% | 4.00 |
| Trial 4 | 10.5% | 68.4% | 4.00 |
| Trial 8 | 3.34% | 90.0% | 4.00 |
Questions
Why is the first trial the most likely?
Because reaching any later trial requires failing every trial before it, and each failure multiplies in another factor below 1. The probability therefore decreases monotonically from trial 1 onward, whatever the success rate. This surprises people who expect the peak to sit near the mean.
What does memoryless mean?
That having already failed ten times tells you nothing about the next trial. The chance of success remains p regardless of history. This is mathematically true for independent trials, and it is the formal reason the gambler fallacy is a fallacy.
Why is the mean higher than the median?
Because the distribution is right-skewed. There is no upper limit on how long you might wait, and those rare very long waits pull the average up. At p = 25% the median is 3 trials while the mean is 4.
How does this differ from the negative binomial?
The geometric waits for the first success; the negative binomial waits for the rth. The geometric is the special case of the negative binomial with r = 1, so anything you can do here you can do there with r set to 1.
For waiting on several successes, see the negative binomial calculator. For a fixed number of trials, see the binomial distribution calculator.