Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Definite Integral Calculator

Enter a function and two limits of integration to get the exact value of the definite integral, with the antiderivative, the evaluation F(b) − F(a) and, for improper integrals, the limit that decides convergence.

A number, pi, e, inf or -inf.

Examples

About the Definite Integral Calculator

A definite integral turns a function and an interval into a single number. Geometrically it is the signed area between the curve and the horizontal axis; physically it can be a distance travelled, work done, total charge or accumulated cost. Whatever the context, the calculation follows the same pattern: find an antiderivative, evaluate it at the two ends of the interval and subtract.

This calculator carries out that pattern in full and writes down every stage. It finds the antiderivative with the same rule-based engine as the indefinite integral calculator, evaluates it at the upper and lower limits, and keeps the answer exact whenever it can, so you see 13\frac13, π\pi or ln⁡2\ln 2 rather than a long decimal. A decimal approximation is shown alongside so you can compare it with a textbook answer or a graph.

Not every integral is that straightforward. If a limit is infinite, or the function blows up inside the interval, the integral is improper, and the calculator rewrites it as a limit and tells you whether it converges or diverges. If the function has no elementary antiderivative, such as e−x2e^{-x^2}, it switches to adaptive numerical integration and says clearly that the result is an approximation.

What is a definite integral?

The definite integral ∫abf(x) dx\int_a^b f(x)\,dx is defined as the limit of Riemann sums: chop the interval from aa to bb into thin strips, multiply the height of the function in each strip by its width, add the products and let the strips become infinitely thin. For a continuous function this limit always exists, and it measures the signed area under the graph.

"Signed" is the important word. Area above the axis counts as positive and area below counts as negative, so ∫−11x3 dx=0\int_{-1}^{1} x^3\,dx = 0 even though the curve encloses two visible regions. If you want the total geometric area, integrate the absolute value or split the interval where the function changes sign.

Computing Riemann sums directly is slow, which is why the fundamental theorem of calculus matters so much. It says that if FF is any antiderivative of a continuous ff, the whole limit collapses to F(b)−F(a)F(b) - F(a). Differentiation and integration are inverse processes, and the definite integral is the place where that fact becomes a practical tool.

How to use the Definite Integral Calculator

  1. Type the integrand in terms of x, for example x^2, sin(x) or 1/(1+x^2).
  2. Enter the lower limit and the upper limit. Numbers, fractions and constants such as pi, e or 2*pi are all accepted.
  3. For an infinite limit, type inf or -inf; the calculator will treat the integral as improper.
  4. Press Evaluate integral to see the antiderivative, the evaluation at both limits and the final value.
  5. Read the verdict on improper integrals carefully: an answer of "diverges" means the area is not finite.

Formulas

Fundamental theorem of calculus

∫abf(x) dx=F(b)−F(a),F′(x)=f(x)\int_a^b f(x)\,dx = F(b) - F(a),\quad F'(x) = f(x)

Reversing the limits

∫baf(x) dx=−∫abf(x) dx\int_b^a f(x)\,dx = -\int_a^b f(x)\,dx

Splitting the interval

∫abf dx=∫acf dx+∫cbf dx\int_a^b f\,dx = \int_a^c f\,dx + \int_c^b f\,dx

Improper integral (infinite limit)

∫a∞f(x) dx=lim⁡t→∞∫atf(x) dx\int_a^{\infty} f(x)\,dx = \lim_{t\to\infty} \int_a^{t} f(x)\,dx

Average value on [a, b]

favg=1b−a∫abf(x) dxf_{\text{avg}} = \frac{1}{b-a}\int_a^b f(x)\,dx

Worked example: ∫₀¹ x² dx

The worked example below is computed live by the calculator for ∫01x2 dx\int_0^1 x^2\,dx, the area under the parabola y=x2y = x^2 between x=0x = 0 and x=1x = 1. The power rule gives the antiderivative F(x)=x33F(x) = \frac{x^3}{3}. Evaluating it gives F(1)=13F(1) = \frac13 and F(0)=0F(0) = 0, so the integral equals 13≈0.3333\frac13 \approx 0.3333.

That answer is easy to sanity-check. The region sits inside the unit square, so the area must be less than 1, and the parabola hugs the axis near zero, so a value well below one half is reasonable. Archimedes found this same one-third result for a parabolic segment more than two thousand years before calculus existed.

