Simpson's Rule Integration Calculator

Simpson's rule estimates the area under a curve by fitting parabolas through your sample points, giving high accuracy for smooth functions. Enter the integration bounds, an even number of subintervals, and the function values at each evenly spaced node. The calculator returns the approximate integral, the step size, and the weighted sum.

0.00
0.00
0.00
0.00

Simpson's rule formula

h = (b - a) / n
Integral = (h / 3) * [ f0 + fn
+ 4 * (f1 + f3 + f5 + ...)
+ 2 * (f2 + f4 + f6 + ...) ]
n must be even; supply n + 1 node values

The two endpoints take weight 1, odd-indexed interior nodes take weight 4, and even-indexed interior nodes take weight 2. The weighted sum is scaled by the step size divided by three.

Worked example

Integrate x squared from 0 to 2 with n = 4. Nodes at 0, 0.5, 1, 1.5, 2 give values 0, 0.25, 1, 2.25, 4 and h = 0.5. Weighted sum = 0 + 4(0.25) + 2(1) + 4(2.25) + 4 = 0 + 1 + 2 + 9 + 4 = 16. Integral = (0.5 / 3) times 16 = 2.6667, the exact value of 8/3.

Simpson's rule: frequently asked questions

What is Simpson's rule?

Simpson's rule approximates a definite integral by fitting parabolas through groups of three points and summing their exact areas. It is more accurate than the trapezoidal rule for smooth functions because it captures curvature, not just straight-line segments.

Why must the number of subintervals be even?

Simpson's rule pairs subintervals into spans of two, fitting one parabola over each pair. An odd number of subintervals leaves one span unpaired, so the composite rule requires an even count of subintervals and therefore an odd number of nodes.

How do I supply the function values?

Evaluate your function at each of the n plus 1 evenly spaced nodes from the lower bound to the upper bound, then enter those values in order, separated by commas. The calculator applies the Simpson weights and the step size automatically.

How accurate is it?

For a smooth function the error shrinks with the fourth power of the step size, so halving the step roughly cuts the error by a factor of sixteen. Simpson's rule integrates any polynomial up to degree three exactly.

Sources

Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.