My Calculator

Integral Calculator

Solve definite and indefinite integrals with a full step-by-step solution — Power Rule, Sum Rule, and u-substitution applied automatically, plus a diagram that shades the exact area under your curve.

Tap x² / x³ below, or type x²

Reading this as: f(x) = x^2

Leave both bounds blank for the indefinite integral (+ C). Fill in both for the definite integral — you can type numbers, pi, e, or expressions like pi/4. Powers as or , and sqrt(x) / sin(x) / ln(x) for functions. You can also paste an equation directly into the box.

Math Keyboard

Try an example

Functionf(x) = x²
Indefinite integral∫f(x) dx = x³ / 3 + C
Boundsa = 0, b = 2
∫ from 0 to 22.66667

Integral Diagram

The blue curve is your function f(x). The shaded region is the exact area this integral measures — its value is labeled right on the diagram.

a = 0b = 2Area = 2.66667f(x)
f(x)Shaded area = the integral's valueBounds a and b

Step-by-Step Solution

Here's exactly how this answer was calculated, one step at a time.

Given: ∫ from 0 to 2 of x² dx

  1. Step 1: Apply the Power Rule

    Power Rule: ∫xⁿ dx = xⁿ⁺¹/(n+1) + C. Add 1 to the exponent, then divide by that new exponent.

    ∫ x² dx = x³ / 3
  2. Step 2: Add the Constant of Integration

    Every indefinite integral includes an arbitrary constant C, since the derivative of any constant is zero — infinitely many antiderivatives differ only by a constant term.

    ∫ x² dx = x³ / 3 + C
  3. Step 3: Apply the Fundamental Theorem of Calculus

    Fundamental Theorem of Calculus: for a definite integral, evaluate the antiderivative F(x) at the upper bound, then subtract its value at the lower bound.

    ∫ from 0 to 2 of x² dx = F(2) - F(0)
  4. Step 4: Compute the Final Value

    Substitute both bounds into the antiderivative and subtract — this gives the exact net signed area between the curve and the x-axis over this interval.

    F(2) - F(0) = 2.66667 - 0 = 2.66667

The definite integral is:

2.66667

Free Online Integral Calculator with Steps

This integral calculator solves both definite and indefinite integrals instantly, with a fully worked, copyable step-by-step solution. Type in a function using standard notation — x², sin(x), sqrt(x), ln(x), eˣ, and so on — and the calculator automatically detects which integration rule applies: the Power Rule, the Sum and Difference Rules, the Constant Multiple Rule, and the standard trigonometric, logarithmic, and exponential integration formulas, including a straightforward linear u-substitution for expressions like sin(3x + 1), e^(2x), or 1/(4x − 5).

Leave both bound boxes empty and you get the indefinite integral — the general antiderivative F(x) + C. Fill in a lower bound a and an upper bound b, and the calculator also computes the definite integral, the exact signed area between your curve and the x-axis over that interval, using the Fundamental Theorem of Calculus. Alongside the algebra, a diagram plots your exact function and shades the precise region the integral measures, with the area value labeled right on the chart, so every number in the answer is also something you can see. And for functions that don't have an elementary closed-form antiderivative — like e^(−x²), famous from the normal distribution — the calculator still returns an accurate definite-integral value using Simpson's Rule, a reliable numerical integration method.

What Is an Integral in Calculus?

An integral is, in a sense, the reverse of a derivative. Where a derivative breaks a function down into its instantaneous rate of change, an integral builds a function back up by accumulating tiny pieces of area, or equivalently, by asking: which function, when differentiated, gives back this one? If F'(x) = f(x), then F(x) is called an antiderivative of f(x), and the integral symbol ∫ f(x) dx represents the whole family of functions that differentiate to f(x).

There are two kinds of integrals. An indefinite integral, written ∫ f(x) dx = F(x) + C, has no bounds and represents that entire family of antiderivatives — the +C, called the constant of integration, exists because differentiating any constant gives zero, so infinitely many functions share the same derivative. A definite integral, written ∫ from a to b of f(x) dx, has both a lower bound a and an upper bound b, and represents a single number: the exact net signed area between the curve y = f(x) and the x-axis, from x = a to x = b.

Integral Notation and Formula

