Simpson’s Rule Calculator

Approximate a definite integral using Simpson’s rule. Enter the function, the limits, and an even number of intervals.

f(x) =

Simpson's rule calculator

Simpson's rule is a numerical method for approximating a definite integral — the area under a curve — when an exact antiderivative is difficult or impossible to find. This calculator applies the rule to your function over the interval [a, b] using the number of intervals you choose, and returns a highly accurate estimate.

How Simpson's rule works

The interval is divided into an even number of strips of equal width h, and the curve is approximated by parabolas rather than straight lines. The formula is (h/3) × [f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + … + 4f(xₙ₋₁) + f(xₙ)], where the end values have weight 1, odd points weight 4, and even interior points weight 2. Using parabolas makes it far more accurate than the simpler trapezoidal rule for the same number of intervals.

Why n must be even

Simpson's rule pairs up strips to fit each parabola across two intervals, so the number of intervals (n) must be even. If you enter an odd number, the calculator rounds up to the next even value. More intervals generally give a more accurate result. For derivatives and general integrals, try our calculus solver.

Frequently asked questions

Is Simpson's rule exact?

It is exact for polynomials up to degree three and very accurate for smooth functions. For most other functions it gives an excellent approximation that improves as you increase n.