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.

Geometric distribution calculator
What does the variable count?
p can be a decimal (0.2), a percent (20%) or a fraction (1/6). Fractions and terminating decimals give exact fraction answers.
Try:
Geometric probability, p = 0.2 (trials convention)
P(X = 3) = 0.128

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).

Probability0.128
Exact value16/125
As a percent12.8%
Oddsabout 1 in 7.81
Complement 1 − P0.872
Same event counting failuresP(Y = 2)

Distribution facts

Mean E(X)5
Variance Var(X)20
Standard deviation σ2√5 ≈ 4.4721
Mode (most likely value)1
Median4
q = 1 − p0.8
Probability P(X = k) for p = 0.200.100.2024681012141618202224X = trial of the first success
In the eventOther valuesMean = 5

Showing X = 1 to 25.

Show steps
  1. 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.
  2. The first success on trial 3 means 2 failures in a row and then a success, so P(X = k) = qᵏ⁻¹ × p.
  3. Substitute: P(X = 3) = 0.8² × 0.2, where 0.8² = 0.64. So P(X = 3) = 0.128.
  4. As an exact fraction: 16/125.
  5. 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

Geometric Distribution Calculator (Free, Step-by-Step)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the geometric distribution calculator

  1. Enter the probability of success p as a decimal (0.2), a percent (20%) or a fraction (1/6).
  2. 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.
  3. 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.
  4. 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.

Question 1 of 10
1. A trial succeeds with p = 0.3. What is the probability that the first success comes on trial 3?

Found a mistake? Let us know!

2. For a geometric distribution with p = 0.25 (counting trials), what is the mean number of trials until the first success?

Found a mistake? Let us know!

3. With p = 0.25, what is the variance of the geometric distribution?

Found a mistake? Let us know!

4. A fair die is rolled until the first 6. What is P(X ≤ 2), the chance of a 6 within two rolls?

Found a mistake? Let us know!

5. Counting failures before the first success with p = 0.2, what is P(Y = 2)?

Found a mistake? Let us know!

6. With p = 0.1 (counting trials), what is P(X > 5)?

Found a mistake? Let us know!

7. A coin has landed tails 6 times in a row. What is the probability that the first head takes more than 2 further tosses?

Found a mistake? Let us know!

8. With p = 0.5 (counting trials), what is P(2 ≤ X ≤ 4)?

Found a mistake? Let us know!

9. Which situation is NOT modeled well by a geometric distribution?

Found a mistake? Let us know!

10. Which value is always the most likely in a geometric distribution that counts trials?

Found a mistake? Let us know!

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

More statistics calculators

Browse all 541 calculators

Related to This Article

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

No one replied yet.

Leave a Reply