Skip to content
Statistics

Geometric Distribution Calculator

Enter the probability of success on each trial and the number of trials (or failures) you want to evaluate. The calculator returns the exact probability at k, all four cumulative tail probabilities, the mean, variance and standard deviation of the distribution. Switch between the two standard conventions (trials to first success vs failures before first success) and watch the PMF chart update in real time.

Your details

Trials convention: X counts each attempt including the success. Failures convention: X counts only the failed attempts before the first success. The two are related by X_failures = X_trials - 1.
Probability of success on each independent Bernoulli trial. Must be between 0 and 1 (exclusive).
The specific value to evaluate. For the trials convention k must be 1 or more; for the failures convention k can be 0 or more.
trials
P(X = k)Moderate probability
0.1029

Probability that the first success occurs exactly at trial k

P(X ≤ k)0.7599
P(X < k)0.657
P(X ≥ k)0.343
P(X > k)0.2401
Mean (expected value)3.3333
Variance7.7778
Standard deviation2.7889
P(X = k)0.1029
P(X ≤ k)0.7599
00.5111121
Trials (k)
  • PMF: P(X = k)
  • CDF: P(X ≤ k)

P(X = 4) = 10.29% with p = 0.3

  • There is a 10.29% chance the first success happens exactly at trial 4.
  • By trial 4, the cumulative probability of at least one success is 75.99%.
  • With p = 0.3, you can expect the first success after about 3.33 trials on average.

Next stepTo find how many trials you need to be 90% sure of at least one success, solve 1 - (1-p)^n >= 0.9, which gives n >= 7.

Formula

P(X=k)=(1p)k1p(k=1,2,3,)P(X = k) = (1-p)^{k-1} \cdot p \quad (k = 1, 2, 3, \ldots)

Worked example

Suppose a basketball player makes free throws with probability p = 0.7. What is the probability the first miss occurs on the 4th attempt (failures convention, k = 3)? PMF: (1 - 0.7)^3 * 0.7 = 0.3^3 * 0.7 = 0.027 * 0.7 = 0.0189, about 1.89%. The expected number of successes before the first failure is q/p = 0.3/0.7 ≈ 0.43.

What is the geometric distribution?

The geometric distribution is a discrete probability distribution that models the number of independent Bernoulli trials needed to get the first success. A Bernoulli trial is any experiment with exactly two outcomes: success (probability p) and failure (probability 1 - p). Because each trial is independent and the success probability stays constant, the distribution is memoryless: past failures carry no information about future attempts. This property makes the geometric distribution the discrete-time analogue of the exponential distribution.

Two conventions: trials vs failures

There are two common ways to define the geometric random variable. In the "trials" convention, X is the total number of trials up to and including the first success, so X can be 1, 2, 3, .... Its PMF is P(X = k) = (1 - p)^(k-1) * p, its mean is 1/p, and the minimum value is 1. In the "failures" convention, X is the number of failures before the first success, so X can be 0, 1, 2, .... Its PMF is P(X = k) = (1 - p)^k * p, and its mean is (1 - p)/p. Both conventions share the same variance (1 - p)/p^2 and standard deviation. This calculator supports both; choose the one that matches your textbook or problem statement.

How to use this calculator

Select the convention that matches your problem, enter the probability of success p (a number between 0 and 1), and enter the number of trials or failures k you want to evaluate. The calculator returns P(X = k), all four tail probabilities, and the mean, variance and standard deviation of the distribution. The chart below the results plots the full PMF and CDF so you can see how the distribution is shaped across the whole range of k. All results update instantly as you type.

Memoryless property and real-world applications

The geometric distribution is the only discrete distribution with the memoryless property: P(X > m + n | X > m) = P(X > n). In plain terms, if you have already failed m times, the conditional probability of needing n more trials is the same as if you were starting from scratch. Real-world applications include quality control (how many items until the first defective one), reliability engineering (how many cycles before the first failure), clinical trials (how many patients to recruit before the first adverse event), and telecommunications (how many transmission attempts before the first successful packet delivery).

PMF and CDF for p = 0.3 (trials convention)

k (trials)P(X = k)P(X ≤ k)P(X > k)
10.3000000.3000000.700000
20.2100000.5100000.490000
30.1470000.6570000.343000
40.1029000.7599000.240100
50.0720300.8319300.168070
60.0504210.8823510.117649
70.0352950.9176460.082354
80.0247060.9423520.057648
90.0172940.9596460.040354
100.0121060.9717520.028248

Exact probabilities for the number of trials to first success when p = 0.3. The CDF column shows the probability of success by that trial or earlier.

Frequently asked questions

What is the difference between the trials and failures convention?

In the trials convention X counts every attempt including the successful one, so the minimum value is 1 and the mean is 1/p. In the failures convention X counts only the failed attempts before the success, so the minimum value is 0 and the mean is (1 - p)/p. The two are related by X_failures = X_trials - 1. Both share the same variance. Choose whichever your textbook or problem statement uses.

What does the memoryless property mean in practice?

It means that past failures give you no new information about how many more trials you need. If you flip a biased coin looking for heads and you have already seen 10 tails, the expected number of additional flips to get the first head is exactly the same as it was on the very first flip. This is unique to the geometric distribution among all discrete distributions.

How do I find the probability of at least one success in n trials?

Using the trials convention, P(X <= n) = 1 - (1 - p)^n. For example, with p = 0.3 and n = 5, P(X <= 5) = 1 - 0.7^5 = 1 - 0.16807 = 0.83193, so there is about an 83.2% chance of at least one success in the first five trials.

What is the median of the geometric distribution?

The median is the smallest integer k such that P(X <= k) >= 0.5. For the trials convention this works out to the ceiling of -1 / log2(1 - p). For example with p = 0.3 the median is ceil(log(0.5) / log(0.7)) = ceil(1.94) = 2 trials. Because the distribution is right-skewed, the median is always less than or equal to the mean.

How does the geometric distribution relate to the negative binomial?

The negative binomial distribution generalises the geometric distribution to model the number of trials (or failures) needed to achieve r successes rather than just one. When r = 1, the negative binomial reduces exactly to the geometric distribution. The Poisson distribution arises as a limiting case of the binomial (and indirectly of the geometric) when n is large and p is small.

Sources

Written by Dr. Hannah Brandt, PhD Statistician · Munich, Germany

Applied statistician translating rigorous probability theory into clear, accurate tools for researchers and practitioners.

Search 3,500+ calculators

Loading search…