Geometric Distribution Calculator
Work out geometric probabilities using either convention: trials until the first success or failures before it. Includes CDF, mean, variance and a bar chart.
Distribution summary
P(X = k) = (1 − p)^(k−1) · p
P(X ≤ k) = 1 − (1 − p)^k
Mean = 1 / p, Variance = (1 − p) / p²
Probability mass (k = 3 highlighted)
Memorylessness
The geometric distribution is the only discrete distribution with no memory: P(X > s + t | X > s) = P(X > t). After 3 unsuccessful attempts the chance of needing another 3 is still 51.2000% — the coin does not remember the run of tails.
Probability table
| k | P(X = k) | P(X ≤ k) |
|---|---|---|
| 1 | 0.2 | 0.2 |
| 2 | 0.16 | 0.36 |
| 3 | 0.128 | 0.488 |
| 4 | 0.1024 | 0.5904 |
| 5 | 0.08192 | 0.67232 |
| 6 | 0.065536 | 0.737856 |
| 7 | 0.0524288 | 0.7902848 |
| 8 | 0.04194304 | 0.83222784 |
| 9 | 0.03355443 | 0.86578227 |
| 10 | 0.02684355 | 0.89262582 |
| 11 | 0.02147484 | 0.91410065 |
| 12 | 0.01717987 | 0.93128052 |
| 13 | 0.0137439 | 0.94502442 |
| 14 | 0.01099512 | 0.95601953 |
| 15 | 0.00879609 | 0.96481563 |
| 16 | 0.00703687 | 0.9718525 |
| 17 | 0.0056295 | 0.977482 |
| 18 | 0.0045036 | 0.9819856 |
What is the Geometric Distribution Calculator?
The ByteTools Geometric Distribution Calculator answers the question "how many attempts until it finally works?
- Both conventions supported, with the active formulas shown on screen
- Accepts p as a decimal, a percentage or a fraction
- Exact PMF, CDF and both upper tails
- Mean, variance, standard deviation and median
- Bar chart with your k highlighted plus a probability table
- The memoryless property explained with your own numbers
How to use the Geometric Distribution Calculator
- 1
Enter the success probability p as a decimal, a percentage or a fraction.
- 2
Choose your convention: trials until the first success, or failures before it.
- 3
Enter the value of k you want the probability for.
- 4
Read P(X = k) and the four cumulative probabilities across the top.
- 5
Check the mean, variance and median, and use the bar chart and table for the full shape.
About the Geometric Distribution Calculator
The ByteTools Geometric Distribution Calculator answers the question "how many attempts until it finally works?". Enter the success probability and a value of k, and it returns the exact probability plus every cumulative tail. Textbooks disagree about what k counts, so both conventions are on the page and switching between them updates the formulas, the mean and the chart together.
The trials convention has k counting the trial on which the first success happens, so k starts at 1 and the mean is 1/p. The failures convention has k counting the failures before that success, so k starts at 0 and the mean is (1−p)/p. The variance is (1−p)/p² either way, and the tool prints whichever formula is currently in use so there is no ambiguity about which one produced your answer.
It is useful for quality control sampling, gaming drop rates, sales conversion, penetration testing and any repeated independent trial where you care about how long the wait might be. All the arithmetic happens locally in your browser, nothing is uploaded to a server, and the page keeps working offline.
Frequently asked questions
What is the geometric distribution used for?
It models the number of independent attempts needed before the first success, when each attempt has the same success probability. Typical uses are the number of items inspected before finding a defect, calls made before a sale, or attempts before a rare item drops in a game.
Which geometric distribution convention should I use?
Use trials until the first success if your k counts the successful attempt itself, giving a mean of 1/p. Use failures before the first success if k counts only the failures, giving a mean of (1−p)/p. Check which one your course or textbook uses — the probabilities differ by one shift in k.
What does memoryless mean for the geometric distribution?
It means past failures do not change what happens next: after ten failures, the probability of needing another ten more is exactly the same as it was at the start. The geometric distribution is the only discrete distribution with this property, and it is why gambler's fallacy reasoning fails.
How do I calculate the mean of a geometric distribution?
With the trials convention it is 1 divided by p, so a 20% success rate means an average of 5 attempts. With the failures convention it is (1−p)/p, which is one less, because you are no longer counting the successful attempt itself.
What is the difference between the geometric and the negative binomial distribution?
The geometric distribution counts attempts until the first success. The negative binomial generalises it to attempts until the rᵗʰ success, so the geometric distribution is just the negative binomial with r set to 1.
Related tools
Poisson Distribution Calculator
Calculate Poisson probabilities for a given rate: P(X = k), cumulative tails, range probabilities, mean and variance, with a bar chart and full probability table.
Binomial Distribution Calculator
Compute binomial probabilities P(X=k), P(X≤k) and P(X≥k) for n trials with success chance p, plus the distribution's mean, variance and standard deviation.
Hypergeometric Distribution Calculator
Calculate probabilities for sampling without replacement: P(X = k), cumulative tails, mean and variance with the finite population correction, plus a chart.
Exponential Distribution Calculator
Calculate exponential distribution probabilities from a rate or a mean: PDF, CDF, survival, interval probability, median, variance and the inverse quantile.
Probability Calculator
Work out probabilities for one or two events: complement, union, intersection, conditional probability and the chance of at least one success in n trials.