Definite integral calculator
Type a function of x and the lower and upper limits, and get the definite integral: the area under the curve between those limits, counting parts below the x-axis as negative.
Use ^ for powers, * for times (optional: 3x), sqrt, sin, cos, tan, exp, log (= ln), pi and e.
Fill in the fields; the answer appears here straight away.
How it's worked out
How it works
-
Enter the values
Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.
-
Instant answer
The answer appears as you type, with the most important intermediate values.
-
See the working
Under "How it's worked out" you see the steps, handy for checking your own calculation.
How it is calculated
The integral is calculated numerically with adaptive Simpson's rule, which keeps splitting the interval where the function changes quickly. The result is accurate to about 10 significant digits. For example, the integral of sin(x) from 0 to π is 2.
What it does not do
This tool gives the value of a definite integral, a number. It doesn't produce an antiderivative as a formula. If the function is undefined or infinite somewhere on the interval (such as 1/x at x = 0), you get a message to choose other limits.
Input
Write functions the same way as in the derivative calculator: ^ for powers, sqrt, sin, exp, log and pi. The limits may be expressions such as pi/2.
Worked examples
| Integral | Value |
|---|---|
| ∫₀¹ x² dx | 0.3333 (= 1/3) |
| ∫₀⁴ 3t² dt | 64 |
| ∫₀^π sin(x) dx | 2 |
| ∫₀^π (x² + sin x) dx | 12.3354 (= π³/3 + 2) |
| ∫₀^2π sin(x) dx | 0 |
Mean value on the interval
The calculator also shows the mean value of the function between the limits, which is the integral divided by the length of the interval. For the default example that is 12.3354 ÷ π ≈ 3.9265. A mean value is how you find an average speed from a speed-time graph, or an average power from a power curve.
Distance from speed
A car whose speed is v(t) = 3t² m/s covers ∫₀⁴ 3t² dt = 4³ = 64 m in the first 4 seconds. An integral adds up many small contributions, which is why it turns a rate into a total. For the opposite step, from a function to its rate of change, use the derivative calculator.
Frequently asked questions
Does it give the antiderivative as a formula?
No. It gives the value of a definite integral, a number. For the formula, integrate by hand or use the rules of the [derivative calculator](/en/math/derivative-calculator) in reverse.
Why can the integral be negative?
Parts of the curve below the x-axis count as negative area. ∫ from 0 to 2π of sin(x) dx is 0, because the positive and negative halves cancel out. For the total area, integrate the parts separately.
What if the function is infinite on the interval?
For example 1/x with a limit of 0. You get a message to choose other limits instead of a wrong number.
How accurate is the result?
About 10 significant digits for smooth functions, using adaptive Simpson's rule, which splits the interval further where the function changes quickly.