Math calculator
Definite Integral Calculator
Fill in the bounds and the function just like written integral notation, and get the net signed area with the region shaded on a graph.
The bounds accept constants too, like pi/2 or e. Functions: sin, cos, tan, asin, acos, atan, sqrt, abs (or |x|), ln, log, exp — trig uses radians. The buttons insert into whichever box you clicked last.
Definite integral (net signed area)
9
Steps
How it works
Enter the function f(x) and the two bounds exactly as they appear in integral notation. The calculator evaluates the definite integral numerically using composite Simpson's rule, which fits a parabola through each pair of subintervals and sums the areas underneath.
With 1,000 subintervals, Simpson's rule is exact for polynomials up to degree three and accurate to many decimal places for smooth functions like sin(x) or e^(-x^2). A trapezoid-rule estimate is shown alongside as an independent cross-check — when the two agree closely, you can trust the digits they share.
Worked example
For f(x) = x² from 0 to 3, the antiderivative is x³/3, so the exact answer is 3³/3 − 0³/3 = 9. The calculator returns 9 exactly, because Simpson's rule has no error for polynomials of degree three or lower. The shaded region on the graph is the area being measured.
The result is the net signed area: regions below the x-axis count as negative. For example, sin(x) from 0 to 2π integrates to 0, because the positive and negative lobes cancel.
Step-by-step solutions
For a wide range of functions, the calculator finds the antiderivative symbolically and shows every step: the rule applied to each term, the combined antiderivative F(x) + C, the values F(b) and F(a), and the final subtraction. Covered rules include the power rule (including negative and fractional exponents and linear substitutions like (2x+1)^3), sums and constant multiples, sine, cosine, and tangent, exponentials e^(ax+b) and a^x, logarithms 1/u and ln(x), absolute values |ax+b|, and the arctangent form 1/(1+x²).
When a function has no elementary antiderivative — e^(−x²) is the famous example — or falls outside the rule set, the steps instead explain the numerical method: how the interval is sliced, how Simpson's rule weights the samples, and how the trapezoid cross-check confirms the digits. Every symbolic answer is verified against the numerical result before it is shown.
Supported syntax
- Operators: + − * / ^ and parentheses, with implicit multiplication (2x, 3sin(x), (x+1)(x−2)).
- Constants: pi (or π) and e — usable in both the function and the bounds, e.g. a lower bound of pi/2. The π, e, √, |x|, and ^ buttons insert symbols into whichever box you last clicked.
- Functions: sin, cos, tan, asin, acos, atan, sqrt (or √), abs — written abs(x) or with bars as |x| — ln (natural log), log (base 10), exp.
- Trigonometric functions work in radians.
- Result formats: Auto keeps answers exact when the value matches an integer, a simple fraction, or a multiple of π, e, √π, √2, √3, ln 2, or ln 10 — so ∫ of 1/(1+x²) from 0 to 1 shows π/4. Decimal, Fraction, and Mixed number force a specific style, and the decimal value always appears in the details.
Frequently asked questions
Does the calculator show the steps?
Yes. When the integrand matches the built-in antiderivative rules, the Steps panel lists the rule used for each term, the full antiderivative F(x), and the evaluation F(b) − F(a) with exact values. For functions outside the rule set it explains the numerical Simpson's-rule computation instead.
Is the answer exact or an approximation?
It is a numerical approximation, but a very accurate one for smooth functions — typically correct to 8 or more decimal places, and exact for polynomials up to degree three. When the numeric result matches a simple fraction or a multiple of a constant like π or e within tolerance, the calculator displays that exact form. Compare the Simpson and trapezoid values: digits they agree on are reliable.
Why do I get no result for functions like 1/x from −1 to 1?
That integral crosses a point where the function blows up to infinity, making it an improper integral. Numerical integration cannot evaluate it, so the calculator reports that the function is not defined everywhere on the interval instead of showing a misleading number.
Can the lower bound be larger than the upper bound?
Yes. Swapping the bounds flips the sign of the result, exactly as in the standard identity ∫ᵃᵇ f(x) dx = −∫ᵇᵃ f(x) dx.
Does the calculator use degrees or radians?
Radians, which is the standard convention in calculus. To integrate over degrees, convert first: 180° equals pi radians.