Integral Calculator
Type any function of x, set the lower and upper limits, and get the definite integral with the full step-by-step working shown.
Formulas verified against standard references. Calculator logic tested with verified worked examples. Published: November 2, 2026 | Last reviewed: November 2026. Our methodology
What Is a Definite Integral?
A definite integral is one number that measures the signed area between a curve and the x axis, from a lower limit a to an upper limit b. Where the curve sits above the axis, the area counts as positive. Where it dips below the axis, the area counts as negative. The integral is the net total after the two cancel out.
The same number answers accumulation questions in everyday life. If the curve shows velocity over time, the integral gives total distance. With real units on the axes, the area becomes a real quantity.
This calculator takes your function and limits and estimates the integral with the composite Simpson rule, fitting parabolas through groups of three sample points and adding their areas. The breakdown shows every sample point used.

The Definite Integral Formula
The Fundamental Theorem of Calculus, Part 2, connects the integral to the antiderivative. If F is any function with F'(x) = f(x), then the integral from a to b of f(x) dx equals F(b) minus F(a). In symbols this is written as integral_a^b f(x) dx = F(b) - F(a).
Each symbol has one job. f(x) is the integrand, the function being integrated. x is the variable. dx says the integration runs along x. a is the lower limit and b is the upper limit. F is the antiderivative, and F(b) - F(a) is the net change of F across the interval.
The calculator uses the composite Simpson rule, which reads integral approx (h/3) [f(x0) + 4 f(x1) + 2 f(x2) + 4 f(x3) + ... + f(xn)], with h = (b - a) / n and n even. It doubles the subinterval count from 8 until the value settles within 1e-10. Simpson's rule is exact for polynomials up to degree 3 and highly accurate for smooth functions. For quick checks of trig values like sin(x), the trigonometry calculator is a handy companion.

Worked Example: x Squared from 0 to 3
Find the integral of x^2 from 0 to 3. The antiderivative is x^3 / 3, so the exact answer is 27/3 - 0 = 9. Here is the calculator's path with Simpson's rule and 8 subintervals.
- h = (3 - 0) / 8 = 0.375.
- Sample points: 0, 0.375, 0.75, 1.125, 1.5, 1.875, 2.25, 2.625, 3.
- Function values: 0, 0.140625, 0.5625, 1.265625, 2.25, 3.515625, 5.0625, 6.890625, 9.
- Weighted sum: (0 + 9) + 4 x 11.8125 + 2 x 7.875 = 72.
- Multiply by h/3 = 0.125. The result is 0.125 x 72 = 9.
The calculator then refines with more subintervals until the value stops changing, confirming 9. If you want to check the arithmetic of any step by hand, the scientific calculator handles the squaring and summing without rounding errors.
How to Use the Integral Calculator
- Type the function in the Integrand field, for example x^2, sin(x), or e^x. Use ^ for powers, sqrt(), sin(), cos(), tan(), ln(), exp(), and the constants pi and e.
- Choose the variable if your expression uses t or u instead of x.
- Enter the lower limit a and the upper limit b. Each accepts a number or an expression like pi/2.
- Press Calculate. The answer appears first, then the step-by-step breakdown.
- Press Reset to clear all fields and start over.
What the Answer Means: Signed Area
A definite integral can be positive, negative, or zero. Every part of the curve above the x axis adds to the total, and every part below it subtracts.
A full wave of sin(x) from 0 to 2pi integrates to 0. The hump above the axis and the hump below it cancel exactly. That zero is the correct signed answer, not an error.
Reversed limits flip the sign, so the integral of x^2 from 3 to 0 is -9. When both limits are equal, the integral is 0. The exponent calculator is useful for checking individual terms by hand.
Common Mistakes to Avoid
The most common mistake is entering the limits in the wrong order and missing the sign change. Check which limit is lower first.
The second is asking for an integral that does not exist as a finite number. The integral of 1/x from -1 to 1 crosses a singularity at 0, so it has no finite value. The calculator detects this and warns you instead.
The third is a typo in the expression. A missing parenthesis or a misspelled function name stops the parser, and the error message points at the exact spot. Fix that spot and calculate again.

Frequently asked questions
What is a definite integral?
A definite integral is the signed area between the curve y = f(x) and the x axis from x = a to x = b. Area above the axis counts as positive and area below it counts as negative, so the result is the net total.
What is the formula for a definite integral?
The integral from a to b of f(x) dx equals F(b) minus F(a), where F is any antiderivative of f. This is the Fundamental Theorem of Calculus, Part 2. The calculator estimates the same number with the composite Simpson rule.
How do I type a function into the calculator?
Use ^ for powers, sqrt() for square roots, sin(), cos(), tan(), ln(), and exp() for the exponential, plus the constants pi and e. The variable is x by default, or pick t or u.
What does it mean if the integral is negative?
It means more of the curve sits below the x axis than above it between your limits. The number is still correct because a definite integral measures signed area, not plain area.
Can the upper limit be smaller than the lower limit?
Yes. Reversed limits flip the sign, so the integral of x^2 from 3 to 0 is -9. The calculator integrates forward and negates the result.
What if the function has no simple antiderivative?
The calculator still returns an accurate number. The composite Simpson rule estimates the integral numerically, so e^(x^2) integrates fine. From 0 to 1 it gives about 1.4627.
Related calculators
Scientific Calculator
Advanced math with trig, logs, and exponents.
Use calculatorModulo Calculator
Remainder of any division, with full working steps.
Use calculatorTrigonometry Calculator
Sine, cosine, tangent, and inverse trig functions.
Use calculatorExponent Calculator
Powers and exponents with step-by-step working.
Use calculatorLogarithm Calculator
Logs of any base with clear working steps.
Use calculatorSquare Root Calculator
Square roots with exact and decimal answers.
Use calculatorFraction Calculator
Add, subtract, multiply, and divide fractions.
Use calculatorPercentage Calculator
Percent of a number, change, and increase.
Use calculatorQuadratic Equation Solver
Solve quadratics with the quadratic formula.
Use calculatorHalf-Life Calculator
Solve decay, time, or amount with full steps.
Use calculator