This definite integral calculator evaluates ∫ₐᵇ f(x) dx between two limits with steps: it finds the antiderivative, applies the Fundamental Theorem of Calculus, checks the value numerically and graphs the signed area with a Riemann sum.
Green area sits above the x-axis and counts as positive. Orange area sits below and counts as negative. The boxes show a Riemann sum.
Interactive diagram
Signed area and Riemann sum
abovepositivebelownegative
Riemann sum—
exact value—
error—
Definite integral
Antiderivative
Step-by-step solution
—
Step by step
How to Use the Definite Integral Calculator
To use the definite integral calculator, follow these 5 steps. The result and the graph update as you type.
1
Type the integrand
Use one variable, for example x^2, sin(x) or x*exp(x).
2
Enter the limits
Type numbers or constants such as 0, pi, e or sqrt(2).
3
Read the exact value
The result shows the exact form and a 14-digit decimal, checked by numeric quadrature.
4
Follow the steps
See the antiderivative, the rule used for each part and F(b) − F(a).
5
Compare a Riemann sum
Pick a rule and drag n. The error shrinks as the rectangles get thinner.
Try an example:
Definition
What Is a Definite Integral?
A definite integral is the number that measures how much a function f(x) adds up between two points, the lower limit a and the upper limit b. It is written ∫ₐᵇ f(x) dx, and its value is a single number, not a formula.
The definite integral has 4 parts:
Integral sign ∫: a stretched S for "sum", introduced by Gottfried Leibniz in 1675.
Limits of integration a and b: the lower limit at the bottom and the upper limit at the top.
Integrand f(x): the function being added up.
Differential dx: the integration variable, here x.
Graphically, the definite integral gives the signed area between the graph of f and the x-axis from x = a to x = b. The same number means different things in different settings: total distance from a velocity, total energy from a rate of energy use, total volume from a flow rate. The word "definite" points to the fixed limits; the indefinite integral has no limits and returns a family of functions instead.
A car with velocity v(t) = 3t² meters per second covers ∫₀⁴ 3t² dt = 64 m (about 210 ft) in its first 4 seconds. Drag the slider to watch the distance build up.
Accumulation explorer: distance from a changing velocity
speed at b—
distance—
distance—
formulab³ m
The shaded area under v(t) is the distance travelled. At b = 4 s, the area is 64 m.
Formula
Definite Integral Formula (Fundamental Theorem of Calculus)
The definite integral formula is ∫ₐᵇ f(x) dx = F(b) − F(a), where F is any antiderivative of f. This is the Fundamental Theorem of Calculus (FTC), part 2, and it holds whenever f is continuous on [a, b].
The FTC has 2 parts. Part 1 says the area function A(x) = ∫ₐˣ f(t) dt has derivative A′(x) = f(x), so integration and differentiation undo each other. Part 2 turns that fact into the evaluation formula. Isaac Newton and Gottfried Leibniz found the connection independently in the 1660s and 1670s.
The formula replaces an infinite sum of thin rectangles with 2 function values. On the graph, ∫ₐᵇ f(x) dx equals the rise of the antiderivative curve F between x = a and x = b. For f(x) = x² and F(x) = x³/3 on [1, 2], the rise is 8/3 − 1/3 = 7/3 ≈ 2.3333.
FTC explorer: the area under f equals the rise of F
F(a)—
F(b)—
F(b) − F(a)—
shaded area—
Green: f(x) = x² and its shaded area. Teal: F(x) = x³/3. The red bar is F(b) − F(a), and it always matches the shaded area.
Method
How to Evaluate a Definite Integral
To evaluate a definite integral, find an antiderivative, substitute the upper and lower limits, and subtract. The 3 steps below evaluate ∫₀² (3x² + x − 1) dx, the example used on eMathHelp's Definite and Improper Integral Calculator.
01
Step 1: Find the antiderivative
To find the antiderivative, reverse each derivative rule term by term. The power rule raises each exponent by 1 and divides by the new exponent.
Leave out + C: it cancels in step 3. Harder integrands need substitution, integration by parts or partial fractions.
02
Step 2: Substitute the upper and lower limits
To substitute the limits, evaluate the antiderivative at x = b and at x = a separately.
Write each value in brackets before simplifying; a minus sign lost here is the most common slip.
03
Step 3: Subtract F(a) from F(b)
To finish, subtract the lower-limit value from the upper-limit value, in that order.
Subtracting the other way gives −8, the integral with reversed limits.
iVerify your answer by differentiating F: (x³ + x²/2 − x)′ = 3x² + x − 1. The calculator runs this check on every antiderivative and compares the result with a numeric integral accurate to about 14 digits.
Geometry
Definite Integral as Signed Area
The definite integral is the signed area between the curve and the x-axis: area above the axis counts as positive, and area below the axis counts as negative.
Net area vs total area
Net area is the definite integral ∫ₐᵇ f(x) dx, and total area is ∫ₐᵇ |f(x)| dx. Net area lets positive and negative parts cancel; total area adds every part as positive. The integral of sin x from 0 to 2π is 0, but the total area of the sine wave over [0, 2π] is 4 square units.
Use net area for net change, such as displacement from a velocity. Use total area for the actual size of a region, such as total distance or paint coverage.
Area below the x-axis
Area below the x-axis counts as negative in a definite integral. When the graph dips below the x-axis, f(x) < 0, so each thin rectangle f(x)·dx has negative height. For f(x) = x³ − x on [−1, 2], the parts are +1/4 on [−1, 0], −1/4 on [0, 1] and +9/4 on [1, 2]: net 9/4 = 2.25, total 11/4 = 2.75.
To get the area of a region below the axis, split the interval at the zeros of f and take the absolute value of each piece. The calculator reports both numbers, and its graph shades positive parts green and negative parts orange.
Signed area explorer: net vs total
area above—
area below—
net (integral)—
total ∫|f|—
Approximation
Riemann Sums and the Definite Integral
A Riemann sum approximates a definite integral with n rectangles of width Δx = (b − a)/n, and the definite integral is the limit of Riemann sums as n → ∞. Bernhard Riemann gave this definition in 1854.
Left, right and midpoint sums
Left, right and midpoint sums differ in where each rectangle takes its height: the left end, the right end or the middle of its subinterval. For an increasing function, the left sum underestimates and the right sum overestimates. The midpoint sum sits much closer than either.
Trapezoidal rule
The trapezoidal rule replaces each rectangle with a trapezoid joining f(xi−1) and f(xi), and equals the average of the left and right sums. Its error is about twice the midpoint error with the opposite sign. Both errors drop by a factor of 4 each time n doubles.
Simpson's rule combines the 2: S = (2M + T)/3. It is exact for polynomials up to degree 3, so (2·8.859375 + 9.28125)/3 = 9 exactly for x² on [0, 3] with n = 4.
Riemann sum explorer: ∫₀³ x² dx = 9
sum—
exact9
error—
relative error—
Riemann sums for the integral of x squared from 0 to 3
n
Left sum
Right sum
Midpoint sum
Trapezoidal rule
Trapezoid error
4
5.90625
12.65625
8.859375
9.28125
+0.28125
8
7.3828125
10.7578125
8.96484375
9.0703125
+0.0703125
16
8.1738281
9.8613281
8.9912109
9.0175781
+0.0175781
32
8.5825195
9.4262695
8.9978027
9.0043945
+0.0043945
100
8.86545
9.13545
8.999775
9.00045
+0.00045
Rules
Properties of Definite Integrals
There are 7 properties of definite integrals that shorten most calculations: zero width, reversed limits, constant multiple, sum and difference, interval splitting, symmetry and comparison.
Properties of definite integrals
Property
Rule
Example
Zero width
Reversed limits
Constant multiple
Sum and difference
Interval splitting
Symmetry
odd: 0; even:
Comparison
Order of the limits
Reversing the limits
Reversing the limits changes the sign of the definite integral: . F(a) − F(b) is the negative of F(b) − F(a), so ∫₃⁰ x² dx = −9. The calculator accepts a lower limit larger than the upper limit and returns the negative value.
Additivity
Splitting the interval
Splitting the interval at any point c gives . Split piecewise functions and absolute values where the formula changes: ∫₋₁² |x| dx = ∫₋₁⁰ (−x) dx + ∫₀² x dx = 1/2 + 2 = 5/2.
Symmetry
Odd and even functions on [−a, a]
An odd function integrates to 0 on [−a, a], and an even function integrates to twice its integral on [0, a]. Odd functions satisfy f(−x) = −f(x), such as x³ and sin x; even functions satisfy f(−x) = f(x), such as x² and cos x. ∫₋₂² x³ dx = 0 and ∫₋₂² x² dx = 2 · 8/3 = 16/3.
Mean
Average Value of a Function
The average value of a function on [a, b] is favg = (1/(b − a)) ∫ₐᵇ f(x) dx: the definite integral divided by the length of the interval. It is the height of the rectangle on [a, b] with the same area as the region under the curve.
The average value of sin x on [0, π] is 2/π ≈ 0.6366; the average of x² on [0, 3] is 9/3 = 3. The Mean Value Theorem (MVT) for integrals guarantees that a continuous function reaches its average value at least once: sin c = 2/π at c ≈ 0.6901 and c ≈ 2.4515.
Average values show up as average speed from a velocity, average temperature over a day and average current over a cycle. The calculator lists favg next to every definite integral.
Average value explorer: the rectangle with equal area
function—
integral—
average value—
rectangledashed
The dashed rectangle has height favg and the same area as the green region. Red dots mark where f(c) = favg.
Numerical integration
Definite Integrals With No Elementary Antiderivative
A definite integral with no elementary antiderivative still has an exact numeric value, and numerical integration finds it. Functions such as e−x², sin x / x, sin(x²) and √(1 + x³) have no antiderivative built from polynomials, roots, exponentials, logarithms and trig functions; Liouville's theorem proves this.
The Fundamental Theorem of Calculus does not help there, so the calculator switches to adaptive Gauss–Kronrod quadrature. It samples f at 15 carefully placed points per piece and splits the interval until the error estimate falls below about 10⁻¹³. Hardware calculators work the same way: fnInt( in the MATH menu of a TI-84 Plus, the ∫ key on a Casio fx-991EX, and the integral command in Desmos, GeoGebra and Wolfram Alpha all return numeric values.
Some of these integrals have names: ∫₀ˣ e−t² dt leads to the error function erf, and ∫₀ˣ sin t / t dt is the sine integral Si(x).
Definite integrals with no elementary antiderivative
Integral
Value
0.7468241328
1.1114479705
1.8519370520
Si(π)
0.3102683017
Fresnel
0.9045242379
Fresnel
0.7834305107
sophomore's dream
Worked examples
Worked Examples
Here are 4 worked examples of definite integrals: a polynomial, a trigonometric function, an integral by parts and one with an exact answer in π. Each graph shades the area, and each button loads the problem into the calculator.
power rule
Polynomial: ∫₀³ x² dx
Antiderivative:
Limits:
Subtract:
Answer: square units. The average value on [0, 3] is 3.
trig
Trigonometric: ∫₀^π sin x dx
Antiderivative:
Limits:
Subtract:
Answer: . One arch of the sine curve has area exactly 2.
by parts
Integration by parts: ∫₀¹ x eˣ dx
Choose:
Parts:
Limits:
Answer:
exact π
Exact answer with π: ∫₀¹ 1/(1 + x²) dx
Antiderivative:
Limits:
Subtract:
Answer: . Multiplying by 4 gives π itself.
Comparison
Definite vs Indefinite Integral
The difference between a definite and an indefinite integral is that a definite integral has limits and returns a number, while an indefinite integral has no limits and returns a family of functions F(x) + C.
Definite and indefinite integrals compared
Definite integral
Indefinite integral
Notation
Result
a number
a function plus C
Example
Constant C
cancels in F(b) − F(a)
stays in the answer
Meaning
signed area, total change
all antiderivatives
Connection
Fundamental Theorem of Calculus: ∫ₐᵇ f dx = F(b) − F(a), with F any indefinite integral of f
iIntegrals with an infinite limit (Type I, infinite intervals) or a vertical asymptote (Type II, discontinuous integrands) are improper integrals, a Calculus II topic. Use the Improper Integral Calculator for those, or the Indefinite Integral Calculator for the antiderivative with every step.
Questions
Frequently Asked Questions
Can a definite integral be negative?
Yes, a definite integral is negative when more of the area lies below the x-axis than above it. ∫ from π to 2π of sin x dx = −2, since the sine curve sits below the axis on that interval. A negative result means net change downward, not a mistake; take ∫|f(x)| dx for the total area, which is never negative.
What happens if the limits are the same?
The definite integral equals 0 when the lower and upper limits are the same, since an interval of zero width has no area: ∫ from 2 to 2 of x² dx = F(2) − F(2) = 0. This holds for every integrable function.
What if the lower limit is larger than the upper limit?
The definite integral changes sign when the lower limit is larger than the upper limit: ∫ from b to a of f(x) dx = −∫ from a to b of f(x) dx. ∫ from 3 to 0 of x² dx = −9. The calculator accepts limits in either order and applies this rule.
Is the definite integral the same as area?
No, the definite integral equals the area only when f(x) ≥ 0 on the whole interval. Otherwise the integral gives net (signed) area, with parts below the x-axis subtracted. ∫ from 0 to 2π of sin x dx = 0, while the area between the sine curve and the axis is 4 square units.
Why is there no + C in a definite integral?
There is no + C in a definite integral, since the constant cancels when F(a) is subtracted from F(b): [F(b) + C] − [F(a) + C] = F(b) − F(a). Any antiderivative gives the same number, so the constant is left out.
What if the function is undefined inside the interval?
The integral becomes an improper integral when the function is undefined inside the interval, and the Fundamental Theorem of Calculus no longer applies directly. Split the interval at the bad point and take a one-sided limit on each side. ∫ from −1 to 1 of 1/x² dx diverges, though plugging into −1/x gives a false −2. The calculator detects the bad point and switches to a convergence test.
More tools
Related Calculators
There are 6 related calculators on this site for antiderivatives, improper integrals, areas, volumes and arc length.
This definite integral calculator evaluates a definite integral between two limits with steps, applies the Fundamental Theorem of Calculus, and shows signed and total area, the average value and Riemann sums on a graph.