Key takeaways
- Area ≈ (Δx ÷ 2) × [first + 2 × each middle height + last].
- Δx = (b − a) ÷ N, and N strips need N + 1 points.
- Only the inside heights are doubled, never the two ends.
- It equals the average of the left and right Riemann sums.
In this guide
What is the trapezoidal rule?
The area under a curve between two points is called a definite integral. When you can’t find it exactly, you can estimate it. Rectangles (a Riemann sum) leave gaps or overlaps. Trapezoids follow the curve better, because their top edge slopes to meet the curve at both ends of each strip.
Why does the trapezoidal rule matter?
In real life you often have measurements, not a formula: speed every minute, width of a field every 10 metres, power use every hour. The trapezoidal rule turns those numbers straight into a total, with no formula needed.
For smooth curves, doubling the number of strips makes the error about four times smaller. That makes it easy to get a more accurate answer.
The formula
| Symbol | What it means | Example |
|---|---|---|
| Δx | Width of each strip: (b − a) ÷ N | (3 − 1) ÷ 4 = 0.5 |
| N | The number of strips | 4 |
| x₀ = a, xₙ = b | The two ends of the interval | 1 and 3 |
| x₁, x₂, … | The points in between | 1.5, 2, 2.5 |
| f(x) | The height of the curve at each point | f(1.5) = 2.25 |
The two end heights are counted once. Every inside height is counted twice, because it is shared by two trapezoids. This calculator uses f(x) = xᵖ from a to b and also shows the exact value and the error.
How to use the trapezoidal rule step by step
- 1Find the width.
Δx = (b − a) ÷ N. - 2List the N + 1 points. a, a + Δx, a + 2Δx, …, b.
- 3Find each height. Put each point into f(x).
- 4Add them up the right way. First + last + 2 × (every middle height).
- 5Multiply by Δx ÷ 2. That is your estimate.
Now try it yourself. Enter a power, the limits and the number of strips in the calculator below, and compare with the exact value.
Try it yourself
Pre-filled with the example — change any value.
Common mistakes to avoid
- Using Δx instead of Δx/2. The formula has Δx ÷ 2 in front.
- Counting points wrong. N strips need N + 1 points.
- Expecting an exact answer. For curves that bend upward, like x², the straight tops sit slightly above the curve, so the estimate is a bit too big.
Tips and tricks
- Straight lines are exact. If f is a straight line, the trapezoids fit perfectly and there is no error.
- Want more accuracy? Try Simpson’s rule, which fits curves through the points.
- Exact check: for powers of x, the definite integral calculator gives the true area.
Where you’ll use it in real life
- Surveying: the area of a plot with a curved edge, from width measurements.
- Transport: distance travelled from a speed log.
- Energy: total energy from a power meter’s hourly readings.
- Medicine: the area under a drug concentration curve from blood samples.
Quick summary
The trapezoidal rule joins points with straight lines and adds the trapezoids: (Δx ÷ 2) × [first + 2 × middles + last]. Double only the inside heights, and use more strips for a better answer. Use the calculator above to compare your estimate with the exact area.
Worked example
An engineering student wants to estimate the area under y = x² between x = 1 and x = 3 using 4 trapezoids, then see how close it is to the exact answer. Here p = 2, a = 1, b = 3 and N = 4.
- 01∫[1 to 3] x^2 dx using Trapezoidal Rule, N=4
- 02Δx = (3−1)/4 = 0.5
- 03T = (Δx/2)[f(a) + 2f(x₁) + … + 2f(xₙ₋₁) + f(b)]
- 04≈ 8.75
- 05Exact = 8.6667
- 06Error = 0.0833
These numbers are pre-filled in the calculator above.
Frequently asked questions
Is the trapezoidal rule more accurate than a Riemann sum?
It is usually more accurate than a left or right Riemann sum with the same strips. A midpoint sum is often similar or slightly better.
How do I make the trapezoidal rule more accurate?
Use more strips (a bigger N). Doubling N makes the error about four times smaller for smooth curves.
What’s the difference between the trapezoidal rule and Simpson’s rule?
The trapezoidal rule joins points with straight lines. Simpson’s rule fits curved pieces (parabolas) through them, which is usually much more accurate.


