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.
- 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.
| i | xᵢ | f(xᵢ) | weight |
|---|---|---|---|
| 0 | 0 | 1 | 1 |
| 1 | 0.25 | 1.007782 | 4 |
| 2 | 0.5 | 1.06066 | 2 |
| 3 | 0.75 | 1.192424 | 4 |
| 4 | 1 | 1.414214 | 2 |
| 5 | 1.25 | 1.718466 | 4 |
| 6 | 1.5 | 2.09165 | 2 |
| 7 | 1.75 | 2.52178 | 4 |
| 8 | 2 | 3 | 1 |
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 does | Approximate definite integrals with Simpson's 1/3 rule and compare with the trapezoid rule. |
|---|---|
| Category | Math |
| Inputs needed | Function f(x), Lower limit a, Upper limit b, Subintervals n (even) |
| Main output | Simpson's rule estimate |
| Formula | ∫ₐᵇ f(x) dx ≈ (Δx/3)[f₀ + 4f₁ + 2f₂ + ⋯ + 4fₙ₋₁ + fₙ] |
| Cost | Free — no sign-up, no download |
How to use the Simpson's Rule Calculator
- 1Enter f(x) and the limits of integration.
- 2Choose an even number of subintervals — more subintervals means more accuracy.
- 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.