Geometric Distribution Calculator (geometpdf & geometcdf)

This free geometric distribution calculator finds the probability that the first success comes on trial x, by trial x, after trial x or between two trials, when every trial succeeds with the same probability p. It shows the step-by-step working with your numbers, a bar chart with the outcomes you asked for highlighted, the mean, variance, standard deviation and median, a full geometpdf / geometcdf table and the exact TI-84 keystrokes. It also answers “how many tries do I need to be 95% sure?”, solves for p, and handles both textbook definitions: X = the trial of the first success, or Y = the failures before it.

Contents

How to Use the Geometric Distribution Calculator

  1. Pick what X counts. Keep X = trial of the first success (1, 2, 3, …) if your question says “on the 3rd try” or “the 5th person asked”. This is what the TI-84 uses. Choose Y = failures before the first success (0, 1, 2, …) if your book counts misses.
  2. Enter p, the probability of success on each trial. A decimal (0.2), a fraction (1/6) or a percent (20%) all work.
  3. Pick the probability you need: P(X = x), P(X ≤ x), P(X < x), P(X ≥ x), P(X > x) or P(a ≤ X ≤ b), and type x (and b).
  4. Read the answer in the purple box. The table under it lists all five probabilities for the same x with the matching TI-84 command, so you can answer a whole homework question at once.
  5. Open the extras: step-by-step working, TI-84 keystrokes for your numbers and the full probability table. The Trials needed / solve for p tab finds the number of tries for a target probability, or the p that makes a success likely within n tries.

Results update as you type. Copy share link saves your inputs in the URL. For a fixed number of trials use the binomial distribution calculator instead.

What Is the Geometric Distribution?

The geometric distribution describes how long you wait for the first success in a run of independent yes/no trials. Flip a coin until you see heads, roll a die until you get a 6, ask people one by one until someone says yes: the number of trials it takes is a geometric random variable.

Four conditions make a setting geometric (AP Statistics students remember them as BITS):

  • Binary: each trial is a success or a failure.
  • Independent: one trial does not change the next.
  • Trials until success: you keep going until the first success, so there is no fixed number of trials.
  • Same p: the probability of success is the same on every trial.

We write X ~ Geom(p). The only parameter is p. Small p means long waits and a long right tail; large p means the first success usually comes almost at once.

Geometric Distribution Formula

P(X = k) = (1 − p)k−1 · p for k = 1, 2, 3, …

P(X ≤ k) = 1 − (1 − p)k P(X > k) = (1 − p)k

Mean μ = 1 / p Variance σ² = (1 − p) / p² σ = √(1 − p) / p

The first formula says “k − 1 failures in a row, then a success”. The cumulative formula comes from the complement: the first success has arrived by trial k unless the first k trials all failed, which has probability (1 − p)k. There is no long sum to add up. The mode is always 1 (the first trial is the single most likely place for the first success), and the median is the smallest k with 1 − (1 − p)k ≥ 0.5.

Worked Example: p = 0.2, First Success on Trial 3

The calculator opens with this question: 20% of cereal boxes contain a prize. You open boxes one at a time. What is the probability that the first prize is in the 3rd box? Each box is a trial, a prize is a success, p = 0.2 and q = 1 − p = 0.8.

  1. Exactly 3: P(X = 3) = 0.82 × 0.2 = 0.64 × 0.2 = 0.128. Two empty boxes, then a prize.
  2. At most 3: P(X ≤ 3) = 1 − 0.83 = 1 − 0.512 = 0.488. A prize somewhere in the first three boxes.
  3. More than 3: P(X > 3) = 0.83 = 0.512. The first three boxes are all empty.
  4. Mean: 1 / 0.2 = 5 boxes on average. Variance (1 − 0.2) / 0.2² = 20, so σ = √20 ≈ 4.4721. The median is 4 boxes, below the mean because of the long right tail.
QuestionProbabilityTI-84 command
P(X = 3), exactly0.128geometpdf(0.2,3)
P(X ≤ 3), at most0.488geometcdf(0.2,3)
P(X < 3), fewer than0.36geometcdf(0.2,2)
P(X ≥ 3), at least0.641−geometcdf(0.2,2)
P(X > 3), more than0.5121−geometcdf(0.2,3)

