Integral Calculator
Enter f(x) and the limits a and b to get the definite integral as a number, by Simpson's rule with 1,000 intervals. Net signed area, no antiderivative. How it works
Use the Integral Calculator
About the Integral Calculator
The definite integral of x² from 0 to 1 is 1/3, which the integral calculator shows as 0.333333. Enter f(x) and the limits a and b, and it sums 1,000 intervals by Simpson’s rule and prints the result to six decimals. The answer is a number, the net signed area between the curve and the x-axis, not an antiderivative. The limits can be constants such as pi or 1/3, and a graph shades the area.
Integrals the calculator returns
| f(x) as typed | From a | To b | Tool shows | Exact value |
|---|---|---|---|---|
| x^2 | 0 | 1 | 0.333333 | 1/3 |
| x^3 | 0 | 2 | 4 | 4 |
| 2x+1 | 0 | 3 | 12 | 12 |
| x^2-4 | 0 | 3 | -3 | -3 |
| sin(x) | 0 | 3.14159 | 2 | 2 |
| e^x | 0 | 1 | 1.718282 | e − 1 |
| log(x) | 1 | 2 | 0.386294 | 2 ln 2 − 1 |
| 4/(1+x^2) | 0 | 1 | 3.141593 | π |
| exp(-x^2) | -3 | 3 | 1.772415 | about √π |
| sqrt(x) | 0 | 1 | 0.666664 | 2/3 |
log is the natural log here. sqrt(x) comes out slightly low because its slope is infinite at 0, where Simpson’s rule is least accurate.
How to use this tool
- Type the function of x, for example x^2 or sin(x). Use ^ for powers; 2x is read as 2*x.
- Enter the lower limit a and the upper limit b as numbers or constants such as pi, pi/2, e or 1/3. The result follows each edit.
- Read the value under Definite Integral. If a message says the integral could not be evaluated, f has no finite value somewhere between the limits. Below the result the graph shades the area, and Show the Simpson’s rule working lists the samples and sums.
Frequently asked questions
- How accurate is the integral?
- Simpson’s rule is exact for polynomials up to degree three, so 2x+1 from 0 to 3 gives exactly 12. For other smooth functions over a short range it is right to the six decimals shown, as 4/(1+x^2) from 0 to 1 = 3.141593 is. It drifts when the interval holds many waves: sin(x) from 0 to 1000 returns 0.440375 against the exact 0.437621.
- Does it give the antiderivative?
- No. It returns the definite integral between two limits as a number. To check an antiderivative F you found by hand, compare F(b) − F(a) with the result: for x^3 from 0 to 2, x⁴/4 gives 4 − 0 = 4, the same as the tool.
- Why is my integral negative?
- Area below the x-axis counts as negative, so x^2-4 from 0 to 3 gives -3, the net of the parts below and above the axis. Swapping the limits also flips the sign: x^3 from 2 to 0 gives -4.
- Why does no result appear?
- The tool samples f at 1,001 points and shows a message instead of a result if any of them has no finite value. 1/x from 0 to 1 is one case, and so is 1/x from -1 to 1, which passes through 0. Improper integrals and infinite limits are not handled; start just past the problem point, or split the range.
- Is log the natural log, and are angles in radians?
- Yes to both. log(x) from 1 to 2 gives 0.386294, which is 2 ln 2 − 1; use log10 for base 10. sin(x) from 0 to 3.14159 gives 2 because the limits are read in radians; type pi as the upper limit for π itself.
Related Tools
View all toolsDerivative Calculator
Enter f(x) and a point x = a to get f′(a), f(a), the tangent line and its graph, plus the formula for f′(x). Flags corners, jumps and vertical tangents.
Limit Calculator
Limit of f(x) as x approaches a number, +∞ or −∞: f(c) where f is continuous, otherwise an estimate from samples. Shows one-sided limits, ±∞ and jumps.
Sphere Volume and Surface Area Calculator
Sphere volume (4/3 πr³) and surface area (4πr²) from the radius or diameter, or the radius from a volume or area: a radius of 5 gives 523.5988 and 314.1593.
Cross Product Calculator
Cross product A × B of two 3D or 2D vectors with the i, j, k working, the magnitude (parallelogram area), the dot product and a picture.
Cylinder Volume & Surface Area
Volume, surface area, curved side and end of a cylinder from radius and height, or the radius or height from a volume: V = πr²h and A = 2πr(h + r).
Right Triangle Calculator
Enter two sides, or one side and an acute angle, to get the other sides, both angles, the area and the perimeter. Legs 3 and 4 give a hypotenuse of 5.