Skip to content
Statculator
Probability Distributions

Geometric Distribution Calculator

Free geometric distribution calculator: P(X = k), at most, at least or between for the first success, with the formula, mean, standard deviation and steps.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try

Textbooks use both. The trial version is X = failures + 1.

Fractions such as 1/6 work.

Results

P(X = 4)
0.1024
Probability that the trial of the first success is exactly 4
P(X ≠ 4), the complement
0.8976
Mean, μ = 1 / p
5
Variance, σ² = (1 − p) / p²
20
Standard deviation, σ
4.4721
Median
4
P(X = 4)
0.1024
P(X < 4)
0.488
P(X ≤ 4)
0.5904
P(X > 4)
0.4096
P(X ≥ 4)
0.512

Interpretation: With p = 0.2, the probability that the trial of the first success is exactly 4 is 0.1024. On average it takes 5 trials to get the first success.

Probability mass function for x from 1 to 420.000.050.100.150.20P(X = k)P(X = 1) = 0.21P(X = 2) = 0.16P(X = 3) = 0.128P(X = 4) = 0.10244P(X = 5) = 0.08192P(X = 6) = 0.065536P(X = 7) = 0.0524297P(X = 8) = 0.041943P(X = 9) = 0.033554P(X = 10) = 0.02684410P(X = 11) = 0.021475P(X = 12) = 0.01718P(X = 13) = 0.01374413P(X = 14) = 0.010995P(X = 15) = 0.008796P(X = 16) = 0.00703716P(X = 17) = 0.005629P(X = 18) = 0.004504P(X = 19) = 0.00360319P(X = 20) = 0.002882P(X = 21) = 0.002306P(X = 22) = 0.00184522P(X = 23) = 0.001476P(X = 24) = 0.001181P(X = 25) = 0.00094425P(X = 26) = 0.000756P(X = 27) = 0.000604P(X = 28) = 0.00048428P(X = 29) = 0.000387P(X = 30) = 0.000309P(X = 31) = 0.00024831P(X = 32) = 0.000198P(X = 33) = 0.000158P(X = 34) = 0.00012734P(X = 35) = 0.000101P(X = 36) = 0.000081P(X = 37) = 0.00006537P(X = 38) = 0.000052P(X = 39) = 0.000042P(X = 40) = 0.00003340P(X = 41) = 0.000027P(X = 42) = 0.000021Trial of the first success, k
Highlighted bars: the outcomes counted in P(X = 4). Outcomes outside the plotted range are too unlikely to see.

Probability distribution table

kP(X = k)P(X ≤ k)P(X ≥ k)
10.20.21
20.160.360.8
30.1280.4880.64
40.10240.59040.512
50.08190.67230.4096
60.06550.73790.3277
70.05240.79030.2621
80.04190.83220.2097
90.03360.86580.1678
100.02680.89260.1342
110.02150.91410.1074
120.01720.93130.0859
130.01370.9450.0687
140.0110.9560.055
150.00880.96480.044
160.0070.97190.0352
170.00560.97750.0281
180.00450.9820.0225
190.00360.98560.018
200.00290.98850.0144
210.00230.99080.0115
220.00180.99260.0092
230.00150.99410.0074
240.00120.99530.0059
250.00090.99620.0047
260.00080.9970.0038
270.00060.99760.003
280.00050.99810.0024
290.00040.99850.0019
300.00030.99880.0015
310.00020.9990.0012
320.00020.99920.001
330.00020.99940.0008
340.00010.99950.0006
350.00010.99960.0005
360.00010.99970.0004
370.00010.99970.0003
380.00010.99980.0003
394.1538 × 10⁻⁵0.99980.0002
403.3231 × 10⁻⁵0.99990.0002
412.6585 × 10⁻⁵0.99990.0001
422.1268 × 10⁻⁵0.99990.0001

Showing k = 1 to 42. All other values of k have a combined probability of 8.51 × 10⁻⁵.

