Handy Orchard

Binomial probability calculator

Compute exact-count and tail probabilities for independent fixed-probability binary trials, retaining logarithms for very small probabilities.

Your input

Used for exact, at most and at least.

Used only for the inclusive interval mode.

Used only for interval mode; must be between lower count and n.

Outputs are cleared when the input changes.

Result

Enter your data or use the example, then run the tool.

Worked example

n=10, p=0.5, k=3: exactly 0.1171875, at most 0.171875, at least 0.9453125.

With n=0, the count is certainly zero. With p=1, the count is certainly n.

Method

Use C(n,k)p^k(1−p)^(n−k). Log factorials and log1p form terms without overflowing factorials.

Selected terms are summed directly with log-sum-exp, including upper tails; p=0, p=1 and n=0 are handled separately.

Limits

n must be an integer 0–10,000, counts 0–n, and p 0–1. Trials must be independent, binary and share fixed p.

Floating-point approximation; an underflowed probability is labelled below range, not impossible. No medical, gambling or outcome prediction.

Sources

NIST: binomial distribution

Related tools

Dataset distribution summaryLinear regression worksheetK-means data clusteringInteger factor toolkit

Your inputs stay on this device. Only optional, consented page visits are measured. Input values, files, filenames and processing logs are not sent to Analytics.

When switching languages, text, settings and selected files are temporarily kept on this device. Transfers are removed after restoring; interrupted transfers are cleaned up on a later visit. Inputs and files are never uploaded.