Binomial Probability Calculator
Calculate point and cumulative binomial probabilities with a full table, chart and exports.
This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.
Calculate exact-count or inclusive-tail binomial model probabilities with a complete distribution, chart and underflow-aware exports.
How to use it
- 1Enter 0–2,000 trials and the same success probability from 0 to 1.
- 2Choose exactly, at most, at least or an inclusive range of successes.
- 3Calculate the approximate probability, mean, spread and distribution.
- 4Download every success count as CSV/JSON or keep a local SVG chart.
Example
- Input
- n=10, p=0.5, exactly 3 successes
- Output
- 0.1171875 (11.71875%). At most 3: 0.171875.
Independent binary trials and constant p are assumptions, not verified observations.
What happens to your data
Counts and probabilities remain in this tab and are excluded from workflow measurement. Exports are generated locally; starter examples are excluded from measurement entirely.
Last updated November 2026
Calculate the probability of exactly k successes, at most k, at least k, or a success count inside an inclusive range. Enter the number of trials and the same success probability for each trial, then calculate once to see the result, mean, standard deviation and distribution chart. The full probability table remains available in CSV or JSON, even when the on-page chart groups many counts.
A binomial model assumes a fixed number of independent trials, each with only success or failure and the same probability of success. This calculator applies that model; it does not establish that a real experiment meets the assumptions or turn a model probability into a measured forecast.
How it works
For n independent trials with fixed success probability p, the probability of exactly k successes is C(n,k) p^k (1−p)^(n−k). Here C(n,k) counts the ways to choose k successes among n trials. At most k sums counts 0 through k, at least k sums k through n, and a range includes both entered endpoints. The mean is np, variance is np(1−p), and standard deviation is the square root of that variance.
The implementation avoids overflowing factorials by starting with relative weight 1 at a mode floor((n+1)p), clipped to n, and building neighboring weights with binomial probability ratios. Logarithms retain tiny relative probabilities. A compensated Kahan sum normalizes the distribution, and separate compensated forward and reverse sums build the lower and upper tails. A small upper tail is summed directly rather than subtracting a lower tail rounded to 1. These are browser binary64 approximations, not arbitrary-precision or exact-rational probability results.
For p=0, all mass is at zero successes. For p=1, all mass is at n successes. With zero trials, X=0 with probability 1. These branches are handled explicitly so 0^0 or logarithms at endpoints cannot produce NaN. For 0<p<1, every individual count is mathematically possible, although some probabilities can be smaller than binary64 can store. A displayed underflow message means too small to represent, not impossible. Natural log probability is retained where finite; an impossible endpoint event has a null log probability and a separate impossible flag. Exponentiating a retained log may still underflow in another application.
Trials n must be a whole number from 0 to 2,000. Success counts must be whole numbers from 0 through n, and the upper endpoint cannot precede the lower one. Probability p must be decimal-point text from 0 to 1 with at most 12 decimal places: enter 0.5 for 50%, not 50 or 50%. Scientific notation, negative counts, formulas, nonfinite values and percentages are rejected. A leading decimal such as .25 is accepted. The normal journey is enter the parameters, calculate, and download the desired result.
The chart uses one bar per count when there are at most 100 counts; above that, consecutive counts are grouped into intervals of up to ceil((n+1)/100) counts. Each bar's total height is the interval probability, and its teal part is the probability belonging to the selected event. Grouped bars are not individual point probabilities. Every count remains in CSV and JSON. The SVG has a fixed drawing structure, numeric labels, descriptive title and no scripts, external images or remote resources. It is a local vector chart, suitable for scaling.
The on-page table previews up to 25 counts near the selected lower bound. CSV contains all n+1 counts with point probability, natural log point probability, direct lower and upper tails, event membership, and underflow/impossibility flags. JSON also includes entered source settings, selected-event probability and log, mean, variance and standard deviation. Displays round values for readability; numeric exports retain the computed browser values. Summed probabilities can differ from exactly 1 by floating-point rounding.
Parameters are kept in browser memory, not uploaded or placed into the URL. Editing any input removes stale results and export controls. Clear empties the input fields, and Reset example restores the labelled ten-trial example. Starter examples are excluded from workflow measurement; optional anonymous records contain only fixed task/outcome labels and download actions, never entered counts or probabilities. Downloaded files deliberately retain the distribution and settings, so review them before sharing.
Worked example: Exactly three successes
- Input
- n = 10, p = 0.5, exactly k = 3
- Result
- P(X=3) = 0.1171875 (11.71875%). Mean 5; standard deviation about 1.58113883.
For the same inputs, P(X≤3)=0.171875 and P(X≥3)=0.9453125; both tails include 3.
Common use cases
- Check the probability of an exact number of successes in a classroom example.
- Compare inclusive lower and upper tails without manually adding every count.
- Export an entire binomial probability distribution for a report or lesson.
- Distinguish a mathematically impossible endpoint event from a tiny numeric underflow.
Frequently asked questions
Does at least k include k?+
Yes. At least k is P(X≥k), and at most k is P(X≤k). A between event includes both entered endpoints. Exactly k uses only that one success count.
Should I enter 50 or 0.5 for 50%?+
Enter 0.5. The field accepts decimal probabilities from 0 to 1, with up to 12 decimal places. Percent signs, percentages like 50, and scientific notation are rejected.
Why does the result say below numeric range rather than zero?+
The entered model can give a nonzero probability too small for a browser number. The tool labels this underflow and keeps its natural log probability in JSON. It reserves impossible for endpoint events that have exactly zero model probability.
Why are some chart bars grouped?+
At most 100 bars are drawn for readability. For large n, each bar sums a consecutive count interval; teal is the selected portion. CSV and JSON still contain every one of the n+1 success counts.
Can I use this when success probability changes each trial?+
The ordinary binomial model assumes constant p and independent trials. Changing probabilities, dependent outcomes or sampling without replacement may require a different model; this tool does not validate real-world assumptions.
Standards and limitations
Related tools
Percentage Calculator
Calculate percentages, reverse changes, compound changes and percentage points with a CSV breakdown.
Standard Deviation Calculator
Analyze a list or CSV column with sample/population spread, quartiles, outlier flags and exports.
Histogram Maker
Make a histogram from numbers or a CSV column. Export charts and audited bin counts.
Box Plot Maker
Make box plots from numbers or grouped CSV, with clear quartiles and data exports.