The solution below is generated by the same engine that powers the calculator above.

Final answer

∫01x2 dx=13≈0.3333333333\int_{0}^{1} {x}^{2}\,dx = \frac{1}{3} \approx 0.3333333333

How we read your problem

Evaluate the definite integral of x² from x = 0 to x = 1 (sign-adjusted area).

∫01x2 dx\int_{0}^{1} {x}^{2}\,dx

Step-by-step solution

  1. Power rule: ∫ xⁿ dx = xⁿ⁺¹/(n+1)

    ∫x2 dx=x33\int {x}^{2}\,dx = \frac{{x}^{3}}{3}
  2. Antiderivative

    F(x)=x33F(x) = \frac{{x}^{3}}{3}
  3. Evaluate F at the limits

    F(1)=13,F(0)=0F(1) = \frac{1}{3},\quad F(0) = 0
  4. Subtract: F(upper) − F(lower)

    13−(0)=13≈0.3333333333\frac{1}{3} - \left(0\right) = \frac{1}{3} \approx 0.3333333333

Formulas used

  • Fundamental theorem of calculus

    ∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)

The definite integral is the net signed area: regions above the axis count positively, regions below count negatively. With an antiderivative F, it equals F(b) − F(a).

Verification

  • Antiderivative verified by differentiation ✓
  • Adaptive Simpson's rule gives 0.3333333333 ✓

Detailed explanation

Why F(b) − F(a) gives the area

Imagine an area function A(t)A(t) that measures the area under ff from aa up to a moving point tt. If you nudge tt forward by a tiny amount hh, the extra area is a thin strip of height about f(t)f(t) and width hh, so A(t+h)−A(t)≈f(t) hA(t+h) - A(t) \approx f(t)\,h. Dividing by hh and letting it shrink shows that A′(t)=f(t)A'(t) = f(t): the area function is an antiderivative of ff.

Any two antiderivatives differ only by a constant, so A(t)=F(t)+CA(t) = F(t) + C for whichever antiderivative FF you found. Because A(a)=0A(a) = 0, the constant is −F(a)-F(a), and the full area is A(b)=F(b)−F(a)A(b) = F(b) - F(a). This is also why the constant of integration never appears in a definite integral: it cancels in the subtraction.

Signed area and absolute area

When a graph dips below the axis, the integral subtracts that part. For ∫02πsin⁡x dx\int_0^{2\pi} \sin x\,dx the positive hump and the negative hump cancel exactly, and the answer is 0. That is the correct value of the integral, but it is not the area you would shade on a graph.

To find the total area, locate the zeros of the function inside the interval, integrate on each piece and add the absolute values of the pieces. The calculator accepts abs(), so entering abs(x-1) from 0 to 2 returns 1, the combined area of two triangles, while x-1 over the same interval returns 0.

Improper integrals: infinite limits and vertical asymptotes

An integral is improper when an endpoint is infinite or when the integrand becomes unbounded somewhere on the interval. The value is then defined as a limit. For ∫1∞1x2 dx\int_1^{\infty} \frac{1}{x^2}\,dx, the calculator finds F(x)=−1xF(x) = -\frac1x, takes the limit as x→∞x \to \infty, which is 0, subtracts F(1)=−1F(1) = -1 and reports that the integral converges to 1.

The same idea handles asymptotes. ∫011x dx\int_0^1 \frac{1}{\sqrt{x}}\,dx converges to 2 because 2x2\sqrt{x} has a finite limit at 0, while ∫011x dx\int_0^1 \frac1x\,dx diverges because ln⁡x\ln x heads to −∞-\infty. Both integrands blow up at zero; what decides the outcome is how fast. If the singularity is in the middle of the interval, the integral must be split there and each half must converge separately.

Over the whole real line both ends need a limit. The calculator evaluates ∫−∞∞11+x2 dx\int_{-\infty}^{\infty} \frac{1}{1+x^2}\,dx as arctan⁡x\arctan x from −π2-\frac{\pi}{2} to π2\frac{\pi}{2} and returns exactly π\pi.

When there is no formula: numerical integration

Some perfectly ordinary functions have antiderivatives that cannot be written with elementary functions. The bell-shaped e−x2e^{-x^2}, sin⁡xx\frac{\sin x}{x} and 1+x3\sqrt{1 + x^3} are standard examples. Their definite integrals still exist; they simply have to be computed numerically.

