What is the Probability of At Most k Successes?
This calculator finds the cumulative binomial probability \(P(X \le k)\): the chance of getting at most k successes across n independent trials, when each trial succeeds with probability p. It sums the individual binomial probabilities from 0 successes up to and including k successes. This is the lower-tail (cumulative distribution function) of the binomial distribution.
How to use it
Enter the number of trials n, the threshold k (the most successes you want to allow), and the per-trial success probability p as a decimal between 0 and 1. The tool returns \(P(X \le k)\), its percentage form, the complement \(P(X > k)\), and the expected number of successes \(np\).
The formula explained
The probability of exactly i successes is the binomial term \(\binom{n}{i}\cdot p^{i}\cdot (1-p)^{n-i}\), where \(\binom{n}{i}\) is the number of ways to pick which i trials succeed. To get "at most k," we add these terms for i = 0, 1, …, k:
$$P(X \le k) = \sum_{i=0}^{k} \binom{n}{i}\, p^{\,i}\, (1-p)^{\,n-i}$$The calculator uses a numerically stable recurrence between successive terms, which keeps results accurate even for large n.
Worked example
Suppose you flip a fair coin 10 times (\(n = 10\), \(p = 0.5\)) and want the probability of at most 3 heads (\(k = 3\)). Adding the terms for 0, 1, 2, and 3 successes gives counts \(1 + 10 + 45 + 120 = 176\) favorable outcomes out of \(2^{10} = 1024\), so
$$P(X \le 3) = \frac{176}{1024} \approx 0.171875$$or about 17.19%.
FAQ
What is the difference between "at most k" and "exactly k"? "Exactly k" is a single term \(\binom{n}{k} p^{k}(1-p)^{n-k}\), while "at most k" sums all terms from 0 to k.
How do I get "at least k" instead? Use \(P(X \ge k) = 1 - P(X \le k-1)\). The complement row here gives \(P(X > k) = 1 - P(X \le k)\).
Can p be 0 or 1? Yes. If \(p = 0\) every trial fails so \(P(X \le k) = 1\) for any \(k \ge 0\); if \(p = 1\) every trial succeeds, giving 1 only when \(k \ge n\).