UTILS.
Private by default
∫

Definite Integral Calculator

Numerically evaluate the definite integral of f(x) from a to b with composite Simpson's rule, and get an exact antiderivative for polynomials.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

Enter f(x) and the limits. Bounds accept numbers, pi, e, or inf / -inf.

About this tool

The Definite Integral Calculator is a free, in-browser calculus tool that computes the signed area under a curve — the definite integral of f(x) from a lower limit a to an upper limit b. It uses composite Simpson's rule, a high-accuracy numerical method that fits parabolas across pairs of subintervals: with h = (b − a)/n it evaluates (h/3)·[f(x₀) + f(xₙ) + 4·Σf(odd) + 2·Σf(even)]. The number of subdivisions n (default 1000, kept even) is adjustable for more precision.

All computation happens locally in your browser, so nothing you enter is transmitted anywhere. You can type the integrand with +, −, *, / and ^, parentheses, the constants pi and e, and functions like sin, cos, exp, ln and sqrt. The bounds accept plain numbers or small expressions such as pi or 2*e, and you may enter inf or -inf for improper integrals, which the tool handles by truncating at a large finite limit and noting the approximation.

When the integrand is a polynomial (a sum of terms like c·xᵏ), the calculator also derives an exact symbolic antiderivative F(x) and cross-checks the numerical answer against F(b) − F(a) via the Fundamental Theorem of Calculus. For example, the integral of x² from 0 to 1 is exactly 1/3 ≈ 0.3333333, matching both the Simpson estimate and the antiderivative x³/3.

Frequently asked questions

What method does it use?
Composite Simpson's rule with an even number of subintervals n. It samples f at n+1 equally spaced points and weights them 1, 4, 2, 4, …, 4, 1, giving fourth-order accuracy — far better than a basic Riemann sum for the same number of points.
Can it do improper integrals to infinity?
Partially. Enter inf or -inf as a bound and the tool truncates the region at a large finite limit and flags the result as an approximation. This works well for integrands that decay quickly (like e^(-x)) but may be inaccurate for slowly decaying ones.
Does it give an exact answer?
For polynomial integrands it derives a symbolic antiderivative and reports the exact value F(b) − F(a) alongside the numerical estimate. For other functions only the high-accuracy Simpson estimate is shown, since a closed-form antiderivative may not exist.
What is the integral of x² from 0 to 1?
Exactly 1/3 ≈ 0.3333333. The antiderivative is x³/3, so F(1) − F(0) = 1/3 − 0 = 1/3, which matches the Simpson's-rule value the calculator returns.

More tools