Step-by-step solution

  1. 1

    Identify the geometric distribution

    Independent trials with the same success probability p, repeated until the first success.

    X ~ Geometric(p = 0.2), X = 1, 2, 3, … (trial of the first success)
  2. 2

    Write the probability that X = k

    X = 4 means 3 failures in a row followed by a success.

    P(X = k) = (1 − p)ᵏ⁻¹ · p
    P(X = 4) = 0.8³ × 0.2 = 0.512 × 0.2 = 0.1024
  3. 3

    Use the closed-form tail probability

    X > 4 happens exactly when the first 4 trials all fail.

    P(X > x) = (1 − p)ˣ, P(X ≤ x) = 1 − (1 − p)ˣ
    P(X > 4) = 0.8⁴ = 0.4096
    P(X ≤ 4) = 1 − 0.4096 = 0.5904
  4. 4

    Mean and standard deviation

    μ = 1 / p = 1 / 0.2 = 5
    σ = √(1 − p) / p = √0.8 / 0.2 = 4.4721

What is a Geometric Distribution Calculator?

A geometric distribution calculator finds the probability that the first success in repeated independent trials happens on a given trial, by it or after it. With success probability p on each trial and X as the trial of the first success, P(X = k) = (1 − p)ᵏ⁻¹·p and P(X ≤ k) = 1 − (1 − p)ᵏ. The mean is 1/p and the standard deviation is √(1 − p)/p. For a fair die, the chance the first six comes on roll 3 is 0.1157.

What the Geometric Distribution Calculator does

The geometric distribution answers “how many tries until it works?”: rolls until the first six, sales calls until the first sale, attempts until a login succeeds. This calculator handles both textbook conventions (the trial number of the first success, starting at 1, or the number of failures before it, starting at 0), so you can match your course, your textbook or your software.

Pick a probability type and the calculator returns the exact value, its complement, the mean, median, variance and standard deviation, a chart with your outcomes highlighted and, when the likely values number 100 or fewer, a probability table. The steps show the geometric probability formula with your numbers and the closed-form tail P(X > x), so cumulative answers are easy to check by hand.

It works as a geometric probability calculator, a geometric pdf calculator for single values (the same result as geometpdf on a TI-84) and a geometric cdf calculator for “at most” questions (the same as geometcdf). Everything runs in your browser.

How to use the Geometric Distribution Calculator

  1. Choose what X counts: the trial on which the first success occurs, or the failures before it.
  2. Enter the Probability of success on each trial, p, as a decimal, fraction (1/6) or percentage (20%).
  3. Choose the Probability to find (exactly, at most, fewer than, at least, more than or between) and enter Value of X, k or a range a to b.
  4. Read the probability, the mean waiting time and the chart; open the step-by-step solution for the formula with your numbers.

When does the geometric distribution apply?

A trial is one attempt with two possible results, called success and failure. “Success” is just the outcome you are waiting for: a six, a sale, a defective item. Use the geometric distribution when all four conditions hold:

  • Two outcomes: each trial is a success or a failure.
  • Independent trials: one result does not change the chance of the next.
  • Constant p: the probability of success is the same on every trial.
  • Count until the first success: the number of trials is not fixed in advance; you stop at the first success.

Geometric distribution formula

The first success lands on trial k only if the first k − 1 trials fail and trial k succeeds. Independence lets you multiply those chances, which gives the geometric probability formula. Adding the terms (or noticing that X > k means k failures in a row) gives the cumulative formula, and the mean, variance and standard deviation follow from the series sums.

Probability mass function (X = trial of the first success, X = 1, 2, …)
P(X = k) = (1 − p)ᵏ⁻¹ · p
Cumulative distribution function
P(X ≤ k) = 1 − (1 − p)ᵏ, P(X > k) = (1 − p)ᵏ
Failures before the first success (Y = 0, 1, 2, …)
P(Y = k) = (1 − p)ᵏ · p, P(Y ≤ k) = 1 − (1 − p)ᵏ⁺¹
Mean (expected value)
μ = 1 / p (trials), μ = (1 − p) / p (failures)
Variance (both conventions)
σ² = (1 − p) / p²
Standard deviation (both conventions)
σ = √(1 − p) / p
Formula symbols
SymbolMeaning
pprobability of success on each trial (0 < p < 1)
1 − pprobability of failure on each trial, sometimes written q
kthe value of X: a trial number, or a number of failures
X, Ytrial of the first success; failures before it (Y = X − 1)