Trials or Failures? The Two Definitions

Textbooks define the geometric distribution in two ways, and mixing them up is the most common way to get a geometric question wrong.

X = trial of the first successY = failures before the first success
Values1, 2, 3, …0, 1, 2, …
P(= k)(1 − p)k−1 · p(1 − p)k · p
P(≤ k)1 − (1 − p)k1 − (1 − p)k+1
Mean1 / p(1 − p) / p
Variance(1 − p) / p²(1 − p) / p² (the same)
Used byTI-84 geometpdf / geometcdf, AP Statistics, most intro coursesMany probability texts, SciPy with loc = −1, R’s dgeom

The two are the same model shifted by one: Y = X − 1. “Two empty boxes before the first prize” (Y = 2) is the same event as “the first prize in box 3” (X = 3), and both have probability 0.128. The TI-84 always works in trials, so if your question counts failures, add 1 before you type it in. The calculator does this for you when you choose the Y = failures option and writes the shifted command in the keystroke steps.

At Least, More Than and Between

geometcdf only gives “at most” (P(X ≤ x)). Turn every other wording into that, or into the tail (1 − p)k:

  • Fewer than x = at most x − 1: geometcdf(p, x−1).
  • At least x = the first x − 1 trials all fail: (1 − p)x−1, or 1−geometcdf(p, x−1).
  • More than x = the first x trials all fail: (1 − p)x, or 1−geometcdf(p, x).
  • Between a and b (inclusive): geometcdf(p, b)−geometcdf(p, a−1). For p = 0.2, P(2 ≤ X ≤ 5) = 0.8 − 0.85 = 0.8 − 0.32768 = 0.47232.

Press Example in the calculator for a dice question: with p = 1/6, the chance you need at least 5 rolls to see the first 6 is (5/6)4 ≈ 0.4823, almost a coin flip, even though the average wait is 6 rolls.

How Many Trials Until You Are 95% Sure?

“How many boxes must I be ready to open to be 95% sure of getting a prize?” Solve 1 − (1 − p)n ≥ 0.95:

n ≥ ln(1 − c) / ln(1 − p), then round up

For p = 0.2 and c = 0.95: ln(0.05) / ln(0.8) = 13.43, so n = 14. Check: P(X ≤ 14) = 1 − 0.814 = 0.9560, while 13 boxes give only 0.9450. Rounding down is a classic slip, because 13 boxes do not reach 95%.

The same formula answers the reverse question. If you want a 95% chance of at least one success within 10 tries, each try needs p = 1 − 0.051/10 ≈ 0.2589. Both are on the Trials needed / solve for p tab, with the TI-84 check.

The Memoryless Property

The geometric distribution is memoryless: P(X > s + t | X > s) = P(X > t). If you have already opened 5 empty boxes, the chance that the next 5 are also empty is still 0.85 = 0.32768, exactly as it was before you started. Past failures do not make a success “due”, which is the gambler’s fallacy in one line. The geometric is the only discrete distribution with this property; its continuous cousin is the exponential distribution.

How to Use geometpdf and geometcdf on a TI-84

