Simpson Rule Integration Calculator
Simpson's rule is one of the most widely used numerical integration methods because it is both simple and accurate. It approximates the area under a curve by fitting parabolas through successive triples of evenly spaced sample points, capturing curvature that the trapezoidal rule misses. This calculator takes the lower and upper bounds, an even number of subintervals, and the list of function values at the nodes, then applies the composite Simpson's 1/3 weighting (1, 4, 2, 4, ..., 4, 1) scaled by the step size over three. It is exact for any cubic polynomial.
Simpson's rule formula
h = (b - a) / n
Integral = (h / 3) * [ f0 + f(n)
+ 4 * (f1 + f3 + f5 + ...)
+ 2 * (f2 + f4 + f6 + ...) ]
n must be even; supply n + 1 node values
The two endpoints receive weight 1, odd-indexed interior nodes receive weight 4, and even-indexed interior nodes receive weight 2. The entire weighted sum is then scaled by the step size divided by three.
Notes on using Simpson's rule
- The number of subintervals n must be even; otherwise the parabolic pairing breaks down.
- You must supply exactly n + 1 function values, one at each node from a to b inclusive.
- The nodes must be evenly spaced; the step size h is computed from the bounds and n.
- Simpson's rule is exact for polynomials up to degree three.
- The truncation error is proportional to h to the fourth power for smooth functions.
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 consecutive sample points and integrating those parabolas exactly. The composite Simpson's 1/3 rule applies this across the whole interval and is exact for any polynomial of degree three or lower.
Why must the number of subintervals be even?
Simpson's 1/3 rule pairs subintervals: each parabola spans two subintervals. The number of subintervals n must therefore be even so the points group into complete pairs. If you enter an odd n this calculator returns n/a.
What is the Simpson's rule formula?
With step h = (b - a) / n, the integral is approximately (h/3) times [f0 + f(n) + 4 times the sum of odd-indexed values + 2 times the sum of even-indexed interior values]. The endpoints carry weight 1, odd points weight 4, even interior points weight 2.
How accurate is Simpson's rule?
The composite Simpson's rule has an error that scales with h to the fourth power, so halving the step size cuts the error roughly sixteenfold. It is far more accurate than the trapezoidal rule for smooth functions and is exact for cubics.
What function does this calculator integrate?
You supply the sample values yourself as a comma-separated list of f(x) evaluated at the n+1 evenly spaced nodes, so any function you can tabulate works. The calculator multiplies each value by the correct Simpson weight and sums.
Official sources
- NIST Digital Library of Mathematical Functions: Quadrature.
- NIST/SEMATECH e-Handbook of Statistical Methods: Numerical methods reference.
Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.