Geometric Distribution Calculator

Find exact and cumulative geometric probabilities, mean, variance, and a full distribution table for any k and p.

🎯 Geometric Distribution Calculator
Trial number k (first success on trial k)3
130
Success probability p (%)30%
%
1%100%
Success probability p (%)30%
%
1%100%
Show k from 1 to15
250
P(X = k): Exact Probability
P(X ≤ k): Cumulative
P(X ≥ k): Upper Tail
Mean (1/p)
Variance ((1-p)/p²)
Standard Deviation
Mean (1/p)
Standard Deviation

🎯 What is the Geometric Distribution?

The geometric distribution models the number of independent Bernoulli trials needed to obtain the first success. Each trial has two possible outcomes (success or failure), every trial is independent of the others, and the probability of success p remains constant across all trials. If you roll a die repeatedly until you get a six, or call customers until one agrees to a demo, or inspect products until you find a defect, the number of attempts follows a geometric distribution.

The probability mass function (PMF) is P(X = k) = (1 - p)^(k-1) times p for k = 1, 2, 3, and so on. The term (1 - p)^(k-1) is the probability of exactly k-1 consecutive failures, and the final p is the probability of success on the k-th trial. There is only one arrangement because the success must fall on the last trial, so no binomial coefficient appears in the formula.

The geometric distribution has three key properties that set it apart from other discrete distributions. First, it is memoryless: if the first success has not occurred by trial m, the conditional probability that it occurs on trial m + n is exactly the same as if you started fresh. Second, the support is infinite: unlike the binomial (which has fixed n), the geometric can take any positive integer value. Third, it belongs to the exponential family, making it the discrete analogue of the continuous exponential distribution.

Common real-world applications include modelling the number of free throws until a basketball player makes a shot, the number of network packets sent before one is successfully acknowledged, the number of customer calls until a sale, and the number of quality-control inspections until a defective unit is found. In each case the key assumption is that trials are independent and p is constant, which should be verified before applying the geometric model.

📐 Formula

P(X = k)  =  (1 − p)k − 1 × p
k = trial number of the first success (k = 1, 2, 3, ...)
p = probability of success on each trial (0 < p ≤ 1)
(1 − p)k − 1 = probability of exactly k − 1 consecutive failures before the success
Mean: μ = 1 ÷ p
Variance: σ² = (1 − p) ÷ p²
CDF: P(X ≤ k) = 1 − (1 − p)k
Survival: P(X > k) = (1 − p)k
Example: p = 0.25, k = 3: P(X = 3) = (0.75)² × 0.25 = 0.5625 × 0.25 = 0.140625

📖 How to Use This Calculator

Steps

1
Choose a mode. Select "Calculate Probability" for a specific k or "Distribution Table" to see all probabilities from k = 1 up to a chosen maximum.
2
Enter the trial number k. In Probability mode, set k to the specific trial on which you want the first success to occur (any positive integer from 1 to 500).
3
Enter the success probability. Set p as a percentage. For example, a 20% success rate is entered as 20.
4
Read the results. The calculator shows P(X = k), P(X at most k), P(X at least k), the mean 1/p, variance, and standard deviation for instant interpretation.

💡 Example Calculations

Example 1: Free Throw Shooting (p = 70%, k = 2)

A basketball player makes 70% of free throws. What is the probability the first made shot occurs on attempt 2?

1
Set p = 0.70 and k = 2. The player must miss attempt 1 and make attempt 2.
2
P(X = 2) = (1 - 0.70)^(2-1) times 0.70 = 0.30^1 times 0.70 = 0.21.
3
P(X at most 2) = 1 - (1 - 0.70)^2 = 1 - 0.09 = 0.91. There is a 91% chance the player makes a free throw within 2 attempts.
P(X = 2) = 21.00% | Mean = 1.43 attempts
Try this example →

Example 2: Sales Call Conversion (p = 10%, k = 5)

A salesperson closes a deal on 10% of calls. What is the probability the first sale happens on the 5th call?

1
Set p = 0.10 and k = 5. The first four calls must fail and the fifth must succeed.
2
P(X = 5) = (0.90)^4 times 0.10 = 0.6561 times 0.10 = 0.06561, or about 6.56%.
3
The mean is 1/0.10 = 10 calls. About 65.1% of the time the first sale occurs within 10 calls (P(X at most 10) = 1 - 0.9^10 = 0.6513).
P(X = 5) = 6.56% | Mean = 10 calls
Try this example →

