The geometric distribution calculator above models repeated independent trials with a constant success probability and answers the question of how long you wait for the first success. It gives the exact probability that the first success lands on trial k, the cumulative probability of having succeeded by then, the probability of still waiting, the mean and variance, and the number of trials needed before success becomes as likely as you specify.
Arb Digital publishes this page because the geometric distribution is where two of the most persistent probability errors live. The first is the belief that a run of failures makes success more likely next time. The second is the belief that an expected value of 1/p means success is essentially assured after 1/p trials. Both are wrong, both are easy to demonstrate numerically, and the tool does so on your own numbers rather than in the abstract.
What This Geometric Distribution Calculator Does
It handles both definitions of the distribution, because both are in common use and they are not the same. Under the trials convention, X counts the trial on which the first success occurs, so the smallest possible value is 1 and the mean is 1/p. Under the failures convention, X counts the failures that precede the first success, so the smallest possible value is 0 and the mean is (1−p)/p. The two differ by exactly one throughout, and mixing them is a silent off-by-one that survives every plausibility check.
Alongside the probabilities it reports the mode, the median, and the number of trials needed to reach a stated confidence of at least one success. That last figure is usually the actionable one: nobody plans around the probability that the first success is precisely on trial four, but everybody wants to know how many attempts to budget for.
The boundary with our binomial distribution calculator is worth stating plainly. The binomial fixes the number of trials and asks how many successes you get. The geometric fixes the number of successes at one and asks how many trials that takes. Same underlying process, opposite question, and the two are complementary rather than competing.
How to Use It
- Enter the per-trial success probability. It must be constant across trials, which rules out sampling without replacement from a small pool.
- Pick the convention. If your textbook says the mean is 1/p, you want the trials convention. If it says (1−p)/p, you want failures.
- Set k. The headline gives the probability of exactly that value; the grid gives the two cumulative directions.
- Set a confidence target. Ninety percent is a common planning threshold, and the answer is the number of trials that makes at least one success that likely.
- Read the bars. They show the first dozen probabilities, which makes the distribution's shape obvious immediately.
The Formulas and How They Are Calculated
Under the trials convention, the first success occurs on trial k exactly when the first k−1 trials fail and the kth succeeds, so P(X = k) = (1−p)k−1p for k = 1, 2, 3 and upward. The cumulative form has a closed expression because the complement is simple: failing every one of the first k trials has probability (1−p)k, so P(X ≤ k) = 1 − (1−p)k.
The mean is 1/p and the variance is (1−p)/p2. Under the failures convention every probability shifts down by one, giving P(X = k) = (1−p)kp for k = 0, 1, 2 and upward, a mean of (1−p)/p, and the same variance. Penn State's STAT 414 lesson on geometric and negative binomial distributions derives these results and extends them to the case of waiting for the rth success rather than the first.
The trials needed for a confidence target c come from inverting the cumulative function: solve 1 − (1−p)n ≥ c to get n ≥ ln(1−c)/ln(1−p), then take the ceiling because trials are whole. The median is the same expression with c set to one half. The mode, notably, is always the smallest possible value — trial 1 under the trials convention — because each successive term is multiplied by (1−p), which is less than one.
The Mean Is Not the Typical Outcome
With a success probability of 25 percent the mean is 4, which invites the reading that the first success usually arrives around the fourth attempt. It does not. The single most likely trial for the first success is trial 1, with probability 25 percent, and every subsequent trial is strictly less likely than the one before it. The distribution is at its highest at the very start and decays geometrically from there.
The mean sits at 4 because the tail is long, not because outcomes cluster there. Half the time the first success arrives by trial 3, and around 10 percent of the time it takes 9 trials or more. This is the same distinction that separates the mean from the median in any right-skewed distribution, and here the gap is structural rather than accidental: the mode, the median and the mean are three genuinely different numbers and only one of them is what most people mean by "typical".
The practical version of the error is planning capacity around 1/p attempts. Run exactly 1/p trials and the probability of at least one success is 1 − (1−p)1/p, which for p = 0.25 is 68.4 percent and which converges to 1 − 1/e = 63.2 percent as p gets small. So budgeting the expected number of attempts leaves you failing roughly a third of the time. Reaching 90 percent takes about 2.3 times the mean; reaching 99 percent takes about 4.6 times.
Memorylessness and the Gambler's Fallacy
The geometric distribution is the only discrete distribution with the memoryless property: P(X > m + n | X > m) = P(X > n). Having already failed m times tells you nothing whatever about how much longer you will wait. The distribution of the remaining trials is identical to the distribution you started with.
This is the formal statement of why the gambler's fallacy is a fallacy. Ten consecutive failures do not make the eleventh trial more likely to succeed; the probability is still p, because the trials are independent by assumption. It also cuts the other way: ten failures do not indicate a "cold streak" that will continue. Both readings attribute memory to a process that has none.
Where the intuition is right is when independence genuinely fails. If ten failures suggest the success probability was never p in the first place, updating your estimate of p is entirely correct — that is Bayesian inference about the parameter, not a claim about dependence between trials. The distinction matters: the geometric model assumes p is known and fixed, and a long run of failures is far better evidence that assumption is wrong than that a success is due. Our coin flip probability calculator shows the same independence property for the simplest possible case.
When the Constant Probability Assumption Fails
Every result here rests on p being identical on every trial and on the trials being independent. Two common situations break that. The first is sampling without replacement from a finite pool: drawing cards from a deck changes the composition each time, so the correct model is hypergeometric rather than geometric. Our hypergeometric distribution calculator handles that case, and the difference is negligible only when the pool is very large relative to the number drawn.
The second is learning or fatigue. A salesperson gets better with each call; a machine gets more likely to jam as it heats up; an applicant improves between interviews. Any process where the trials influence one another has a changing p and the geometric model will misstate the tail, usually badly, because the tail is precisely where compounding a wrong per-trial probability does the most damage.
A quick diagnostic is available. Under the geometric model the standard deviation is √(1−p)/p, which for small p is very close to the mean itself. If your observed waiting times have a spread far smaller than their average, the successes are more evenly spaced than independence allows, and something is regulating the process. For events in continuous time rather than discrete trials, the equivalent model is our exponential distribution calculator, and the count of events in a fixed window is handled by our Poisson distribution calculator.
A Worked Example You Can Check Yourself
Take p = 0.25 under the trials convention. The probability that the first success is exactly on trial 4 requires three failures then a success: 0.753 × 0.25 = 0.421875 × 0.25 = 0.10547, about 10.55 percent.
The probability of having succeeded by trial 4 is one minus the chance of four straight failures: 1 − 0.754 = 1 − 0.31641 = 0.68359, about 68.36 percent. So the chance of still waiting after four trials is 31.64 percent. The mean is 1/0.25 = 4 and the variance is 0.75/0.0625 = 12, giving a standard deviation of 3.464 — nearly as large as the mean, which is the signature of this distribution's long tail.
For the 90 percent target, n ≥ ln(0.10)/ln(0.75) = (−2.30259)/(−0.28768) = 8.004, so 9 trials are needed. The median is ln(0.50)/ln(0.75) = 2.409, rounded up to 3. Line those up: the mode is 1, the median is 3, the mean is 4, and 90 percent confidence needs 9. Four different summaries of the same distribution, all correct, all answering different questions. The NIST/SEMATECH e-Handbook's page on the binomial distribution covers the complementary model where the number of trials is fixed instead, and our probability calculator handles the underlying independence arithmetic.
Arb Digital's analysts plan against the confidence level a campaign actually needs, not the expected value that leaves a third of runs short.
Browse All Free Tools Talk To Our TeamCommon Mistakes to Avoid
- Mixing the two conventions — counting trials and counting failures differ by exactly one, and the resulting off-by-one passes every sanity check you are likely to run.
- Treating 1/p attempts as sufficient — that many trials gives roughly a 63 percent chance of at least one success, not a near certainty.
- Expecting failures to make success more likely — the distribution is memoryless, so the next trial always has probability p regardless of history.
- Applying it to sampling without replacement — the per-trial probability changes as the pool shrinks, which makes the model hypergeometric rather than geometric.
- Quoting the mean as the typical wait — the most likely single outcome is always the very first trial, and the median is well below the mean.
Related Free Tools From Arb Digital
Fix the number of trials and count successes with the binomial distribution calculator, handle sampling without replacement with the hypergeometric distribution calculator, move to continuous waiting time with the exponential distribution calculator, count events in a window with the Poisson distribution calculator, check the simplest independent case with the coin flip probability calculator, or combine events with the probability calculator. The free online tools hub lists every statistics tool we publish.
Frequently Asked Questions
It models the number of independent trials needed to get the first success when each trial has the same probability of succeeding. Its probability mass function multiplies the chance of failing every trial before the last by the chance of succeeding on it.
One counts the trial on which the first success occurs, starting at 1, with a mean of 1 divided by p. The other counts only the failures beforehand, starting at 0, with a mean of 1 minus p divided by p. They differ by exactly one throughout.
The binomial fixes the number of trials and counts how many successes occur. The geometric fixes the number of successes at one and counts how many trials that takes. They describe the same process from opposite directions.
Because each successive probability is the previous one multiplied by the failure probability, which is less than one. The sequence decreases monotonically, so the very first value is always the largest.
No. The distribution is memoryless, meaning the remaining wait has the same distribution however many failures have already happened. A long run is much better evidence that the assumed probability was wrong than that a success is due.
Solve the natural logarithm of one minus your confidence target divided by the natural logarithm of one minus p, then round up. Ninety percent confidence takes roughly 2.3 times the mean, and ninety-nine percent takes roughly 4.6 times.
Only as an approximation when the pool is very large relative to the number drawn. Otherwise the per-trial probability changes with each draw and the hypergeometric distribution is the correct model.
This page explains a statistical calculation for educational purposes only. It is not gambling, financial or business advice, and the model assumes a known, constant success probability that real processes rarely provide.