Simpson's Rule Calculator
Approximate a definite integral with Simpson's 1/3 rule, with a node table, graph and error estimate.
Simpson's Rule Calculator
Simpson's 1/3 rule
∫ₐᵇ f(x) dx ≈ (h/3) [f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + … + 4f(xn−1) + f(xn)]Split [a, b] into n equal subintervals of width h = (b − a)/n, with n even. Each pair of subintervals is approximated by the parabola through its three points, giving weights 1, 4, 2, 4, …, 2, 4, 1. The error shrinks like h⁴ for smooth functions. If you enter an odd n, the tool asks you to change it rather than changing it for you.
Your data is processed locally in your browser and is not uploaded to OZVILO servers.
How to use the Simpson's Rule Calculator
- 1Enter the function f(x), the limits a and b, and an even number of subintervals n.
- 2Press Calculate.
- 3Read the approximation, step size h, weighted sum and estimated error.
- 4Check the graph and the table of nodes and weights, and download it as CSV.
Examples
A polynomial
- Input
- ∫₀³ x² dx, n = 6
- Result
- 9 — exact, because Simpson's rule is exact for cubics
sin(x)
- Input
- ∫₀^π sin(x) dx, n = 10
- Result
- ≈ 2.000110 (exact value 2), estimated error ≈ 1.1e−4
Odd n
- Input
- n = 7
- Result
- Asks for an even n (6 or 8) instead of changing it
Simpson's Rule Calculator features
- Simpson's 1/3 rule with full working
- Error estimate from n and 2n
- Graph with nodes
- Safe expression parser
- CSV download
Frequently asked questions
Why must n be even?
Simpson's rule fits a parabola through each pair of subintervals (three points), so the subintervals must pair up. If you enter an odd n, the tool explains this and suggests a value rather than silently changing yours.
What is the formula?
∫ₐᵇ f(x) dx ≈ (h/3)[f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + … + 4f(xₙ₋₁) + f(xₙ)], with h = (b − a)/n.
How accurate is it?
For smooth functions the error shrinks like h⁴, so doubling n cuts it about 16-fold. The estimate shown compares n with 2n subintervals; it's a guide and can be misleading if f has a singularity or sharp corner in the interval.
What happens if f(x) isn't defined somewhere?
If f is undefined, infinite or complex at any node — such as 1/x at 0 or sqrt(x) for negative x — the tool stops and tells you where, instead of returning a wrong number.
Related tools
- Available
Jacobian Matrix Calculator
Find the symbolic Jacobian of a set of functions, evaluate it at a point and get its determinant.
CalculatorsOpen tool - Available
Convolution Calculator
Convolve two discrete sequences — linear by default, or N-point circular — with step-by-step sums and plots.
CalculatorsOpen tool - Available
Fibonacci Sequence Calculator
Generate Fibonacci numbers exactly — the nth term, the first N terms or a range — even with thousands of digits.
CalculatorsOpen tool - Available
Compound Interest Calculator
See how savings grow with compound interest, any compounding frequency and regular contributions.
CalculatorsOpen tool