Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Integral calculator

Type a function and, if you want a definite integral, the limits. You get the antiderivative with each step, the exact value when there is one, and a numerical value with an honest error estimate.

Use x, numbers, + − * / ^ and brackets, with sin, cos, tan, sec, csc, cot, arcsin, arccos, arctan, e^x, ln, log (base 10), log_2(x), sqrt and abs. You can write 2x, sin x and pi. Leave both limits blank for just the antiderivative.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Check an antiderivative with the derivative calculator, or compare the rectangle estimates in the Riemann sum calculator.

What it does

An antiderivative F(x) is a function whose derivative is f(x). A definite integral from a to b is the signed area under f between those limits. This calculator gives both. It finds the antiderivative by the same rules you'd use by hand, and it always computes the definite integral numerically too, so you get an answer even when no formula exists.

How it's calculated

∫ f(x) dx = F(x) + C, where F′(x) = f(x)
∫ from a to b of f(x) dx = F(b) − F(a)

For the antiderivative, the calculator splits sums, pulls out constants and then tries the table of integrals, linear substitution (u = ax + b), u-substitution, integration by parts for forms like x·eˣ and ln x, and the inverse-trig forms. It then checks its answer by differentiating it numerically at several points. If that check fails, it won't show the formula.

For the number, it uses adaptive Simpson's rule: it keeps halving any piece where two estimates disagree. Simpson's error bound shrinks with 1/n⁴, so halving the step cuts the error about 16-fold, and the leftover error is estimated from the difference. Where f blows up at a point or a limit is infinite, it switches to a method that never evaluates the bad point (tanh-sinh quadrature) and checks whether the answer actually settles. If it doesn't, you're told the integral diverges.

Worked example: u-substitution

Evaluate ∫ from 0 to 1 of x²(1 + 2x³)⁵ dx.

  1. Let u = 1 + 2x³. Then du = 6x² dx, so x² dx = du/6.
  2. Change the limits: x = 0 gives u = 1, and x = 1 gives u = 3.
  3. The integral becomes (1/6)∫ from 1 to 3 of u⁵ du = (1/36)(3⁶ − 1⁶) = 728/36 = 182/9 ≈ 20.2222.

The calculator spots substitutions like this one by checking whether the rest of the integrand is a constant times the derivative of the inside.

Table of common integrals

f(x)∫ f(x) dx (add + C)
xⁿ (n ≠ −1)xⁿ⁺¹/(n + 1)
1/xln|x|
eˣeˣ
aˣaˣ/ln a
sin x−cos x
cos xsin x
sec²xtan x
csc²x−cot x
sec x tan xsec x
csc x cot x−csc x
tan xln|sec x|
cot xln|sin x|
sec xln|sec x + tan x|
csc xln|csc x − cot x|
1/√(a² − x²)arcsin(x/a)
1/(a² + x²)(1/a) arctan(x/a)
1/(x√(x² − a²))(1/a) arcsec(x/a)

The integral of sec x is the one most people forget: ∫ sec x dx = ln|sec x + tan x| + C. And ∫ sin x dx = −cos x + C, so ∫ from 0 to π of sin x dx = −cos π + cos 0 = 2.

Trig substitution

Integrals with these square roots are usually done with a trigonometric substitution. The calculator handles the arcsin and arctan forms directly; for the rest it gives the numerical value.

ExpressionSubstituteIdentity usedRange of θ
√(a² − x²)x = a sin θ1 − sin²θ = cos²θ−π/2 ≤ θ ≤ π/2
√(a² + x²)x = a tan θ1 + tan²θ = sec²θ−π/2 < θ < π/2
√(x² − a²)x = a sec θsec²θ − 1 = tan²θ0 ≤ θ < π/2 or π/2 < θ ≤ π

Limitations

  • Many functions, such as e^(x²) and sin(x)/x, have no antiderivative made of elementary functions. The calculator says so and still gives the definite integral numerically.
  • Repeated integration by parts beyond polynomials times eˣ, sin x or cos x, partial fractions beyond simple quadratics, and full trig substitution aren't automated.
  • F(b) − F(a) only works when F is continuous on [a, b]. For 1/x from −1 to 1 it gives a meaningless 0; this calculator detects the blow-up and reports that the integral diverges.
  • Very wiggly functions can need more evaluations than the calculator allows. It tells you when the error target wasn't reached.

Sources

Learn: Integration by parts · Fundamental theorem of calculus

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • ∫ sec x dx = ln|sec x + tan x| + C ✓
  • ∫ 1/(1 + x²) dx = arctan x + C ✓
  • ∫ from 0 to π of sin x dx = 2 ✓
  • u-substitution: ∫₀¹ x²(1 + 2x³)⁵ dx = 182/9 ✓
  • Improper: ∫ e^(−x²) over the whole line = √π ≈ 1.7724539 ✓
  • ∫ 1/x from 0 to 1 diverges ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What is the antiderivative of 1/x?

∫ (1/x) dx = ln|x| + C. The absolute value makes it work for negative x too. On an interval that includes 0, the definite integral diverges.

What is the integral of sec x?

∫ sec x dx = ln|sec x + tan x| + C. You can check it by differentiating: the derivative of ln|sec x + tan x| simplifies back to sec x.

What is the integral of sin x?

∫ sin x dx = −cos x + C. Over one hump, from 0 to π, the area is exactly 2.

How do I know when to use u-substitution?

Look for a function and its derivative, up to a constant factor, multiplied together, like x·e^(x²) (the derivative of x² is 2x). Let u be the inside function.

What are trig integrals?

Integrals of powers and products of trig functions, like sin²x or sec x tan x. They're solved with identities such as sin²x = (1 − cos 2x)/2 and the table above.

Related calculators