Math

Simpson's Rule Calculator

Approximate definite integrals with Simpson's 1/3 rule and compare with the trapezoid rule.

Enter your values

Enter the function f(x) you are working with.

Enter the lower limit a you are working with.

Enter the upper limit b you are working with.

Enter the subintervals n (even) you are working with.

Results update instantly as you type — no submit needed. Your values are remembered on this device, and the shareable link reopens the calculator with exactly these numbers.

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.

x = 0f(x) = sqrt(1 + x^3)x = 2
ixᵢf(xᵢ)weight
0011
10.251.0077824
20.51.060662
30.751.1924244
411.4142142
51.251.7184664
61.52.091652
71.752.521784
8231

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ₙ]

At a glance

What it doesApproximate definite integrals with Simpson's 1/3 rule and compare with the trapezoid rule.
CategoryMath
Inputs neededFunction f(x), Lower limit a, Upper limit b, Subintervals n (even)
Main outputSimpson's rule estimate
Formula∫ₐᵇ f(x) dx ≈ (Δx/3)[f₀ + 4f₁ + 2f₂ + ⋯ + 4fₙ₋₁ + fₙ]
CostFree — no sign-up, no download

How to use the Simpson's Rule Calculator

  1. 1Enter f(x) and the limits of integration.
  2. 2Choose an even number of subintervals — more subintervals means more accuracy.
  3. 3Read the estimate, Δx and the weighted table of sample points.

Inputs explained

Function f(x)
Enter the function f(x) you are working with.
Lower limit a
Enter the lower limit a you are working with.
Upper limit b
Enter the upper limit b you are working with.
Subintervals n (even)
Enter the subintervals n (even) you are working with.

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².

What do I need to enter into the Simpson's Rule Calculator?

Just 4 values: function f(x), lower limit a, upper limit b, subintervals n (even). Every field starts with a realistic example, so you can change one number at a time and watch the result update instantly.

How does the Simpson's Rule Calculator work out the 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. It applies the formula ∫ₐᵇ f(x) dx ≈ (Δx/3)[f₀ + 4f₁ + 2f₂ + ⋯ + 4fₙ₋₁ + fₙ] and shows the working so you can check each step by hand.

Is the Simpson's Rule Calculator free, and do I need an account?

It is completely free with no sign-up, no download and no usage limit. Everything is calculated in your browser, so the numbers you type never leave your device.

Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.