Example 3: Quality Control Inspection (p = 5%, k = 1)

A production line has a 5% defect rate. What is the probability the first defective unit is the very first inspected?

1
Set p = 0.05 and k = 1. No failures precede the success, so (1-p)^0 = 1.
2
P(X = 1) = (0.95)^0 times 0.05 = 1 times 0.05 = 0.05, or exactly 5%.
3
The mean is 1/0.05 = 20. On average 20 units must be inspected to find the first defect. P(X at most 20) = 1 - 0.95^20 = 0.6415, so about 64% of the time the first defect appears within 20 inspections.
P(X = 1) = 5.00% | Mean = 20 inspections
Try this example →

❓ Frequently Asked Questions

What is the geometric distribution and when is it used?+
The geometric distribution gives the probability that the first success in a sequence of independent Bernoulli trials occurs on the k-th trial. It is used whenever you need to model waiting times until a binary event first happens, such as the number of job applications until a first offer, the number of lottery tickets until a first win, or the number of coin flips until the first heads.
What is the formula for geometric distribution probability?+
The PMF is P(X = k) = (1-p)^(k-1) times p, where k = 1, 2, 3, ..., p is the success probability per trial, and q = 1-p is the failure probability. The formula counts k-1 failures followed by exactly one success. Unlike the binomial, there is no "choose" term because the success must be on the last trial.
How do I calculate P(X greater than k) for the geometric distribution?+
P(X greater than k) = (1-p)^k. This is the probability of k consecutive failures with no success yet. For example, with p = 0.4 and k = 3, P(X greater than 3) = 0.6^3 = 0.216, meaning about a 21.6% chance the first success does not occur within the first 3 trials.
What is the mean and standard deviation of the geometric distribution?+
The mean is mu = 1/p and the variance is sigma^2 = (1-p)/p^2. The standard deviation is sigma = sqrt((1-p))/p. For p = 0.2, mean = 5, variance = 20, and standard deviation = approximately 4.47. Notice the standard deviation exceeds the mean, meaning the geometric distribution has a heavy right tail.
What does memoryless mean for the geometric distribution?+
Memoryless means that past failures do not affect future probabilities. If you have already failed m times, the probability of needing n more trials until the first success is identical to starting fresh. Formally, P(X greater than m+n | X greater than m) = P(X greater than n) = (1-p)^n. The geometric is the only discrete distribution with this property.
How is the geometric distribution different from the binomial distribution?+
The binomial distribution counts the number of successes in a fixed number of trials n. The geometric distribution counts the number of trials until the first success, with no fixed upper limit. In binomial models n is given; in geometric models n is the random variable you are calculating.
Is there a zero-based version of the geometric distribution?+
Yes. Some textbooks and software packages define the geometric distribution as the number of failures before the first success (starting at 0), so the PMF becomes P(Y = k) = (1-p)^k times p for k = 0, 1, 2, .... This calculator uses the trial-number convention (X = 1, 2, 3, ...) which is more common in statistics courses. You can convert: Y = X - 1.
What is the CDF of the geometric distribution?+
The CDF is P(X at most k) = 1 - (1-p)^k. It gives the probability that the first success occurs by trial k. For p = 0.5 and k = 4, CDF = 1 - 0.5^4 = 1 - 0.0625 = 0.9375, meaning there is a 93.75% chance the first success occurs within 4 trials.
How many trials are needed to achieve 90% or 99% probability of at least one success?+
Solve P(X at most k) = 1 - (1-p)^k for k: k = ceil(log(1 - target) / log(1-p)). For p = 0.1 and 90% confidence, k = ceil(log(0.1) / log(0.9)) = ceil(21.85) = 22. For 99% confidence, k = ceil(log(0.01) / log(0.9)) = ceil(43.7) = 44. Use the Distribution Table mode and scan the CDF column.
Can the geometric distribution be approximated by an exponential distribution?+
Yes. For small p (such as p less than 0.1), the geometric distribution with success probability p is closely approximated by an exponential distribution with rate lambda = -ln(1-p), which is approximately equal to p for small p. The approximation improves as p approaches 0. This connection is why the geometric is called the discrete analogue of the exponential distribution.
What is the mode of the geometric distribution?+
The mode of the geometric distribution is always k = 1, regardless of p (as long as p is greater than 0). This is because P(X = k) = (1-p)^(k-1) times p is a strictly decreasing function of k: each additional trial multiplies the probability by (1-p) which is less than 1. The most likely outcome is always that the first trial is a success.