Skip to content
LoveToCalc

Definition — what does that mean?

Simpson's rule

Instead of a straight line over each strip, lay a parabola over each pair. With the same points it is usually hundreds of times more accurate than trapezoids.

In Swedish: Simpsons regel

Simpson's rule

The relation

Sn=b−a3n(f(a)+4(n2Σi=1f(a+(2i−1)·b−an))+2(n2−1Σi=1f(a+2i·b−an))+f(b))

Split [a, b] into an even number n of equal strips and fit a parabola through each pair. The ends weigh 1, the odd points 4 and the inner even points 2, all times h/3.

A function of x, for example x^2, sin(x) or e^(-x)

Sn≈0.3333

S n equals ((1 minus 0) divided by (3 times 4)) times (((0 squared plus (4 times (the sum for i from 1 to (4 divided by 2) of (0 plus (((2 times i) minus 1) times ((1 minus 0) divided by 4))) squared))) plus (2 times (the sum for i from 1 to ((4 divided by 2) minus 1) of (0 plus ((2 times i) times ((1 minus 0) divided by 4))) squared))) plus 1 squared), equals ((1 minus 0) divided by (3 times 4)) times (((0 squared plus (4 times ((0 plus (((2 times 1) minus 1) times ((1 minus 0) divided by 4))) squared plus (0 plus (((2 times 2) minus 1) times ((1 minus 0) divided by 4))) squared))) plus (2 times (0 plus ((2 times 1) times ((1 minus 0) divided by 4))) squared)) plus 1 squared), equals (1 divided by 12) times (((0 plus (4 times ((0 plus ((2 minus 1) times (1 divided by 4))) squared plus (0 plus ((4 minus 1) times (1 divided by 4))) squared))) plus (2 times (0 plus (2 times (1 divided by 4))) squared)) plus 1), is approximately 0.0833 times (((0 plus (4 times ((0 plus (1 times 0.25)) squared plus (0 plus (3 times 0.25)) squared))) plus (2 times (0 plus (2 times 0.25)) squared)) plus 1), is approximately 0.0833 times (((0 plus (4 times ((0 plus 0.25) squared plus (0 plus 0.75) squared))) plus (2 times (0 plus 0.5) squared)) plus 1), is approximately 0.0833 times (((0 plus (4 times (0.25 squared plus 0.75 squared))) plus (2 times 0.5 squared)) plus 1), is approximately 0.0833 times (((0 plus (4 times (0.0625 plus 0.5625))) plus (2 times 0.25)) plus 1), is approximately 0.0833 times (((0 plus (4 times 0.625)) plus 0.5) plus 1), is approximately 0.0833 times (((0 plus 2.5) plus 0.5) plus 1), is approximately 0.0833 times ((2.5 plus 0.5) plus 1), is approximately 0.0833 times (3 plus 1), is approximately 0.0833 times 4, is approximately 0.3333

Working13 steps

The formula

a and b are the limits, n the number of strips, which has to be even, and Sn the approximation. In words: multiply the heights by the weights 1, 4, 2, 4, 2, …, 4, 1, add them up and multiply by h/3.

Type your own function into the card above and change the limits and the number of strips.

Where it comes from

Through three points there is exactly one parabola, and its area over the two strips is h/3 · (y0 + 4y1 + y2). Put n/2 such pairs side by side and add. The points where two pairs meet belong to both, which gives them the weight 2; the middle of each pair keeps its 4.

Worked example: e−x² from 0 to 1

With n = 4, h = 0.25 and the heights 1, 0.939 413, 0.778 801, 0.569 783 and 0.367 879:

The true value is 0.746 824. The trapezoidal rule with the same five points gives 0.742 984, an error more than a hundred times larger.

Exact for every cubic

Simpson’s rule was built to be exact for parabolas, but it is exact for cubics too: the error of the cubic term cancels between the two halves of each pair. For x³ from 0 to 2 with only n = 2:

That is exactly the integral, 2⁴/4 = 4.

How large the error is

For a function with a continuous fourth derivative the error is at most

Twice as many strips give a sixteenth of the error.

Common mistakes

Frequently asked questions

What is Simpson’s 3/8 rule? The same idea with a cubic through four points, three strips at a time. It is about as accurate and is used when the number of strips is a multiple of three.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearranged
Snb−a3n(f(a)+4(n2Σi=1f(a+(2i−1)·b−an))+2(n2−1Σi=1f(a+2i·b−an))+f(b))

Last reviewed September 26, 2026 ·How pages are reviewed

Calculate it in practice

CalculusAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.