How to Find CDF from PDF: A Clear Guide
Learn how to find a CDF from a PDF using integration. See the key formula, uniform and exponential examples, graphs, and practical uses.
Understanding PDF and CDF Basics
To find a CDF from a PDF, integrate the PDF from negative infinity up to your chosen value. This running area gives the chance that a random value is less than or equal to that value.
For a continuous random variable X, a probability density function is written as fX(x). It shows how tightly probability gathers near each value. A taller curve means more density in that area. It does not give the chance of one exact value.
A cumulative distribution function is written as FX(x). It gives the total probability that X is at most x. Its values range from 0 to 1. The CDF never falls as x moves from left to right.
- PDF: Shows local density across possible values
- CDF: Adds all probability up to a chosen value
- Area: Measures probability over an interval
- Limits: The CDF approaches 0 on the far left and 1 on the far right
A valid PDF must be nonnegative. Its total area must equal 1. This rule is called normalization. Without it, the curve cannot describe a complete probability model.
The Relationship Between PDF and CDF

The relation between CDF and PDF comes from integration and differentiation. The CDF is the accumulated area under the PDF. The PDF is the rate at which that accumulated area grows.
The central formula is:
FX(x) = ∫−∞x fX(t) dt
The letter t is a temporary input inside the integral. The upper limit x sets the point where you want the CDF value. In plain terms, add every small slice of density from the far left through x.
When the CDF is smooth, you can go back from CDF to PDF by taking its derivative:
fX(x) = dFX(x) / dx
This reverse step works where the derivative exists. A steep CDF means a high PDF value. A flat CDF means little or no density at that point.
A continuous variable also has an important limit. The chance of one exact point is zero, so P(X = x) = 0. Probability comes from an interval, such as P(2 < X ≤ 5). You find that chance by subtracting CDF values:
P(a < X ≤ b) = FX(b) − FX(a)
How to Calculate a CDF from a PDF

To calculate a CDF from a PDF, first find the range where the PDF is nonzero. Then set up the integral with the correct lower and upper limits. Finally, simplify the result and check its limits.
- Write the PDF: State fX(x) and its valid range.
- Set the bounds: Use negative infinity as the lower bound, or the start of the PDF's support.
- Integrate: Find the area from the start through x.
- Split the answer: Use separate cases outside and inside the valid range.
- Check the result: Confirm that the CDF stays between 0 and 1.
Suppose a PDF is zero below a and above b. For values below a, the CDF equals 0. For values above b, the CDF equals 1. Between a and b, integrate the given formula from a to x.
Normalization matters at this stage. If the PDF has total area 2, its values are twice as large as they should be. You must divide by 2 before using it, if the model calls for that correction.
For a quick check, test three points. The far-left value should give 0. The far-right value should give 1. The CDF should also rise or remain flat, never move downward.
Examples of Finding a CDF from a PDF

Uniform distribution
Let X have a uniform distribution from 2 to 6. Its PDF is fX(x) = 1/4 for 2 ≤ x ≤ 6. The curve forms a flat block with width 4 and height 1/4. Its total area is 1.
For a value between 2 and 6, integrate the constant height:
FX(x) = ∫2x 1/4 dt = (x − 2)/4
So the full CDF is 0 below 2, (x − 2)/4 from 2 through 6, and 1 above 6. For example, FX(5) = 3/4. There is a 75% chance that X is at most 5.
Exponential distribution
Now let X measure waiting time with rate λ greater than 0. Its PDF is fX(x) = λe−λx for x ≥ 0. It is zero for negative x.
Integrating this PDF gives:
FX(x) = 1 − e−λx
This formula applies when x is at least 0. For x below 0, the CDF is 0. If λ = 0.5 and x = 2, then FX(2) = 1 − e−1, or about 0.632.
Graphs make this link easier to see. The uniform PDF stays flat, while its CDF rises in a straight line. The exponential PDF falls over time, while its CDF rises fast at first and then levels off near 1.
When to Use PDF and CDF

Use a PDF when you need to study density across a continuous range. It helps compare likely regions and supports area-based calculations. The height alone is not a probability.
Use a CDF when you need a threshold or percentile. Questions such as “What is the chance of waiting less than five minutes?” need a CDF. The same function helps find median values and risk cutoffs.
| Question | Best tool | Reason |
|---|---|---|
| Where is density highest? | It shows the curve's local height | |
| What is P(X ≤ x)? | CDF | It gives total probability up to x |
| What is P(a < X ≤ b)? | CDF | Subtract the two endpoint values |
| How quickly does probability grow? | It is the CDF's slope |
For a normal distribution, the PDF shows the bell curve. The normal CDF gives the area to the left of a chosen score. Use the CDF for tail chances, percentiles, and cutoffs.
For a binomial model, use a probability mass function rather than a continuous PDF. It assigns probability to separate counts, such as 7 successes in 10 trials. A binomial CDF adds those point probabilities through a chosen count.
That distinction prevents a common mistake. Continuous models use density and integration. Discrete models use point probabilities and sums. Both CDF types still answer a cumulative question.
A Quick Way to Check Your Result
After you find a CDF from a PDF, review its shape before using it. The function should start near 0 and end near 1. It should never decrease as x grows.
Differentiate your answer when possible. The result should match the original PDF within its valid range. Also test the boundary points. A jump or mismatch often signals a missing case.
- Check that the PDF is nonnegative
- Check that its full area equals 1
- Check that FX(−∞) approaches 0
- Check that FX(∞) approaches 1
- Check that every CDF value lies between 0 and 1
The main method is simple: identify the density, integrate up to x, and apply the correct range. This is how to get a CDF from a PDF in nearly every continuous model.
Step-by-step
- 01 Write the PDF and its range
State the density function and mark where it is nonzero. Note each boundary clearly.
- 02 Set up the integral
Integrate from the start of the distribution through x. Use negative infinity when the support has no lower bound.
- 03 Solve the integral
Find the antiderivative and insert the limits. Keep the result in terms of x.
- 04 Write the piecewise CDF
Set the CDF to 0 below the range and 1 above it. Use the integral result inside the range.
- 05 Check the result
Confirm that the CDF rises from 0 to 1. Differentiate it to recover the PDF.
Frequently asked questions
- How do you find a CDF from a PDF?
- Integrate the PDF from negative infinity to x. The result gives P(X ≤ x).
- What is the formula for calculating a CDF from a PDF?
- The formula is F_X(x) = ∫ from −∞ to x of f_X(t) dt. It adds all density up to x.
- How do you go from a CDF to a PDF?
- Differentiate the CDF with respect to x. This gives the PDF where the derivative exists.
- Why does a PDF not give the probability of one exact value?
- For a continuous variable, P(X = x) equals 0. Probability comes from the area over an interval.
- What is the difference between a normal PDF and normal CDF?
- The normal PDF shows bell-curve density at each value. The normal CDF gives the total area to the left of a value.
- Does a binomial distribution have a PDF and CDF?
- A binomial model has a probability mass function and a CDF. The CDF adds point probabilities through a chosen count.
Related reading
M20 How Do You Do That? A Practical PDF Guide
A clear guide to M20 magic rules, spell effects, and safe PDF access.
I Write What I Like: Steve Biko’s Writings and Legacy
Explore Steve Biko’s key ideas, history, and lasting influence.
Create a Fillable PDF Form: A Practical Step-by-Step Guide
Build, test, and share a fillable PDF form with clear steps.