Integral Calculator
Definite integrals by Simpson's rule, with a second method as a cross-check.
Use x as the variable. Example: 1/(1+x^2) between 0 and 1 gives about 0.785.
Most integrals people actually need have no closed form — the ones that do are the exceptions, which is why they fill the back of textbooks. Numerical integration answers the question that matters ('what is the area') without needing an antiderivative.
Simpson's rule fits a parabola through each pair of adjacent intervals, and it is exact for any polynomial up to degree three. That is why 1,000 intervals give about eight correct digits for a smooth function, and why the midpoint estimate is shown next to it: when the two disagree, the function is not smooth inside the interval and neither answer is trustworthy.
How to use it
- Type f(x). Use x as the variable and brackets for grouping.
- Set the bounds. Reversing them flips the sign, which is the correct convention.
- Choose the number of intervals. Simpson's rule needs an even count; an odd number is rounded up silently, and the actual count is shown.
When the two estimates diverge
Simpson's rule and the midpoint rule are both fourth- and second-order accurate respectively, and for a smooth integrand they agree to several digits. A large difference means the integrand has a discontinuity, a kink, or a pole inside the interval — 1/x between −1 and 1 is the classic example, where the integral does not exist but every numerical method returns a number anyway.
Increasing the interval count narrows the gap when the function is smooth, and does not when it is not. That behaviour is itself the diagnostic: if doubling from 1,000 to 20,000 intervals changes the answer in the third digit, stop trusting the result and look at the function.
Reviewed 2026-10-26. This tool runs entirely in your browser — no server, no account, and nothing you generate is stored.
Frequently asked questions
Does this give an exact antiderivative?
No. It evaluates a definite integral numerically. For the symbolic form — ∫x²dx = x³/3 + C — a computer algebra system is required, and the answer is a formula rather than a number.
Why does the interval count matter?
Error in Simpson's rule falls with the fourth power of the interval width, so doubling the count cuts the error by roughly 16. At 1,000 intervals a smooth function is usually correct to eight digits.
Can I integrate across a singularity?
You can run it, but the answer is meaningless — the method will return a large number rather than reporting divergence. Split the integral at the pole, or check whether the improper integral converges by hand first.
What about functions with a vertical asymptote at a bound?
They will usually produce a very large or infinite result. The midpoint row and the difference row are the warning signs; if they differ wildly, the integral is improper and needs a limit, not a quadrature.
Related tools
More from Calculators.