The formal notation and the core formula tying integrals to antiderivatives:

  • ∫ f(x) dx — the indefinite integral, read as "the integral of f(x) with respect to x"
  • ∫ from a to b of f(x) dx — the definite integral over the interval [a, b]
  • The Fundamental Theorem of Calculus: ∫ from a to b of f(x) dx = F(b) − F(a), where F is any antiderivative of f
  • dx signals that x is the variable of integration — the infinitesimal width of each tiny slice being summed
  • The dx in the notation traces back to integration's original definition as a limit of a Riemann sum: a sum of infinitely many, infinitely thin rectangles

Common Integration Rules and Formulas

A reference table of the standard antiderivative rules this calculator applies automatically, where a is a constant and u is a function of x (a linear substitution divides the result by u's constant slope):

  • Power Rule: ∫xⁿ dx = xⁿ⁺¹/(n+1) + C, for any n ≠ -1
  • Reciprocal Rule: ∫1/x dx = ln|x| + C
  • Constant Multiple Rule: ∫k·f(x) dx = k·∫f(x) dx
  • Sum/Difference Rule: ∫[f(x) ± g(x)] dx = ∫f(x) dx ± ∫g(x) dx
  • ∫sin(x) dx = -cos(x) + C and ∫cos(x) dx = sin(x) + C
  • ∫eˣ dx = eˣ + C and ∫aˣ dx = aˣ/ln(a) + C for constant base a
  • ∫√x dx = (2/3)x^(3/2) + C and ∫ln(x) dx = x·ln(x) − x + C

How to Solve an Integral Step by Step

Solving an integral, whether by hand or by matching it to this calculator's logic, generally follows this sequence:

  • Step 1 — Look at the outermost structure: is it a sum or difference of terms, a constant times a function, or a single function (trig, exponential, log, root) applied to something?
  • Step 2 — Match that structure to the right rule: the Sum/Difference Rule splits addition and subtraction apart, and the Constant Multiple Rule pulls any constant factor outside the integral sign.
  • Step 3 — If the inner argument is a simple linear expression like 3x + 1 rather than plain x, apply u-substitution: integrate as if u were x, then divide the whole result by u's constant slope (the coefficient of x).
  • Step 4 — Integrate each remaining piece using the Power Rule or the standard trig/log/exponential antiderivative formulas.
  • Step 5 — Recombine the pieces exactly as the rule specifies, and add the constant of integration, +C, for an indefinite integral.
  • Step 6 — For a definite integral, apply the Fundamental Theorem of Calculus: evaluate the antiderivative at the upper bound, then subtract its value at the lower bound.

Worked Example: Definite Integral with the Power Rule

Find ∫ from 0 to 2 of x² dx. First, find the antiderivative using the Power Rule: ∫x² dx = x³/3 + C. Then apply the Fundamental Theorem of Calculus, evaluating at the bounds: F(2) − F(0) = (2³/3) − (0³/3) = 8/3 − 0 = 8/3 ≈ 2.667. Geometrically, this is the exact area trapped between the parabola y = x² and the x-axis, from x = 0 to x = 2 — the shaded region this calculator draws automatically.

Worked Example: Indefinite Integral with u-Substitution

Find ∫ sin(3x + 1) dx. The inner expression, u = 3x + 1, is linear in x with slope 3, so use u-substitution: the antiderivative of sin(u) is -cos(u), and since du = 3 dx, divide the result by 3. That gives ∫sin(3x + 1) dx = -cos(3x + 1)/3 + C. You can verify this by differentiating the answer: the derivative of -cos(3x+1)/3 is (1/3)·sin(3x+1)·3 = sin(3x+1), which matches the original integrand exactly.

Definite Integrals and Area Under a Curve

The single most useful way to picture a definite integral is as signed area. When f(x) stays above the x-axis across [a, b], the integral equals the ordinary area between the curve and the axis. When f(x) dips below the x-axis, that portion counts as negative area, subtracting from the total — which is why a definite integral is called "signed" or "net" area rather than plain area. If you need the total physical area (treating regions below the axis as positive too), you'd integrate the absolute value of f(x), or split the integral at each point where the curve crosses the axis and add the absolute values of each piece.

This calculator's diagram shades exactly the region the definite integral measures, between your lower and upper bounds, so you can see at a glance whether the curve sits above or below the axis over that interval, and how that relates to the sign of your final answer.

Real-World Applications of Integrals

Integration isn't just a calculus-class exercise — it's how continuous accumulation is measured across nearly every quantitative field:

  • Physics: total displacement is the integral of velocity over time, and total work is the integral of force over distance.
  • Engineering: computing the volume of irregular solids, the center of mass of an object, or the total load on a structural beam.
  • Economics and finance: consumer and producer surplus are computed as the area between supply/demand curves, and continuous compound interest relies on integration.
  • Probability and statistics: the probability of an outcome falling in a range is the integral of a probability density function over that range.
  • Medicine and biology: computing total drug exposure over time (area under the concentration curve), a standard pharmacokinetics measurement.
  • Computer graphics and signal processing: accumulating light, sound, or motion over a continuous domain to render realistic images or audio.

Integrals vs. Derivatives vs. Limits

Limits, derivatives, and integrals form the three pillars of calculus, tied together by one central idea. A limit describes the value a function approaches. A derivative, itself defined as a specific limit, measures instantaneous rate of change — the slope of a curve at one exact point. An integral does roughly the opposite job: instead of zooming in on a single point's steepness, it accumulates infinitely many, infinitely thin slices of a function's value to build up a total — an area, a volume, a total distance traveled. The Fundamental Theorem of Calculus formally proves that these two seemingly different operations, differentiation and integration, are inverses of one another: differentiating an integral gets you back the original function, and integrating a derivative gets you back the original function (up to a constant).

How to Use This Integral Calculator

Type your function into the f(x) box using x as the variable — write powers as x², multiplication either with * or just by writing terms next to each other like 2x, and standard function names like sin(x), cos(x), sqrt(x), ln(x), and eˣ. To find the indefinite integral, leave both bound boxes empty. To find a definite integral, enter a lower bound and an upper bound — these can be plain numbers, expressions like pi/4, or the constants pi and e.

The calculator instantly shows the antiderivative (with +C for the indefinite case), the exact definite-integral value when bounds are supplied, a diagram plotting f(x) with the measured region shaded and its area value labeled directly on the chart, and a full step-by-step breakdown naming every rule used, in the order it was applied, that you can copy with one click for your notes or homework.

Common Mistakes When Solving Integrals

The most frequent slip is forgetting the constant of integration, +C, on an indefinite integral — since infinitely many functions share the same derivative, dropping it turns a correct family of answers into a single (technically incomplete) one. Another common error is applying the Power Rule to 1/x as if n = -1 were a normal exponent, which would require dividing by zero; the correct antiderivative there is ln|x|, not a power of x at all. A third frequent mistake with u-substitution is forgetting to divide by the constant slope of a linear inner expression — differentiating (2x+1)^3/3 without also dividing by 2 gives an answer that's off by a factor of 2, since d/dx[(2x+1)^3] carries an extra factor of 2 from the Chain Rule. Whenever a result feels uncertain, this calculator instantly verifies it with a rule-by-rule solution and a shaded diagram confirming the area visually.

Frequently Asked Questions

What is an integral in simple terms?

An integral is the reverse of a derivative — it finds a function whose rate of change matches the one you started with. A definite integral also has a geometric meaning: the exact area between a curve and the x-axis over a chosen interval.

What is the difference between a definite and indefinite integral?

An indefinite integral has no bounds and gives a general antiderivative plus a constant, F(x) + C. A definite integral has a lower and upper bound and evaluates to one specific number — the net signed area under the curve between those bounds.

What is the formula for the Power Rule in integration?

∫xⁿ dx = xⁿ⁺¹/(n+1) + C, for any exponent n except -1. Add 1 to the exponent, then divide the whole term by that new exponent. For n = -1, use ∫1/x dx = ln|x| + C instead.

What does the Fundamental Theorem of Calculus mean?

It states that a definite integral can be computed by finding any antiderivative F(x) of f(x), then subtracting its value at the lower bound from its value at the upper bound: ∫ from a to b of f(x) dx = F(b) − F(a).

Can this calculator solve integrals with no elementary antiderivative, like e^(-x²)?

Yes, for definite integrals. When a function has no closed-form antiderivative, this calculator still computes an accurate numerical value for the definite integral using Simpson's Rule, a reliable numerical integration method — you just won't get a symbolic indefinite-integral formula.

Why is there always a +C in an indefinite integral?

Because the derivative of any constant is zero, infinitely many functions share the exact same derivative — they all differ only by a constant. Writing +C acknowledges that the indefinite integral represents that whole family of functions, not just one.