CDF Calculator for a Random Variable
Compute the cumulative distribution function for common discrete and continuous random variables, then visualize the cumulative probability curve instantly.
Result
- Select a distribution and enter parameters.
- Click Calculate CDF to compute P(X ≤ x).
- The chart below will show the cumulative probability curve.
How to calculate the CDF of a random variable
The cumulative distribution function, usually called the CDF, is one of the most important ideas in probability and statistics. If a random variable is named X, the CDF is written as F(x) = P(X ≤ x). In plain language, that means the CDF gives the probability that the variable takes a value less than or equal to a chosen threshold. When people ask how to calculate the CDF of a random variable, they are really asking how to measure accumulated probability up to a specific point.
This is useful in nearly every quantitative field. In finance, a CDF can estimate the chance a return is below a target. In quality control, it can tell you the proportion of items that fall under a tolerance limit. In reliability engineering, it describes the probability that a system fails by time t. In public health, it helps quantify how many observed values lie below a clinically meaningful cutoff. The CDF turns a probability model into a practical decision tool.
The calculator above lets you compute the CDF for several common distributions: normal, exponential, uniform, binomial, and Poisson. Those cover many standard classroom and professional use cases. Continuous distributions such as normal and exponential use formulas or integrals. Discrete distributions such as binomial and Poisson use sums of probabilities. Either way, the output is the same kind of quantity: cumulative probability from the far left of the distribution up to your chosen value.
What the CDF means intuitively
A probability density function or probability mass function tells you how probability is distributed. The CDF tells you how that probability accumulates. Imagine moving from left to right across the number line. At each point, the CDF records how much total probability has been collected so far. That is why CDFs always move upward or stay flat. They never decrease.
- For any random variable, the CDF is always between 0 and 1.
- As x goes to negative infinity, the CDF approaches 0.
- As x goes to positive infinity, the CDF approaches 1.
- The CDF is nondecreasing.
- For discrete variables, the CDF has jumps at possible values.
- For continuous variables, the CDF is typically smooth.
If the CDF at x = 10 is 0.82, that means 82% of the probability lies at or below 10. Equivalently, only 18% lies above 10. This is why CDFs are closely tied to percentiles, quantiles, risk thresholds, and one-sided probability statements.
General formula for the CDF
The exact method depends on whether the random variable is discrete or continuous.
- Discrete random variable: add up all probabilities at values less than or equal to x. Formally, F(x) = Σ P(X = k) over all k ≤ x.
- Continuous random variable: integrate the density from negative infinity up to x. Formally, F(x) = ∫ f(t) dt from negative infinity to x.
That difference explains why a binomial CDF is usually a finite sum, while a normal CDF is an area under a curve. In software, both are often computed numerically or with standard approximations. In practice, calculators and statistical packages do the heavy lifting, but understanding the structure helps you choose the right model and interpret the answer correctly.
How to calculate the CDF for common distributions
Below are the main distributions included in the calculator and the formulas they use.
- Normal distribution: If X ~ N(μ, σ²), then F(x) = Φ((x – μ) / σ), where Φ is the standard normal CDF.
- Exponential distribution: If X ~ Exp(λ), then for x ≥ 0, F(x) = 1 – e^(-λx). For negative x, the CDF is 0.
- Uniform distribution: If X ~ U(a, b), then the CDF is 0 below a, increases linearly between a and b, and equals 1 above b.
- Binomial distribution: If X ~ Bin(n, p), then F(x) = Σ C(n,k)p^k(1-p)^(n-k) for all integer k ≤ x.
- Poisson distribution: If X ~ Pois(λ), then F(x) = Σ e^(-λ) λ^k / k! for all integer k ≤ x.
Worked examples
Suppose a test score is modeled as normally distributed with mean 70 and standard deviation 10. You want the probability a score is 85 or lower. Standardize first: z = (85 – 70) / 10 = 1.5. The standard normal CDF at 1.5 is about 0.9332. So there is about a 93.32% chance of observing a score at or below 85.
For an exponential example, assume machine failures follow an exponential model with rate 0.2 per hour. What is the probability the machine fails within 3 hours? Compute F(3) = 1 – e^(-0.2 × 3) which is approximately 0.4512. That means about 45.12% of failures occur within 3 hours.
For a binomial example, let X be the number of successes in 10 independent trials with probability 0.3 each. If you need P(X ≤ 2), add the probabilities for 0, 1, and 2 successes. The total is about 0.3828. That is the CDF value at 2.
Comparison table: benchmark standard normal CDF values
The standard normal distribution is so widely used that several benchmark cumulative probabilities are considered essential reference points. The values below are widely used in introductory and applied statistics and align with standard tables reported in academic and government statistical references.
| Z value | CDF P(Z ≤ z) | Upper tail P(Z > z) | Interpretation |
|---|---|---|---|
| 0.00 | 0.5000 | 0.5000 | Exactly half the area lies below the mean. |
| 1.00 | 0.8413 | 0.1587 | About 84.13% of values are at or below one standard deviation above the mean. |
| 1.645 | 0.9500 | 0.0500 | Important one-sided 5% critical value. |
| 1.96 | 0.9750 | 0.0250 | Common two-sided 95% confidence threshold. |
| 2.576 | 0.9950 | 0.0050 | Common two-sided 99% confidence threshold. |
Comparison table: empirical normal coverage percentages
Another set of real benchmark statistics comes from the empirical rule for bell-shaped normal data. These percentages are standard approximations used throughout science, medicine, and engineering.
| Interval around the mean | Approximate cumulative coverage | Probability outside the interval | Why it matters |
|---|---|---|---|
| μ ± 1σ | 68.27% | 31.73% | Useful for quick assessment of typical variation. |
| μ ± 2σ | 95.45% | 4.55% | Frequently used for screening and quality monitoring. |
| μ ± 3σ | 99.73% | 0.27% | Central to Six Sigma style process thinking. |
Step by step process for using a CDF calculator
- Identify the distribution that matches the random variable.
- Enter the target value x.
- Enter the relevant parameters such as mean and standard deviation, or rate, or trial count and success probability.
- Click calculate to compute P(X ≤ x).
- Review the chart to see how cumulative probability grows across the support of the variable.
- Interpret the number in context. For example, 0.87 means 87% of the distribution lies at or below your chosen threshold.
Common mistakes when calculating the CDF
- Using the wrong distribution family.
- Mixing up density or mass with cumulative probability.
- Forgetting that discrete variables accumulate only over allowable integer outcomes.
- Entering a variance where a standard deviation is required.
- Using a negative rate for exponential or Poisson models, which is not valid.
- For the uniform distribution, reversing the lower and upper endpoints.
Many interpretation errors come from not distinguishing between a point probability and a cumulative one. For a continuous variable, P(X = x) is usually 0, while P(X ≤ x) can be substantial. That difference is foundational.
Why the chart is useful
A numerical answer is valuable, but a visual CDF curve makes the result easier to understand. On a CDF plot, the vertical axis is cumulative probability and the horizontal axis is the value of the random variable. If the curve climbs steeply in a narrow region, many outcomes are concentrated there. If it rises slowly, probability is spread out across a wider range. For discrete distributions, the cumulative pattern appears in steps. For continuous ones, it appears as a smooth climb.
Authoritative references for further study
If you want deeper background on probability distributions, CDFs, and statistical tables, these sources are excellent starting points:
- NIST/SEMATECH e-Handbook of Statistical Methods
- Penn State STAT 414 Probability Theory
- University of California, Berkeley Department of Statistics
Final takeaway
To calculate the CDF of a random variable, you first choose the right probability model, then accumulate probability up to the value of interest. For discrete distributions, you sum. For continuous distributions, you integrate or use a known CDF formula. Once you understand that the CDF is simply the probability of being less than or equal to a threshold, a wide range of statistical tasks become easier: percentile lookup, tail-risk estimation, threshold screening, confidence analysis, and reliability calculations. Use the calculator above to evaluate the CDF quickly, compare distributions, and visualize how probability builds from 0 to 1.