Geometric CDF Calculator
The probability that the first success arrives on or before trial k, for a geometric distribution with success probability p.
What this page computes
Evaluates P(X ≤ k) = 1 − (1 − p)^k: the chance that at least one success has happened within the first k trials.
How to use it
Type the Success probability p, Trials allowed k and press Run. p is the success probability on every trial, 0 < p < 1, and k ≥ 1 is the number of trials allowed. The CDF reaches 1 as k grows. With p = 0.2, within the first 3 trials, the page prints P(X ≤ 3) = 0.488.
Running it
Closed form 1 − (1 − p)^k, evaluated as −expm1(k·log1p(−p)) so a very small tail keeps its significant digits. Every figure is computed in this browser tab: nothing is uploaded and nothing is stored.
Evaluates P(X ≤ k) = 1 − (1 − p)^k: the chance that at least one success has happened within the first k trials. With p = 0.2, within the first 3 trials, the page prints P(X ≤ 3) = 0.488.
Closed form 1 − (1 − p)^k, evaluated as −expm1(k·log1p(−p)) so a very small tail keeps its significant digits. The printed result is accurate to closed form, evaluated in double precision; no table is read and nothing is simulated.
How to use this geometric distribution calculator
Type each value below and press Run. The page prints the lower-tail probability and the parameter line it used, so the answer can be checked against the formula rather than taken on trust.
The inputs this page reads are Success probability p (strictly between 0 and 1); Trials allowed k (whole number, at least 1).
The parameterisation
p is the success probability on every trial, 0 < p < 1, and k ≥ 1 is the number of trials allowed. The CDF reaches 1 as k grows.
The numeric method
Closed form 1 − (1 − p)^k, evaluated as −expm1(k·log1p(−p)) so a very small tail keeps its significant digits.
The printed value is accurate to closed form, evaluated in double precision. The page returns the lower-tail probability only; it does not also print a test statistic, a p-value or a decision.
What to Expect
Best for
- the chance of a success within a fixed number of attempts
- converting a per-trial probability into a run probability
Not ideal for
- the probability of one exact trial, which is the PMF page
- trials with more than two outcomes
What this tool keeps
- Double-precision arithmetic in your own browser
- The same inputs always produce the same output
Common errors
- p must be strictly between 0 and 1, and k must be a whole number of at least 1.
Example use cases
- how many attempts a retry loop needs
- sampling with replacement until a hit
Sample input
p = 0.2, within the first 3 trials.
Sample output
P(X ≤ 3) = 0.488.
Who this is for
- students
- engineers sizing retry budgets
Frequently asked questions
Which parameterisation does this page use?
p is the success probability on every trial, 0 < p < 1, and k ≥ 1 is the number of trials allowed. The CDF reaches 1 as k grows.
How is the result computed?
Closed form 1 − (1 − p)^k, evaluated as −expm1(k·log1p(−p)) so a very small tail keeps its significant digits. The result is accurate to closed form, evaluated in double precision.
What inputs are refused?
p must be strictly between 0 and 1, and k must be a whole number of at least 1.
Is anything uploaded?
No. Every number is computed by JavaScript in this page from the values you typed; nothing is posted, stored or logged.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.