About the Geometric Distribution Calculator
This geometric distribution calculator answers the question "how long until the first success?" Enter the probability of success on a single trial, p, and a trial number k. It returns the probability that the first success happens exactly on trial k, the cumulative probabilities P(X < k), P(X ≤ k), P(X > k) and P(X ≥ k), plus the mean, variance and standard deviation of the waiting time, and charts the probability mass function.
It suits statistics students checking homework, quality engineers estimating how many inspections it takes to find the first defect, sales teams modelling calls until the first conversion, and gamers working out how many attempts a rare drop takes. Because textbooks use two conventions, you can choose whether X counts the trial on which the first success occurs (k = 1, 2, 3, …) or the number of failures before it (k = 0, 1, 2, …).
The model assumes independent trials with the same success probability every time (Bernoulli trials). If p changes from trial to trial, or you sample without replacement from a small group, the geometric distribution no longer applies exactly.
With the default inputs, the p(x = k) is 0.128. Change any value above to recalculate instantly.
How to use the geometric distribution calculator
- 1Enter the probability of success on one trial as a decimal (0.2 = 20%).
- 2Enter the value k you are interested in.
- 3Choose whether X counts the trial of the first success or the failures before it.
- 4Read P(X = k) and the cumulative probabilities.
- 5Use the mean and chart to see how long the wait typically is.
Formula and method
For the first success to happen on trial k, the first k − 1 trials must all fail (probability 1 − p each) and trial k must succeed (probability p). Multiplying these independent probabilities gives the probability mass function. The chance that the first success has not happened after k trials is (1 − p)^k, so the cumulative probability P(X ≤ k) is one minus that.
The "failures" convention simply shifts everything by one: Y = X − 1 counts the failures before the first success, so its mean is one less, (1 − p)/p, while the variance (1 − p)/p² is the same. The distribution is memoryless: having already failed m times does not change the probability of waiting k more trials.
- p
- Probability of success on a single trial
- k
- Trial number of the first success (or number of failures before it)
- X
- Trial on which the first success occurs
- Y
- Number of failures before the first success (Y = X − 1)
Worked examples
First success on the 3rd trial with p = 0.2
Two failures then a success: 0.8 × 0.8 × 0.2 = 0.128. The chance of at least one success within three trials is 1 − 0.8³ = 0.488. With p = 0.2 the average wait is 1/0.2 = 5 trials, and the variance is 0.8/0.04 = 20.
Rolling a six: first six on or before the 6th roll
P(first six on roll 6) = (5/6)⁵ × 1/6 ≈ 0.0670. The chance of having rolled a six within six rolls is 1 − (5/6)⁶ ≈ 0.6651, so about one time in three you will still be waiting after six rolls, even though the average wait is exactly 6.
Failures convention: 4 failed sales calls before the first sale at p = 0.05
With a 5% conversion rate, four misses then a sale has probability 0.95⁴ × 0.05 ≈ 0.0407. The chance of a sale within the first five calls (at most four failures) is 1 − 0.95⁵ ≈ 0.2262, and on average a rep makes 19 unsuccessful calls before the first sale.
Frequently asked questions
What is the geometric distribution used for?+
It models the number of independent trials needed to get the first success when every trial has the same probability p — for example the number of coin flips until the first head, calls until the first sale, or parts inspected until the first defect.
What is the difference between the two geometric distribution conventions?+
One version counts the trial on which the first success occurs (k starts at 1, mean 1/p). The other counts failures before the first success (k starts at 0, mean (1 − p)/p). They describe the same process shifted by one, and share the variance (1 − p)/p².
What does it mean that the geometric distribution is memoryless?+
Past failures do not change the future. If you have already failed 10 times, the probability that the first success needs 3 more trials is the same as it was at the start. It is the only discrete distribution with this property.
How is the geometric distribution related to the binomial and negative binomial?+
The binomial counts successes in a fixed number of trials, while the geometric counts trials until the first success. The negative binomial generalises the geometric to the number of trials until the r-th success; the geometric is the case r = 1.
How do I find the probability of at least one success in n trials?+
Use P(X ≤ n) = 1 − (1 − p)^n. For example, with a 1% chance per attempt, the probability of at least one success in 100 attempts is 1 − 0.99¹⁰⁰ ≈ 63.4%, not 100%.