Geometric Distribution Calculator
Explore waiting-time probabilities for the first success in independent trials.
Results are calculated automatically as you enter data.
▼ See explanations and tips below ▼
Related Calculators
What Is a Geometric Distribution?
A geometric distribution is a probability model for waiting until the first success. It applies when you repeat the same kind of trial, each trial has only two outcomes, the trials are independent, and the probability of success stays the same every time.
In this article, \(X\) means the trial number on which the first success occurs. With that convention, \(X\) starts at \(1\), not \(0\). For example, if you flip a coin until the first heads appears and the first heads comes on the fourth flip, then \(X=4\).
This makes the geometric distribution useful for questions such as:
- What is the probability that the first success happens exactly on trial \(k\)?
- What is the probability that the first success happens within the first \(k\) trials?
- What is the probability that it takes at least \(k\) trials?
- What is the probability that the first success happens between two trial numbers?
The result is a probability, so it has no physical unit. The trial count is measured in trials, attempts, inspections, calls, rolls, tests, or whatever repeated action the situation uses.
Why the Geometric Distribution Matters
The geometric distribution turns a repeated-attempt problem into a clear probability question. Instead of only saying that one trial has a success probability of \(p\), it helps answer how long someone might wait before seeing the first success.
That matters in many practical settings. A quality-control team may inspect items until finding the first defective unit. A student may model repeated quiz guesses until the first correct answer. A researcher may look at repeated independent observations until the first target event appears. A teacher may use the distribution to explain how constant probability and independence shape waiting time.
The distribution is especially useful because it separates two ideas that people often mix together: the probability of success on one trial and the probability of waiting a certain number of trials before the first success.
Key Terms to Know
- Trial: One repeated attempt or observation, such as one coin flip, one inspection, or one call.
- Success: The outcome being counted, such as getting heads, finding a defect, or receiving a yes response.
- Failure: Any trial that is not a success.
- Bernoulli trial: A trial with two possible outcomes, usually called success and failure.
- Success probability, \(p\): The probability of success on each trial. It must be greater than \(0\) and no more than \(1\).
- Failure probability, \(q\): The probability of failure on each trial, equal to \(q=1-p\).
- Random variable, \(X\): The trial number on which the first success occurs.
- Probability mass function: A formula for the probability that a discrete random variable equals a specific value.
- Cumulative probability: The probability that the first success happens at or before a given trial.
- Survival or tail probability: The probability that the first success happens at or after a given trial.
- Expected value: The long-run average waiting time until the first success.
- Variance and standard deviation: Measures of how spread out the waiting time can be.
- Memoryless property: The idea that, after failures have already occurred, the future waiting pattern is unchanged as long as the same independent-trial assumptions still hold.
How Geometric Distribution Probabilities Work
Let:
- \(p\) = probability of success on each trial
- \(q=1-p\) = probability of failure on each trial
- \(X\) = trial number of the first success
- \(k\) = a positive whole-number trial count
For the first success to occur exactly on trial \(k\), the first \(k-1\) trials must be failures and trial \(k\) must be a success. That gives the point probability formula:
where \(k=1,2,3,\ldots\).
The formula has two parts. The factor \((1-p)^{k-1}\) accounts for the failures before the success. The final factor \(p\) accounts for the success on trial \(k\).
At-most probability
An at-most probability asks whether the first success happens on or before trial \(k\):
This is often the easiest way to answer questions like “What is the probability of getting the first success within the first 10 trials?”
At-least probability
An at-least probability asks whether the first success happens on trial \(k\) or later:
This is the probability that the first \(k-1\) trials are all failures.
Between two trial numbers
For an inclusive range from trial \(a\) through trial \(b\), where \(1\le a\le b\):
The word “inclusive” is important: both endpoints are included. For example, \(P(3\le X\le 5)\) includes first success on trial \(3\), trial \(4\), or trial \(5\).
Expected value, variance, and standard deviation
The expected number of trials until the first success is:
The variance is:
The standard deviation is the square root of the variance:
The expected value is an average over many repeated situations. It does not mean the first success must happen exactly on that trial number, and it does not have to be a whole number.
The memoryless idea
The geometric distribution is memoryless in the sense that past failures do not change the model for future trials. For nonnegative whole numbers \(r\) and \(s\):
This property depends on the assumptions. It is reasonable for idealized independent trials with a constant success probability, but it may not fit situations where people learn, equipment wears out, or conditions change over time.
Examples of Geometric Distribution Probabilities in Practice
Example 1: Exact probability
Suppose the success probability on each trial is \(p=0.25\), and you want the probability that the first success happens exactly on trial \(4\).
Here, \(q=1-p=0.75\) and \(k=4\):
So the probability is \(0.10546875\), or about \(10.546875\%\).
Example 2: At-most probability
Suppose an inspection has an \(8\%\) chance of finding the target condition on each independent trial. Enter this as \(p=0.08\), not \(8\).
To find the probability that the first success happens within the first \(10\) trials:
So there is about a \(56.561155\%\) chance that the first success occurs by trial \(10\).
Example 3: Inclusive between probability
Suppose \(p=0.20\), so \(q=0.80\). To find the probability that the first success occurs from trial \(3\) through trial \(5\):
The probability is \(0.31232\), or \(31.232\%\). This includes trial \(3\), trial \(4\), and trial \(5\).
Example 4: Certain success on the first trial
If \(p=1\), success is certain on every trial. That means the first success must occur on trial \(1\):
The expected waiting time is \(1\) trial, and the variance is \(0\) because there is no uncertainty about when the first success occurs.
How to Interpret the Result
The main probability result tells you how likely it is that the first success occurs in the event you selected. A decimal probability of \(0.25\) means the same thing as \(25\%\) because:
For an exact result, \(P(X=k)\) is the probability that the first success happens on one specific trial. For an at-most result, \(P(X\le k)\) is the probability that the first success has happened by trial \(k\). For an at-least result, \(P(X\ge k)\) is the probability that the first success does not happen before trial \(k\). For a between result, \(P(a\le X\le b)\) is the probability that the first success falls inside that inclusive range.
A higher at-most probability means success is likely to occur within that many trials. A higher at-least probability means a long wait is still fairly plausible. Exact probabilities usually get smaller as \(k\) increases when \(0<p<1\), because more failures have to occur before the first success.
The expected trials value, \(1/p\), is the long-run average waiting time. For example, if \(p=0.20\), then \(E[X]=5\). That does not mean every first success happens on trial \(5\); it means the average waiting time would approach \(5\) trials over many repeated situations that follow the same assumptions.
Variance is measured in squared trials, while standard deviation is measured in trials. A larger standard deviation means the waiting time can vary more widely. The failure probability is the single-trial chance of not getting a success, equal to \(1-p\).
If a chart or table is shown, highlighted bars or rows indicate which exact trial probabilities are included in the selected event. For at-least probabilities, remember that the event includes the infinite tail beyond the visible chart.
Common Mistakes and Misconceptions
One common mistake is entering a percent instead of a decimal. For an \(8\%\) success probability, enter \(0.08\), not \(8\). A value of \(8\) would mean an impossible \(800\%\) success probability.
Another common mistake is using \(k=0\). In this convention, \(X\) is the trial number of the first success, so the smallest possible value is \(1\). A different convention counts the number of failures before the first success and starts at \(0\), but that is not the convention used here.
It is also easy to confuse \(P(X\le k)\) with \(P(X\ge k)\). The first asks whether success happens by trial \(k\). The second asks whether the wait lasts until trial \(k\) or later.
For between probabilities, the endpoints are included. The event \(P(3\le X\le 5)\) includes trial \(3\) and trial \(5\), not just the trials between them.
Do not treat a finite chart as the whole distribution. A geometric distribution can continue indefinitely when \(0<p<1\), even though very late first successes may be unlikely.
Finally, do not use the geometric distribution when the probability of success changes from trial to trial, the trials are not independent, or sampling occurs without replacement in a way that changes the probability after each draw.
When to Use the Geometric Distribution
Use the geometric distribution when all of these conditions are reasonable:
- Each trial has two outcomes: success or failure.
- The probability of success is the same on every trial.
- Trials are independent.
- You are interested in the trial number of the first success.
- Trial counting starts at \(1\).
Common examples include repeated coin flips until the first heads, repeated independent inspections until the first defective item, repeated outreach attempts until the first response, repeated games until the first win, or simple classroom probability problems about waiting time.
The geometric distribution is not a good fit when attempts influence later attempts. For example, it may not fit a learning process where practice improves the success probability, a reliability problem where parts become more likely to fail as they age, or a without-replacement drawing problem where each draw changes the remaining population.
Limitations and Things to Keep in Mind
The geometric distribution is a model. Its answers are only as meaningful as the assumptions behind the model. If the trials are not independent or the success probability is not constant, the result may be misleading.
The success probability must be a finite number greater than \(0\) and no more than \(1\). Any positive finite value is accepted, including values as small as the available floating-point range. A probability of \(0\) would mean success can never occur, so there is no finite waiting time for the first success. A probability of \(1\) means success is certain on the first trial.
Trial inputs must be positive whole numbers. Decimal, negative, zero, missing, or nonnumeric trial values do not match this trial-counting model.
Displayed results may be rounded. Very small or very large values may be shown in scientific notation. When a positive probability is too small for direct floating-point representation, the calculator reports its logarithm instead of displaying it as zero. Similarly, moments that exceed the numeric range are labeled with an overflow magnitude rather than shown as unavailable; these outputs do not restrict the accepted positive finite values of \(p\).
A graph or table is a visual aid, not a replacement for the formula. The displayed chart may show only a limited number of bars, and the table may show only the first displayed trials. The calculator warns when a selected event extends beyond the plotted bars. In at-least mode, the probability includes all later trials in the infinite tail, even when those later trials are not visible.
For high-stakes decisions involving money, health, safety, engineering, legal obligations, or official records, treat the result as a model-based estimate. Check the assumptions carefully and consult a qualified professional when needed.
How to Use This Calculator
- Enter the success probability \(p\) as a finite decimal greater than \(0\) and no more than \(1\). Very small positive values are accepted; for example, enter \(0.08\) for \(8\%\).
- Choose the probability mode: exact, at-most, at-least, or between.
- For exact, at-most, or at-least mode, enter the trial number \(k\) as a positive whole number.
- For between mode, enter the lower and upper trial numbers. The lower value must be less than or equal to the upper value.
- Read the main result as both a decimal probability and a percent.
- Review the expected trials, variance, standard deviation, and failure probability for more context.
- Use the chart and table to compare individual \(P(X=k)\) values. A highlighted bar or row shows which trial probabilities are included in the selected event.
- If available, use the graph download option to save the displayed chart.
Frequently Asked Questions
Is the success probability entered as a percent or a decimal?
Enter it as a decimal. For example, \(25\%\) should be entered as \(0.25\), and \(8\%\) should be entered as \(0.08\). Do not enter \(25\) or \(8\) unless the tool specifically asks for a percent, because those values are greater than \(1\) and are not valid decimal probabilities.
Why does the trial count start at 1 instead of 0?
This convention defines \(X\) as the trial number on which the first success occurs. Since a first success cannot occur before any trial has happened, the smallest possible value is \(X=1\). Some textbooks and software instead count failures before the first success, which starts at \(0\) and uses a shifted formula.
What is the difference between exact, at-most, and at-least?
Exact probability, \(P(X=k)\), asks for the first success on one specific trial. At-most probability, \(P(X\le k)\), asks for the first success by trial \(k\). At-least probability, \(P(X\ge k)\), asks for the first success on trial \(k\) or later.
Is the between mode inclusive?
Yes. A between event includes both endpoint trials. For example, \(P(4\le X\le 7)\) includes first success on trial \(4\), \(5\), \(6\), or \(7\).
What does expected trials mean?
Expected trials is the long-run average waiting time until the first success. It may be a decimal even though an actual trial count must be a whole number. It is an average over many repeated situations, not a promise about what will happen in one case.
Can I use this when the success probability changes over time?
No. The geometric distribution assumes the same success probability on every independent trial. If the probability changes because of learning, fatigue, wear, depletion, changing conditions, or sampling without replacement, a different model is usually needed.
What happens when \(p=1\)?
If \(p=1\), success is certain on the first trial. The probability of \(X=1\) is \(1\), the probability of any later first success is \(0\), the expected waiting time is \(1\) trial, and the variance is \(0\).
Sources and References
Books
- Barbara Illowsky and Susan Dean. Introductory Statistics 2e. OpenStax, 2023. Section 4.4, “Geometric Distribution,” and Chapter 4 Formula Review. https://openstax.org/books/introductory-statistics-2e/pages/4-4-geometric-distribution
- Charles M. Grinstead and J. Laurie Snell. Introduction to Probability. 2nd ed., American Mathematical Society, 2003; free CHANCE Project/Dartmouth version, 2006. Chapter 5.1, “Important Distributions,” geometric distribution subsection. https://math.dartmouth.edu/~prob/prob/prob.pdf
Online and Educational Sources
- Penn State Department of Statistics. “11 Geometric and Negative Binomial Distributions.” STAT 414: Introduction to Probability Theory. Accessed June 28, 2026. https://online.stat.psu.edu/stat414/Lesson11
- Minitab, LLC. “Geometric distribution.” Minitab Support. Accessed June 28, 2026. https://support.minitab.com/en-us/minitab/help-and-how-to/probability-distributions-random-data-and-resampling-analyses/supporting-topics/distributions/geometric-distribution/