BYTETOOLS

Geometric Distribution Calculator

Work out geometric probabilities using either convention: trials until the first success or failures before it. Includes CDF, mean, variance and a bar chart.

0.128
P(X = 3)
0.36
P(X < 3)
0.488
P(X ≤ 3)
0.512
P(X > 3)
0.64
P(X ≥ 3)

Distribution summary

5
Mean
20
Variance
4.472136
Std deviation
4
Median

P(X = k) = (1 − p)^(k−1) · p

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

Mean = 1 / p, Variance = (1 − p) / p²

Probability mass (k = 3 highlighted)

1: 0.22: 0.163: 0.1284: 0.10245: 0.081926: 0.0655367: 0.05242888: 0.041943049: 0.03355443210: 0.026843545611: 0.0214748364812: 0.0171798691813: 0.0137438953514: 0.0109951162815: 0.00879609302216: 0.00703687441817: 0.00562949953418: 0.0045035996271357911131517

Memorylessness

The geometric distribution is the only discrete distribution with no memory: P(X > s + t | X > s) = P(X > t). After 3 unsuccessful attempts the chance of needing another 3 is still 51.2000% — the coin does not remember the run of tails.

Probability table

kP(X = k)P(X ≤ k)
10.20.2
20.160.36
30.1280.488
40.10240.5904
50.081920.67232
60.0655360.737856
70.05242880.7902848
80.041943040.83222784
90.033554430.86578227
100.026843550.89262582
110.021474840.91410065
120.017179870.93128052
130.01374390.94502442
140.010995120.95601953
150.008796090.96481563
160.007036870.9718525
170.00562950.977482
180.00450360.9819856

What is the Geometric Distribution Calculator?

The ByteTools Geometric Distribution Calculator answers the question "how many attempts until it finally works?

  • Both conventions supported, with the active formulas shown on screen
  • Accepts p as a decimal, a percentage or a fraction
  • Exact PMF, CDF and both upper tails
  • Mean, variance, standard deviation and median
  • Bar chart with your k highlighted plus a probability table
  • The memoryless property explained with your own numbers

How to use the Geometric Distribution Calculator

  1. 1

    Enter the success probability p as a decimal, a percentage or a fraction.

  2. 2

    Choose your convention: trials until the first success, or failures before it.

  3. 3

    Enter the value of k you want the probability for.

  4. 4

    Read P(X = k) and the four cumulative probabilities across the top.

  5. 5

    Check the mean, variance and median, and use the bar chart and table for the full shape.

About the Geometric Distribution Calculator

The ByteTools Geometric Distribution Calculator answers the question "how many attempts until it finally works?". Enter the success probability and a value of k, and it returns the exact probability plus every cumulative tail. Textbooks disagree about what k counts, so both conventions are on the page and switching between them updates the formulas, the mean and the chart together.

The trials convention has k counting the trial on which the first success happens, so k starts at 1 and the mean is 1/p. The failures convention has k counting the failures before that success, so k starts at 0 and the mean is (1−p)/p. The variance is (1−p)/p² either way, and the tool prints whichever formula is currently in use so there is no ambiguity about which one produced your answer.

It is useful for quality control sampling, gaming drop rates, sales conversion, penetration testing and any repeated independent trial where you care about how long the wait might be. All the arithmetic happens locally in your browser, nothing is uploaded to a server, and the page keeps working offline.

Frequently asked questions

What is the geometric distribution used for?

It models the number of independent attempts needed before the first success, when each attempt has the same success probability. Typical uses are the number of items inspected before finding a defect, calls made before a sale, or attempts before a rare item drops in a game.

Which geometric distribution convention should I use?

Use trials until the first success if your k counts the successful attempt itself, giving a mean of 1/p. Use failures before the first success if k counts only the failures, giving a mean of (1−p)/p. Check which one your course or textbook uses — the probabilities differ by one shift in k.

What does memoryless mean for the geometric distribution?

It means past failures do not change what happens next: after ten failures, the probability of needing another ten more is exactly the same as it was at the start. The geometric distribution is the only discrete distribution with this property, and it is why gambler's fallacy reasoning fails.

How do I calculate the mean of a geometric distribution?

With the trials convention it is 1 divided by p, so a 20% success rate means an average of 5 attempts. With the failures convention it is (1−p)/p, which is one less, because you are no longer counting the successful attempt itself.

What is the difference between the geometric and the negative binomial distribution?

The geometric distribution counts attempts until the first success. The negative binomial generalises it to attempts until the rᵗʰ success, so the geometric distribution is just the negative binomial with r set to 1.

Related tools