Find the definite integral of a function between two bounds. The calculator integrates numerically with adaptive Simpson's rule to about 10 significant digits, shades the area on a graph, and shows the antiderivative and the Fundamental Theorem check when f(x) is a simple sum of standard terms.
Last updated:
Use x as the variable. Supports + − * / ^, sin cos tan, asin acos atan, sinh cosh tanh, exp, ln, log (base 10), sqrt, cbrt, abs, pi, e.
A number, or pi, 2pi, e, sqrt(2)…
Enter your values to see the result.
Advertisement
Advertisement
How to use the Integral Calculator
Type the integrand f(x), for example x^2 + 1, sin(x) or exp(-x^2).
Enter the bounds a and b. You can type numbers or expressions such as pi or 2pi.
Press Calculate integral to get the definite integral (signed area).
Read the extras: antiderivative, total area, average value and the steps.
Compare methods in the table to see how left Riemann sums, the midpoint and trapezoidal rules converge, and download it as CSV.
Basic integration formulas
f(x)
Antiderivative ∫ f(x) dx
Example
k (constant)
k·x + C
∫ 5 dx = 5x + C
xⁿ (n ≠ −1)
xⁿ⁺¹ / (n + 1) + C
∫ x² dx = x³/3 + C
1/x
ln|x| + C
∫ from 1 to e of 1/x dx = 1
e^(kx)
e^(kx) / k + C
∫ e^(2x) dx = e^(2x)/2 + C
aˣ
aˣ / ln a + C
∫ 2ˣ dx = 2ˣ/ln 2 + C
sin(kx)
−cos(kx) / k + C
∫ from 0 to π of sin x dx = 2
cos(kx)
sin(kx) / k + C
∫ cos(3x) dx = sin(3x)/3 + C
sec²(kx)
tan(kx) / k + C
∫ sec² x dx = tan x + C
Numerical integration methods compared
Most functions have no simple antiderivative (e−x² is the classic example), so integrals are computed numerically. With n subintervals of width h = (b − a)/n:
Method
Formula on one subinterval [x₀, x₁]
Error shrinks like
Left Riemann sum
h·f(x₀)
h (halving h halves the error)
Midpoint rule
h·f((x₀ + x₁)/2)
h²
Trapezoidal rule
h·[f(x₀) + f(x₁)]/2
h²
Simpson's rule
(h/6)·[f(x₀) + 4f(xₘ) + f(x₁)]
h⁴
Adaptive Simpson's rule compares the Simpson estimate on a piece with the sum of the estimates on its two halves. If they differ by more than the tolerance, both halves are refined again, so effort is spent only where the curve bends sharply. The difference divided by 15 is added as a correction (Richardson extrapolation), which makes the method even more accurate.
Frequently asked questions
What is a definite integral?
The definite integral ∫ from a to b of f(x) dx is the signed area between the graph of f and the x-axis from x = a to x = b. Area above the axis counts as positive and area below counts as negative. If f has an antiderivative F, the integral equals F(b) − F(a) by the Fundamental Theorem of Calculus.
How accurate is the result?
The calculator uses adaptive Simpson's rule: it starts with 16 panels and keeps halving any piece whose error estimate is too large, aiming for an error below 10⁻¹¹. For smooth functions the answer is usually correct to 10 or more significant digits. When an antiderivative is found, the exact F(b) − F(a) is shown as a cross-check.
What is the difference between the integral and the total area?
The integral is signed, so parts below the x-axis subtract. The total area integrates |f(x)| instead, so every part counts as positive. For x³ − 4x from −2 to 3 the integral is 6.25 but the total area is 14.25.
Can it do improper integrals?
Yes, when the function blows up at one of the bounds, such as 1/√x from 0 to 4 (answer 4). It uses the substitution x = a + t² near that bound and checks whether the value settles; if it keeps growing, as for 1/x from 0 to 1, the calculator reports that the integral diverges. Infinite bounds are not supported; use a large number instead.
Which antiderivatives can it show?
Sums of terms like c·xⁿ (including 1/x → ln|x|), c·e^(kx), c·aˣ, c·sin(kx), c·cos(kx), sinh, cosh and sec²(kx). For anything else, such as products that need integration by parts, the numeric integral is still computed but the symbolic antiderivative is skipped.
What is Simpson's rule?
Simpson's rule approximates f by a parabola on each piece: ∫ from x₀ to x₁ ≈ (h/6)·[f(x₀) + 4f(xₘ) + f(x₁)], where xₘ is the midpoint and h the width. It is exact for polynomials up to degree 3 and converges much faster than rectangle or trapezoid sums.
What happens if b is smaller than a?
Swapping the bounds flips the sign: ∫ from b to a equals −∫ from a to b. The calculator integrates over the interval and applies that sign automatically.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.