Geometric Distribution Calculator (Free, Step-by-Step)
StatisticsFreeNo sign-up
A geometric distribution calculator finds the chance that the first success comes on trial k: P(X = k) = (1 − p)k − 1 × p. With p = 0.2 and k = 3, two failures then a success give 0.8² × 0.2 = 0.128 (16/125). The mean wait is 1/p = 5 trials, and P(X ≤ 3) = 1 − 0.8³ = 0.488.
Exact value 16/125. Mean 5, variance 20, standard deviation 2√5 ≈ 4.4721.
The probability that the first success comes on trial 3 is P(X = 3) = 0.128 (16/125 exactly).
Distribution facts
Showing X = 1 to 25.
Show steps
- X counts the trials up to and including the first success, so X can be 1, 2, 3, … Each trial succeeds with p = 0.2 and fails with q = 1 − p = 0.8.
- The first success on trial 3 means 2 failures in a row and then a success, so P(X = k) = qᵏ⁻¹ × p.
- Substitute: P(X = 3) = 0.8² × 0.2, where 0.8² = 0.64. So P(X = 3) = 0.128.
- As an exact fraction: 16/125.
- Mean E(X) = 1/p = 1/0.2 = 5 trials. Variance = (1 − p)/p² = 20 (the same in both conventions), so σ = √variance = 2√5 ≈ 4.4721.
Check: P(X = k) shrinks by the factor q = 0.8 each step, so trial 1 (or 0 failures) is always the single most likely value.
Show distribution table
| k | P(X = k) | P(X ≤ k) | P(X > k) |
|---|---|---|---|
| 1 | 0.2 | 0.2 | 0.8 |
| 2 | 0.16 | 0.36 | 0.64 |
| 3 | 0.128 | 0.488 | 0.512 |
| 4 | 0.1024 | 0.5904 | 0.4096 |
| 5 | ≈ 0.0819 | ≈ 0.6723 | ≈ 0.3277 |
| 6 | ≈ 0.0655 | ≈ 0.7379 | ≈ 0.2621 |
| 7 | ≈ 0.0524 | ≈ 0.7903 | ≈ 0.2097 |
| 8 | ≈ 0.0419 | ≈ 0.8322 | ≈ 0.1678 |
| 9 | ≈ 0.0336 | ≈ 0.8658 | ≈ 0.1342 |
| 10 | ≈ 0.0268 | ≈ 0.8926 | ≈ 0.1074 |
How to use the geometric distribution calculator
- Enter the probability of success p as a decimal (0.2), a percent (20%) or a fraction (1/6).
- Choose what your variable counts: trials until the first success (X = 1, 2, 3, …) or failures before the first success (Y = 0, 1, 2, …). Use the one your textbook or teacher uses.
- Pick a tab: Exactly for P(X = k), Cumulative for at most, fewer than, at least or more than k, Between for P(a ≤ X ≤ b), or Memoryless for a conditional probability.
- Read the probability, its exact fraction, percent and complement, plus the mean, variance, standard deviation, median and mode. The chart highlights the values in your event, and Show steps writes out the working.
What the geometric distribution models
The geometric distribution describes how long you wait for the first success in a run of independent trials. It fits when four things are true:
- Each trial has two outcomes, success or failure.
- The probability of success p is the same on every trial.
- Trials are independent: one result does not change the next.
- You stop at the first success, so the number of trials is not fixed in advance.
Rolling a die until the first 6, shooting free throws until the first basket and calling customers until the first sale are all geometric situations. If the number of trials is fixed and you count successes, use the binomial distribution instead.
Two conventions: trials or failures
Textbooks define the geometric random variable in two ways. They describe the same experiment, shifted by one: Y = X − 1. The calculator handles both, and it always shows the same event written in the other convention, so you can match any answer key.
| Quantity | X = trials until first success | Y = failures before first success |
|---|---|---|
| Possible values | 1, 2, 3, … | 0, 1, 2, … |
| P(exactly k) | (1 − p)k − 1 p | (1 − p)k p |
| P(at most k) | 1 − (1 − p)k | 1 − (1 − p)k + 1 |
| P(more than k) | (1 − p)k | (1 − p)k + 1 |
| P(at least k) | (1 − p)k − 1 | (1 − p)k |
| Mean | 1/p | (1 − p)/p |
| Variance | (1 − p)/p² | (1 − p)/p² |
| Mode | 1 | 0 |
The variance is the same in both conventions because shifting every value by 1 does not change the spread.
Geometric distribution formulas explained
Write q = 1 − p for the chance of a failure. The first success on trial k needs k − 1 failures in a row followed by one success, so P(X = k) = qk − 1p. Each extra trial multiplies the probability by q, which is why the bars in the chart always shrink from left to right.
The cumulative formulas come from one idea: X > k means the first k trials all failed, which has probability qk. So P(X ≤ k) = 1 − qk, and a between probability is P(a ≤ X ≤ b) = qa − 1 − qb. No long sums are needed.
The mean 1/p matches intuition: if 1 in 5 attempts succeeds, you wait 5 attempts on average. The standard deviation √(1 − p)/p is large compared with the mean, so actual waits vary widely.
Worked examples
Example 1: the first 6 on the fourth roll
A fair die has p = 1/6. The first 6 on roll 4 means three non-sixes and then a six: P(X = 4) = (5/6)³ × 1/6 = 125/1296 ≈ 0.0965. The chance of a 6 within the first six rolls is P(X ≤ 6) = 1 − (5/6)⁶ = 31031/46656 ≈ 0.6651, not 1, even though the mean wait is 6 rolls.
Example 2: free throws
A player makes 25% of free throws, so p = 0.25. The mean number of shots until the first basket is 1/0.25 = 4, the variance is 0.75/0.0625 = 12, and the standard deviation is 2√3 ≈ 3.46 shots. The chance the first basket comes within 3 shots is 1 − 0.75³ = 0.578125.
Example 3: at least 20 failures
A process succeeds with p = 5% per attempt. Counting failures, P(Y ≥ 20) = 0.95²⁰ ≈ 0.3585: about a 36% chance that the first 20 attempts all fail.
The memoryless property
The geometric distribution forgets the past. If you have already failed s times, the chance of needing more than t further trials is the same as it was at the start:
P(X > s + t | X > s) = qs + t ÷ qs = qt = P(X > t).
Toss a fair coin. After four tails in a row, the chance that the next two tosses are also tails is still 0.5² = 0.25. A run of failures never makes a success “due”, which is the gambler’s fallacy. Among discrete distributions, only the geometric has this property. Try it in the Memoryless tab.
Geometric distribution on a TI-84 and in Excel
On a TI-84, press 2nd, VARS (DISTR) and choose geometpdf(p, k) for P(X = k) or geometcdf(p, k) for P(X ≤ k). Both use the trials convention: geometpdf(0.2, 3) = 0.128 and geometcdf(0.2, 3) = 0.488.
In Excel, type the formula directly, =(1-0.2)^(3-1)*0.2, or use NEGBINOM.DIST with the number of failures: =NEGBINOM.DIST(2, 1, 0.2, FALSE) returns 0.128 and =NEGBINOM.DIST(2, 1, 0.2, TRUE) returns 0.488.
Common mistakes with geometric probability
- Mixing up the conventions. With p = 0.2, P(X = 3) = 0.128 but P(Y = 3) = 0.1024. Check whether your class counts trials or failures.
- Using k instead of k − 1 as the exponent. The first success on trial 3 needs only 2 failures.
- Adding instead of using the complement. P(X ≤ k) = 1 − qk is faster and avoids rounding errors from many small terms.
- Confusing “at least” with “more than”. P(X ≥ 5) = q⁴ but P(X > 5) = q⁵.
- Rounding too early. Keep qk exact or to many places; the calculator shows exact fractions for this reason.
- Applying it when p changes. Drawing cards without replacement changes p each time, so the geometric model does not apply.
Checking homework with the calculator
Work the problem by hand first: write p, q and the event in symbols, choose the formula from the table above and estimate the answer. Then enter the same numbers here. If the answers differ, open Show steps and compare each line, and check the convention switch first. Finally, change p or k and solve a similar problem on your own to make sure the method sticks.
Geometric distribution practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
Two failures and then a success: 0.7² × 0.3 = 0.49 × 0.3 = 0.147. Using 0.7³ × 0.3 (0.1029) or forgetting the success factor (0.49) are common slips.
The mean is 1/p = 1/0.25 = 4 trials. 3 is the mean number of failures, (1 − p)/p, and 12 is the variance.
Variance = (1 − p)/p² = 0.75/0.0625 = 12. It is the same whether you count trials or failures.
P(X ≤ 2) = 1 − (5/6)² = 1 − 25/36 = 11/36. Simply doubling 1/6 gives 1/3, which double-counts rolling two sixes.
Y = 2 means two failures and then a success: 0.8² × 0.2 = 0.128. 0.1024 is P(Y = 3).
X > 5 means the first 5 trials all fail: 0.9⁵ = 0.59049. 0.6561 = 0.9⁴ is P(X ≥ 5).
By the memoryless property P(X > 8 | X > 6) = P(X > 2) = (1/2)² = 1/4. Past tails do not change the coin.
P(2 ≤ X ≤ 4) = q¹ − q⁴ = 1/2 − 1/16 = 7/16, which equals 1/4 + 1/8 + 1/16.
Without replacement, the chance of an ace changes after every draw, so p is not constant and the trials are not independent.
Each extra trial multiplies the probability by 1 − p, which is less than 1, so P(X = 1) = p is always the largest.
Quiz complete
Frequently asked questions
How do you calculate geometric distribution probability?
Use P(X = k) = (1 − p)k − 1 × p, where k is the trial of the first success. For p = 0.2 and k = 3: 0.8² × 0.2 = 0.64 × 0.2 = 0.128.
How do you calculate the mean of a geometric distribution?
The mean is 1/p trials (or (1 − p)/p failures), and the variance is (1 − p)/p². A free-throw shooter with p = 0.25 needs 4 shots on average, with variance 12.
What is the cumulative geometric distribution?
It is the probability that the first success comes on or before trial k: P(X ≤ k) = 1 − (1 − p)k. Its complement is P(X > k) = (1 − p)k. For p = 0.2 and k = 3, P(X ≤ 3) = 1 − 0.512 = 0.488.
What is the difference between geometric and binomial distributions?
A binomial distribution counts successes in a fixed number of trials. A geometric distribution counts trials (or failures) until the first success, so the number of trials is the random variable and has no upper limit.
Why are there two versions of the geometric distribution?
Some books count the trials up to and including the first success (starting at 1); others count the failures before it (starting at 0). The two differ by exactly 1, so P(X = k) = P(Y = k − 1). Statistics software often uses the failures version, while the TI-84 uses trials.
What is the median of a geometric distribution?
For the trials version, the median is the smallest k with 1 − (1 − p)k ≥ 0.5, which is ⌈ln 0.5 ÷ ln(1 − p)⌉. For p = 0.2 it is 4, below the mean of 5 because the distribution is skewed right.
Related calculators
- Binomial probability calculator
- Poisson distribution calculator
- Expected value calculator
- Probability calculator
- Standard deviation calculator
More statistics calculators
Related to This Article
More math articles
- How Political Ideology Shapes Public Policy: Goals and Limits
- How to Solve Word Problems of Dividing Big Numbers
- Current Ratio Calculator
- Alabama ACAP Algebra 1 Free Worksheets: 72 Printable PDFs with Step-by-Step Answer Keys
- What to Consider when Retaking the ACT or SAT?
- ParaPathways Practice Test: 10-Question Mini Set with Answers (2027 Prep)
- Full-Length AFOQT Math Practice Test
- Is Mental Math Still Important in the Age of AI?
- Blood Sugar Converter (mg/dL to mmol/L)
- Slavery and constitutional conflict


What people say about "Geometric Distribution Calculator: P(X = k), Mean & Chart"?
No one replied yet.