The two conventions differ by exactly 1: trial number = failures + 1. They share the same variance and standard deviation, but their means differ by 1. TI calculators’ geometpdf and geometcdf use the trial convention.

Worked example: exact and cumulative geometric probability

Basketball shots: first make on the 4th attempt

Problem. A basketball player makes 20% of her long-range shots. What is the probability that her first make is on her 4th attempt, and that she needs more than 4 attempts?

  1. 01X = attempt of the first make, X ~ Geometric(p = 0.2) with X = 1, 2, ….
  2. 02Exact: first make on attempt 4 means 3 misses then a make: P(X = 4) = 0.8³ × 0.2 = 0.512 × 0.2 = 0.1024.
  3. 03Cumulative: more than 4 attempts means the first 4 all miss: P(X > 4) = 0.8⁴ = 0.4096.
  4. 04So P(X ≤ 4) = 1 − 0.4096 = 0.5904.
  5. 05Mean number of attempts = 1 / 0.2 = 5; σ = √0.8 / 0.2 = 4.4721.

Answer. The first make lands on the 4th shot with probability 0.1024, and 40.96% of the time she needs 5 or more shots. On average she needs 5 attempts.

Example: the first six on a die

Roll a fair die until a six appears, so p = 1/6 and 1 − p = 5/6. Load the First 6 on the 3rd roll example above (or enter p as 1/6) to reproduce each row.

First six on a fair die, X = roll of the first six
QuestionFormulaProbability
First six on roll 3, P(X = 3)(5/6)² × 1/6 = 25/2160.1157
A six within 3 rolls, P(X ≤ 3)1 − (5/6)³ = 91/2160.4213
No six in the first 3 rolls, P(X > 3)(5/6)³ = 125/2160.5787
Expected number of rolls, μ1 / (1/6)6
Standard deviation, σ√(5/6) / (1/6)5.4772

How to find the standard deviation of a geometric distribution

The standard deviation formula for the geometric distribution is σ = √(1 − p) / p. It is the same whether X counts trials or failures, because shifting every value by 1 does not change the spread. For p = 0.25:

  1. Find the failure probability: 1 − p = 1 − 0.25 = 0.75.
  2. Variance: σ² = (1 − p) / p² = 0.75 / 0.0625 = 12.
  3. Standard deviation: σ = √12 = √0.75 / 0.25 = 3.4641.
  4. Compare with the mean: μ = 1 / 0.25 = 4 trials (or 3 failures). The SD is almost as large as the mean, which is typical: the geometric distribution is strongly right-skewed.

Geometric vs binomial distribution

Both models use independent trials with a constant success probability p. The difference is what is fixed and what is counted. If you know the number of trials and want the number of successes, use the Binomial Distribution Calculator. If you keep going until the first success, use the geometric. For the wait until the r-th success, use the Negative Binomial Distribution Calculator; the geometric is its r = 1 case.