In that case the calculator uses adaptive Simpson's rule, which fits parabolas to small pieces of the curve and subdivides wherever the estimate is not yet accurate, aiming for an error below 10−1010^{-10}. For ∫01e−x2 dx\int_0^1 e^{-x^2}\,dx it reports approximately 0.7468241328, labelled as a numerical approximation so it is never confused with an exact value.

Useful properties that save work

Swapping the limits changes the sign, so ∫10x2 dx=−13\int_1^0 x^2\,dx = -\frac13. An integral over an interval of zero width is zero. For an odd function such as x3x^3 or sin⁡x\sin x, the integral over a symmetric interval [−a,a][-a, a] is zero, and for an even function it is twice the integral from 0 to aa. Spotting symmetry before calculating can turn a messy problem into a one-line answer.

Integrals are also linear: constants factor out and sums split into separate integrals. Combined with the interval-splitting rule, these properties let you break a complicated region into pieces that are each easy to handle.

Common mistakes

  • Computing F(a)−F(b)F(a) - F(b) instead of F(b)−F(a)F(b) - F(a), which flips the sign of the answer.
  • Dropping brackets when F(a)F(a) is negative, so that 1−(−1)1 - (-1) is miscopied as 1−11 - 1.
  • Applying the fundamental theorem across a vertical asymptote, such as integrating 1x2\frac{1}{x^2} from −1-1 to 11 and getting −2-2.
  • Treating a signed integral as the total area when part of the graph lies below the axis.
  • Using degrees for trigonometric limits; calculus formulas assume radians, so use pi rather than 180.
  • Forgetting to change the limits after a substitution, or changing the variable without changing the limits.

Tips

  • Sketch the integrand first; it tells you the expected sign and rough size of the answer.
  • Check symmetry: odd functions over [−a,a][-a, a] integrate to zero.
  • Before using F(b)−F(a)F(b) - F(a), confirm the integrand is continuous on the whole closed interval.
  • Keep answers exact until the very end; π4\frac{\pi}{4} is more useful than 0.785 for later steps.
  • Differentiate your antiderivative to confirm it gives back the integrand.
  • For area between two curves, integrate the top function minus the bottom function.

Frequently asked questions

What is the difference between a definite and an indefinite integral?

An indefinite integral is a family of functions, F(x) + C. A definite integral has limits and produces a single number, F(b) − F(a). The constant C cancels, which is why it does not appear in definite integral answers.

Can a definite integral be negative?

Yes. When the graph lies below the x-axis on the interval, or when the upper limit is smaller than the lower limit, the signed area is negative. The integral of x² from 1 to 0, for example, is −1/3.

How do I enter infinity as a limit of integration?

Type inf for +∞ or -inf for −∞. The calculator then treats the problem as an improper integral, takes the limit of the antiderivative and reports whether it converges, and to what value.

Why does my integral say it diverges?

The area is not finite. For 1/x on [0, 1] the antiderivative ln x falls without bound as x approaches 0, so no number can represent the area. Divergence is a legitimate answer, not an error.

Why is the answer marked as a numerical approximation?

The integrand has no elementary antiderivative, so the exact value cannot be written with standard functions. The calculator uses adaptive Simpson's rule instead and shows the result to about ten significant digits.

Can I use pi or e as a limit?

Yes. Limits such as pi, pi/2, 2*pi, e or e^2 are accepted, and the calculator keeps them symbolic while evaluating the antiderivative, so ∫ sin x from 0 to π gives exactly 2.

How do I find the total area instead of the signed area?

Integrate the absolute value, for example abs(x-1), or find where the function crosses zero, integrate each piece separately and add the absolute values of the results.

Does the calculator check for discontinuities inside the interval?

Yes. If the integrand becomes infinite between the limits, the integral is treated as improper and the antiderivative's limits at that point decide convergence. It will not blindly apply F(b) − F(a) across an asymptote.

What is the average value of a function on an interval?

It is the definite integral divided by the interval length, (1/(b − a))∫f dx. For x² on [0, 1] the integral is 1/3 and the length is 1, so the average value is 1/3.

Evaluate your definite integral

Enter a function and two limits above to get the exact value, the antiderivative and every evaluation step, including improper integrals.

More math calculators