Simpson's Rule Calculator
Approximate definite integrals with Simpson's 1/3 rule and compare with the trapezoid rule.
Enter your values
ⓘ Live results
- Simpson's rule estimate
- 3.24123804
- Δx (h)
- 0.25
- Subintervals used
- 8
- Trapezoid rule estimate
- 3.25174401
- Approximate error
- 0.00007122
Compared with a high-resolution Simpson run.
| i | xᵢ | f(xᵢ) | weight |
|---|---|---|---|
| 0 | 0 | 1 | 1 |
| 1 | 0.25 | 1.007782 | 4 |
| 2 | 0.5 | 1.06066 | 2 |
| 3 | 0.75 | 1.192424 | 4 |
| 4 | 1 | 1.414214 | 2 |
| 5 | 1.25 | 1.718466 | 4 |
| 6 | 1.5 | 2.09165 | 2 |
| 7 | 1.75 | 2.52178 | 4 |
| 8 | 2 | 3 | 1 |
Quick answer
Simpson's rule approximates a definite integral by fitting parabolas through pairs of subintervals: ∫f ≈ (Δx/3)[f₀ + 4f₁ + 2f₂ + … + 4f_{n−1} + f_n], where n is even.
∫ₐᵇ f(x) dx ≈ (Δx/3)[f₀ + 4f₁ + 2f₂ + ⋯ + 4fₙ₋₁ + fₙ]
How to use the Simpson's Rule Calculator
- 1Enter f(x) and the limits of integration.
- 2Choose an even number of subintervals — more subintervals means more accuracy.
- 3Read the estimate, Δx and the weighted table of sample points.
Worked example
Using the values the calculator loads with:
Inputs
- Function f(x)sqrt(1 + x^3)
- Lower limit a0
- Upper limit b2
- Subintervals n (even)8
Results
- Simpson's rule estimate3.24123804
- Δx (h)0.25
- Subintervals used8
- Trapezoid rule estimate3.25174401
- Approximate error0.00007122
Frequently asked questions
Why must n be even for Simpson's rule?
Each parabola spans two subintervals, so the interval count has to be divisible by two. If you enter an odd n this calculator rounds up to the next even number.
Is Simpson's rule more accurate than the trapezoid rule?
Almost always. Simpson's rule is exact for cubics and has error on the order of h⁴, while the trapezoid rule error is on the order of h².
About this calculator
- Built and reviewed by James Whitfield · How we build and test calculators
- Report an error
Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.