GeometricBinomial
Fixed in advancethe target: 1 successthe number of trials, n
Random variable Xtrials until the first successsuccesses in n trials
Possible values1, 2, 3, … (no upper limit)0, 1, …, n
P(X = k)(1 − p)ᵏ⁻¹ · pC(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ
Mean1 / pn · p
Variance(1 − p) / p²n · p · (1 − p)
TI-84 functionsgeometpdf, geometcdfbinompdf, binomcdf

Geometric probabilities on a TI-84, in Excel, R and Python

Software differs on the convention, so check whether it counts trials or failures before comparing answers with this page.

  • TI-83 / TI-84: 2nd → DISTR → geometpdf(p, k) for P(X = k) and geometcdf(p, k) for P(X ≤ k). Both count trials (X = 1, 2, …).
  • Excel / Google Sheets: there is no GEOM function; use =NEGBINOM.DIST(k − 1, 1, p, FALSE) for P(X = k) and TRUE for P(X ≤ k), with X counting trials.
  • R: dgeom(k, p) and pgeom(k, p) count failures (Y = 0, 1, …). For the trial convention use dgeom(k − 1, p).
  • Python (SciPy): scipy.stats.geom.pmf(k, p) and geom.cdf(k, p) count trials (X = 1, 2, …).

The geometric distribution has no memory

If the first m trials have failed, the number of further trials needed has the same geometric distribution as at the start: P(X > m + n | X > m) = P(X > n). Five misses in a row do not make the next shot more likely to go in; believing otherwise is the gambler’s fallacy. The geometric is the only discrete distribution with this property, and the exponential distribution is its continuous counterpart.

Common use cases

  • Games of chance: the number of rolls or draws (with replacement) until a particular result appears.
  • Sales and marketing: calls, emails or ad impressions until the first conversion. With a 10% close rate, P(first sale within 10 calls) = 1 − 0.9¹⁰ = 0.6513.
  • Reliability: the number of cycles or uses until the first failure when each use carries the same small risk.
  • Computing: retries until a network request succeeds, or attempts in randomized algorithms.
  • Quality inspection: items inspected until the first defective one.

Assumptions and limitations

  • Trials must be independent with a constant p. If the chance changes with each attempt (learning, fatigue, or items drawn without replacement), the geometric model does not apply.
  • It covers the wait for the first success only. For the wait until the r-th success, use the Negative Binomial Distribution Calculator.
  • For the number of successes in a fixed number of trials, use the Binomial Distribution Calculator.
  • Check which convention your textbook or software uses; mixing them shifts every answer by one trial.

Frequently asked questions

What is the geometric distribution used for?

It models the number of independent trials needed to get the first success when every trial has the same success probability p. Examples include rolls until the first six, calls until the first sale and attempts until a component first fails.

What is the geometric distribution formula?

With X as the trial of the first success, P(X = k) = (1 − p)ᵏ⁻¹ · p and P(X ≤ k) = 1 − (1 − p)ᵏ. With X as the number of failures before the first success, P(X = k) = (1 − p)ᵏ · p and P(X ≤ k) = 1 − (1 − p)ᵏ⁺¹.

How do you find the standard deviation of a geometric distribution?

Use σ = √(1 − p) / p, the square root of the variance (1 − p) / p². For p = 0.25, σ = √0.75 / 0.25 = 3.4641. The formula is the same for the trial and the failure convention.

What is the expected value of a geometric distribution?

The expected number of trials until the first success is 1/p. With p = 0.2 you expect 5 trials. If you count failures before the first success instead, the expected value is (1 − p)/p, which is 4 for p = 0.2.

What is the difference between geometpdf and geometcdf?

On a TI-84, geometpdf(p, k) gives the probability that the first success is on exactly trial k, P(X = k). geometcdf(p, k) gives the probability that it happens on or before trial k, P(X ≤ k) = 1 − (1 − p)ᵏ. Choose “exactly k” or “at most k” here to get the same values.

Why are there two versions of the geometric distribution?

Some books count the trial on which the first success occurs (X = 1, 2, 3, …); others count the failures before it (Y = 0, 1, 2, …). They describe the same experiment with Y = X − 1. Probability statements must be shifted by one when switching between them.

Is the geometric distribution memoryless?

Yes. Given that the first m trials have all failed, the probability of needing more than n further trials is the same as it was at the start: P(X > m + n | X > m) = (1 − p)ⁿ = P(X > n). Past failures do not make success more likely.

Cite this page

Statculator. (2026, November 14). Geometric Distribution Calculator. Retrieved November 14, 2026, from https://statculator.com/probability-distributions/geometric-distribution-calculator/