Geometric Distribution Calculator

This geometric distribution calculator models the number of trials until the first success. It gives exact and cumulative probabilities, the expected wait and how many tries give a 95 % chance of at least one success.

Checks on your data

  • This version counts the trial on which the first success occurs (1, 2, 3, …). Some sources count the failures before the first success (0, 1, 2, …), which shifts every value by one.
  • Geometric trials are memoryless: a run of failures does not make success “due”.

Results

P(X = 4)
0.1024
10.24 %
P(first success on trial 4)
0.1024
P(success within 4 trials)
0.5904
P(no success in 4 trials)
0.4096
Expected number of trials 1/p
5
Standard deviation
4.47214
Variance (1 − p)/p²
20
Expected failures before first success
4
for the “number of failures” version
Median number of trials
4
Trials for a 95% chance of at least one success
14
Geometric distribution (p = 0.2): highlighted = P(X = 4)
00.050.10.150.21: 0.212: 0.1623: 0.12834: 0.102445: 0.0819256: 0.06553667: 0.052428878: 0.04194389: 0.0335544910: 0.02684351011: 0.02147481112: 0.01717991213: 0.01374391314: 0.01099511415: 0.008796091516: 0.007036871617: 0.00562951718: 0.00450361819: 0.003602881920: 0.00288232021: 0.002305842122: 0.001844672223: 0.0014757423
Chance the first success has happened by trial k
0%50%100%5101520k = 4Trial number k
Distribution values
kP(X = k)P(X ≤ k)P(X > k)
10.20.20.8
20.160.360.64
30.1280.4880.512
40.10240.59040.4096
50.081920.672320.32768
60.0655360.7378560.262144
70.05242880.79028480.2097152
80.041943040.83222780.1677722
90.033554430.86578230.1342177
100.026843550.89262580.1073742
110.021474840.91410070.08589935
120.017179870.93128050.06871948
130.01374390.94502440.05497558
140.010995120.95601950.04398047
150.0087960930.96481560.03518437
Show step-by-step solution
  1. The probability the first success happens on trial 4 is P(X = k) = (1 − p)^(k − 1) × p = 0.8^3 × 0.2 = 0.1024.
  2. Cumulative: P(X ≤ 4) = 1 − (1 − p)^4 = 1 − 0.4096 = 0.5904.
  3. Mean = 1 ÷ p = 5; variance = (1 − p) ÷ p² = 20.
ModelsTrials until first success
PMF(1−p)ᵏ⁻¹ p
Mean1/p
SpecialMemoryless

What Is Geometric Distribution?

The geometric distribution describes how many independent trials you need until the first success, when each trial has the same success probability p. The probability that the first success is on trial k is (1 − p)^(k − 1) × p.

The calculator returns that probability, the cumulative probability, the expected number of trials 1/p, the expected number of failures before the first success, the median, the standard deviation and the number of trials needed for a 95 % chance. The distribution is memoryless, so past failures do not change the chance on the next trial.

Below you will find the formulas, a variables table, a worked example and answers to common questions such as the two conventions for counting trials versus failures.

How to Use the Geometric Distribution Calculator

  1. Enter the probability of success on a single trial.
  2. Enter the trial number k you are interested in.
  3. Pick whether you want exactly k, up to k, before k, k or later, or more than k.
  4. Read the expected number of trials and the number needed for a 95% chance, then check the charts.

Geometric Distribution Formula

Probability first success on trial k

P(X=k)=(1−p)k−1 p,k=1,2,3,…P(X=k)=(1-p)^{k-1}\,p,\quad k=1,2,3,\dots

Cumulative probability

P(X≤k)=1−(1−p)kP(X\le k)=1-(1-p)^k

Mean and variance

E[X]=1p,Var(X)=1−pp2E[X]=\frac1p,\quad Var(X)=\frac{1-p}{p^2}

Memoryless property

P(X>m+n∣X>m)=P(X>n)P(X>m+n\mid X>m)=P(X>n)

Geometric Distribution Variables Explained

SymbolMeaningNotes
pSuccess probability per trial0 < p ≤ 1
kTrial number of the first success1, 2, 3, …
P(X = k)Probability of first success on trial k(1 − p)^(k − 1) p
E[X]Expected number of trials1 ÷ p

Geometric Distribution Worked Example

Using the example values (press “Load example” above to try them):

  1. The probability the first success happens on trial 4 is P(X = k) = (1 − p)^(k − 1) × p = 0.8^3 × 0.2 = 0.1024.
  2. Cumulative: P(X ≤ 4) = 1 − (1 − p)^4 = 1 − 0.4096 = 0.5904.
  3. Mean = 1 ÷ p = 5; variance = (1 − p) ÷ p² = 20.

Result: P(X = 4) = 0.1024; Expected number of trials 1/p = 5.

Two versions of the geometric distribution

Textbooks define it in two ways, and mixing them is the most common source of wrong answers. One counts the trial on which the first success happens (k = 1, 2, 3, …), the version used here. The other counts the number of failures before the first success (k = 0, 1, 2, …). They are the same distribution shifted by one.

The two conventions
Trials until first successFailures before first success
Support1, 2, 3, …0, 1, 2, …
P(X = k)(1 − p)^(k−1) p(1 − p)^k p
Mean1/p(1 − p)/p
Variance(1 − p)/p²(1 − p)/p²

The memoryless property

The geometric distribution has no memory. If you have already failed ten times, the chance of success on the next trial is still p, and the expected additional wait is still 1/p. A run of bad luck does not make success “due”. It is the discrete analogue of the exponential distribution and the only discrete distribution with this property.

Worked example

A salesperson closes 20% of calls. The probability that the first sale occurs on the 4th call is 0.8³ × 0.2 = 0.1024. The expected number of calls until the first sale is 1 ÷ 0.2 = 5, with a standard deviation of about 4.5. To be 95% sure of at least one sale you need 14 calls, because 1 − 0.8¹⁴ ≈ 0.956.

Conditions

  • Trials are independent.
  • Each trial has only two outcomes, success or failure.
  • The probability p is constant from trial to trial.
  • You stop at the first success.

Where Geometric Distribution Is Used

Waiting for a first success

Modelling how many attempts it takes until something works.

Planning attempts

Finding how many tries give a chosen chance of at least one success.

Quality and reliability

Modelling the number of items inspected until the first defect.

Probability coursework

Checking PMF, CDF and mean answers.

Common Geometric Distribution Mistakes to Avoid

  • Check whether your source counts trials or failures.
  • The mode is always 1 for the trials version.
  • The standard deviation is nearly as large as the mean when p is small.

Geometric Distribution Terms and Definitions

Memoryless
Past failures do not change the chance of future success.
Geometric series
The sum that gives the cumulative formula 1 − (1 − p)ᵏ.

Geometric Distribution FAQs

What is the geometric distribution?

The distribution of the number of independent trials needed to get the first success when each trial succeeds with the same probability p.

What is the mean of a geometric distribution?

1/p for the trials version. If p = 0.2, you expect 5 trials.

What is the difference between geometric and binomial?

Binomial counts successes in a fixed number of trials. Geometric counts trials until the first success.

What does memoryless mean?

Having already failed several times does not change the probability of success on the next trial.

How do I find the probability that it takes more than k trials?

P(X > k) = (1 − p)^k, the chance that the first k trials all fail.

How many trials do I need for 95% confidence?

The smallest n with 1 − (1 − p)ⁿ ≥ 0.95, shown in the results.

Related calculators

Last updated 2026-11-09. See our disclaimer.