geometpdf: exactly x

  1. Press 2nd VARS to open DISTR.
  2. Scroll to E:geometpdf( and press ENTER (TI-83 Plus: D:geometpdf().
  3. On a TI-84 Plus CE (and a TI-84 Plus with a recent OS) a wizard opens: p: 0.2, x value: 3, then Paste and ENTER twice. On older models type geometpdf(0.2,3) with a comma.
  4. The screen shows 0.128.

geometcdf: at most x

Same steps with F:geometcdf( (TI-83 Plus: E:geometcdf(). geometcdf(0.2,3) = 0.488. For “at least” or “more than”, type 1 − first and use x − 1 or x as in the list above. Unlike normalcdf, geometcdf has no lower bound: it always adds up from trial 1.

A whole table at once

Put a list in the x slot: geometpdf(0.2,{1,2,3,4,5}) returns all five probabilities. To fill a list, open STAT 1, type seq(X,X,1,15) into the L1 header and geometcdf(0.2,L1) into L2. That is also the quickest way to find “trials needed” on the calculator: scroll L2 to the first value at or above 0.95. Try every keystroke on our TI-84 Plus CE calculator online.

Geometric vs Binomial vs Poisson

  • Use the geometric distribution (this page) when you repeat a yes/no trial until the first success and ask when it happens.
  • Use the binomial distribution calculator when the number of trials n is fixed and you count how many successes: “of 10 boxes, how many have a prize?” The link between them: P(geometric X > n) = P(binomial count = 0 in n trials) = (1 − p)n.
  • Use the Poisson distribution calculator for counts of events in a stretch of time or space, with no separate trials, such as calls per hour.
  • Use the normal distribution calculator for continuous measurements. Unlike the binomial and Poisson, the geometric is always skewed right, so a normal approximation is never a good shortcut here.
  • To count the ways an outcome can happen, use the permutation and combination calculator.

Browse every tool on the math and statistics calculators hub.

Common Mistakes

  • Mixing the two definitions. If the question counts failures (“3 misses before the first make”), the TI-84’s x is 4, not 3.
  • Using geometcdf for “at least”. geometcdf is “at most”. At least x is 1 − geometcdf(p, x − 1).
  • Using x instead of x − 1 for “fewer than” and “at least”.
  • Using the geometric with a fixed number of trials. “In 10 boxes, what is the chance of exactly 2 prizes?” is binomial.
  • Typing p as a percent. On the TI-84, p must be a decimal: 0.2, not 20.
  • Rounding “trials needed” down. Always round n up, then check with geometcdf.
  • Expecting a success to be “due”. The geometric is memoryless; the chance of success on the next trial is always p.

Why This Geometric Calculator Is Different

  • All six probability types (exactly, at most, fewer than, at least, more than, between), with all five single-x answers and their TI-84 commands in one table.
  • Both definitions, trials or failures, with the shift to the TI-84’s trial number written out for you.
  • Trials needed and solve for p, with the rounding check most answer keys skip.
  • Exact TI-84 keystrokes for your own numbers, including the DISTR menu letters for the TI-84 Plus, TI-84 Plus CE and TI-83 Plus.
  • A bar chart and a full table with your outcomes highlighted, plus the mean, variance, standard deviation and median.
  • Checked against SciPy and 50-digit mpmath on hundreds of cases, from p = 0.000000001 to p = 1. It accepts fractions and percents, works in dark mode, makes share links and fits a phone screen.

Geometric Distribution Calculator FAQ

Use P(X = k) = (1 − p)^(k−1) · p: k − 1 failures followed by a success. For p = 0.2 and k = 3 that is 0.8² × 0.2 = 0.128. For “at most k” use 1 − (1 − p)^k, and for “more than k” use (1 − p)^k.

geometpdf(p, x) gives the probability that the first success is exactly on trial x. geometcdf(p, x) gives the probability that it comes on or before trial x, so it is “at most x”. For p = 0.2 and x = 3 they give 0.128 and 0.488.

Use the complement: P(X ≥ x) = 1 − geometcdf(p, x − 1). For example, the chance of needing at least 5 rolls to get a 6 is 1 − geometcdf(1/6, 4) = (5/6)^4 ≈ 0.4823.

The mean (expected value) is 1/p trials until the first success, so with p = 0.2 you expect 5 trials. If you count failures before the first success instead, the mean is (1 − p)/p = 4. The variance is (1 − p)/p² in both cases.

Trials. geometpdf and geometcdf use X = the trial number of the first success, starting at 1. If your problem counts failures before the first success, add 1 to the number before you enter it.

Solve 1 − (1 − p)^n ≥ 0.95, which gives n ≥ ln(0.05)/ln(1 − p), and round up. For p = 0.2 that is 13.43, so 14 trials. Use the Trials needed tab for your own p and target.

Use the geometric when you repeat a trial until the first success and ask when it happens. Use the binomial when the number of trials is fixed in advance and you count the successes.

Past failures do not change the future: given that the first s trials failed, the chance of waiting more than t further trials is still (1 − p)^t. A success is never “due”.

TI 84 Calc PRO is not affiliated with or endorsed by Texas Instruments. TI-84 Plus CE is a trademark of Texas Instruments.

About this page

Written and maintained by TI 84 Calc PRO Editorial TeamLast updated