Integral Calculator

Examples: x^2, 2*x+3, sin(x), cos(2*x), exp(x), sqrt(x), 1/(1+x^2)
Result
2
∫₀^π sin(x) dx ≈ 2
Adaptive Simpson numerical integration.
Numerical definite integrals are estimates. Discontinuous, singular, improper, complex-valued, and highly oscillatory integrals may require a full computer algebra system.

What This Tool Does

The integral calculator finds the antiderivative or evaluates the area under a curve for any function you enter, showing the full working rather than just a final answer. Integration is one of the two core operations in calculus, alongside differentiation, and it comes in two main forms: indefinite integrals, which produce a general antiderivative plus a constant of integration, and definite integrals, which produce a specific numerical value representing signed area between a function and the x-axis over a given interval. Enter a function — a polynomial, trigonometric expression, or something more complex — along with bounds if you want a definite integral, and the tool returns the solved result, the method used, and a step-by-step breakdown so you can see exactly how the answer was reached rather than just trusting the output.

You can also use this UPS Calculator.

How It’s Calculated

The calculator identifies which integration technique fits the expression, then applies it step by step the way a person would work through it by hand — rather than relying purely on a lookup table. Common techniques include u-substitution (useful when part of the integrand is the derivative of another part), integration by parts (useful for products of functions, following the formula ∫u dv = uv − ∫v du), trigonometric substitution, and partial fraction decomposition for rational functions.

Worked example (indefinite integral): Consider ∫ x·sin(x²) dx. Let u = x², so du = 2x dx, which means x dx = du/2. Substituting gives (1/2)∫sin(u) du = −(1/2)cos(u) + C. Replacing u with x² gives the final answer: −(1/2)cos(x²) + C. The constant C appears because the derivative of any constant is zero, so infinitely many antiderivatives share the same derivative.

Worked example (definite integral): Consider ∫ from 0 to π of sin(x) dx. The antiderivative of sin(x) is −cos(x), so by the Fundamental Theorem of Calculus, the definite integral equals [−cos(x)] evaluated from 0 to π: (−cos(π)) − (−cos(0)) = 1 − (−1) = 2. This means the area between sin(x) and the x-axis from 0 to π is exactly 2 square units.

Edge Cases and Special Rules

A few situations behave differently from a standard single-variable integral:

  • Improper integrals: When a bound is infinite, or the function is undefined at a point within the interval, the integral is evaluated as a limit. Some improper integrals converge to a finite value; others diverge and have no finite answer.
  • Double and triple integrals: For functions of two or three variables, integration is performed one variable at a time, treating the others as constants during each step — useful for finding volume under a surface rather than area under a curve.
  • No elementary antiderivative: Some functions, like e^(−x²), don’t have an antiderivative expressible in elementary terms. In these cases, a definite integral can still often be evaluated numerically even though no closed-form indefinite integral exists.
  • Discontinuities within bounds: If a function has a vertical asymptote between the lower and upper limits of a definite integral, the interval typically needs to be split at that point and each piece evaluated as an improper integral.

Definite vs. Double Integrals: What’s the Difference

A definite integral calculator and a double integral calculator solve related but distinct problems. A definite integral works with a single-variable function over an interval on a number line and produces signed area — a single number. A double integral extends the same idea to a function of two variables over a region in a plane, producing volume between a surface and that region rather than area under a curve. The mechanics build on each other: a double integral is typically solved by integrating with respect to one variable first (treating the other as a constant), then integrating the resulting expression with respect to the second variable — so comfort with single-variable definite integrals makes double integrals far more approachable.

Who Uses This Calculator

Students use this tool to check homework and see the steps behind a technique they’re still learning, particularly integration by parts and trigonometric substitution, which are easy to set up incorrectly on a first attempt. Engineering and physics students use it for definite integrals that represent real quantities — area, volume, work, or accumulated change — where getting the setup right matters as much as the arithmetic. Instructors use it to generate quick step-by-step references when building practice problems or verifying answer keys.

Indefinite vs. Definite Integrals: Which One Do You Need

The distinction comes down to whether you want a general formula or a specific number. An indefinite integral calculator is the right tool when you need the antiderivative itself — a function (plus a constant) whose derivative gives back the original expression — useful when the next step involves further manipulation, such as solving a differential equation. A definite integral calculator is the right tool when you already know the interval you care about and want a concrete numerical answer, such as total distance traveled over a specific time range or the exact area enclosed between two curves. If a problem gives you bounds, it’s asking for a definite integral; if it doesn’t, it’s asking for the general antiderivative.

Frequently Asked Questions

Q: What’s the difference between an indefinite and a definite integral?

A: An indefinite integral calculator returns a general antiderivative plus a constant of integration (written as + C), while a definite integral calculator returns a single numerical value representing the signed area between the function and the x-axis over specific bounds.

Q: Why does my indefinite integral answer include “+ C”?

A: Because the derivative of any constant is zero, infinitely many functions share the same derivative. The “+ C” accounts for all of them, since any one of those constants could have been part of the original function.

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

A: A closed-form indefinite integral isn’t possible for a function like that, but a definite integral over specific bounds can usually still be evaluated numerically, since numerical methods don’t require an algebraic antiderivative.

Q: What’s integration by parts, and when should I use it?

A: Integration by parts applies when you’re integrating a product of two functions, using the formula ∫u dv = uv − ∫v du. It’s especially useful when one factor becomes simpler after being differentiated, such as x·eˣ or x·ln(x).

Q: How is a double integral calculator different from a regular integral calculator?

A: A regular (single) integral calculator works with a function of one variable and returns area under a curve. A double integral calculator works with a function of two variables over a region in a plane and returns volume between a surface and that region, solved by integrating one variable at a time.