
Integral Calculator
Simpson estimate: 9.0000 (100 intervals)
Exact value: 9.0000. The estimate matches the exact value to 4 decimal places.
Direct answer: An integral calculator works out the area under a curve between two limits. This one uses Simpson rule, a numerical method that fits parabolas to the curve and adds up their areas. The integral of x squared from 0 to 3 is 9 exactly, and Simpson rule with 100 intervals gives a Simpson estimate of 9.0000. The result is a numerical approximation, not a symbolic answer: the tool shows the interval count and the exact value beside it so you can see how close the estimate is.
By Average Calculator Team. Last reviewed: 16 November 2026.
How Simpson rule works
An integral is the area under a curve between two limits, a and b. Simpson rule cuts that range into n equal strips of width h = (b – a) / n, then fits a parabola through each group of three points and adds up the parabola areas. The weights follow the pattern 1, 4, 2, 4, 2, and so on, ending in 1. The estimate is (h / 3) x (f(a) + 4 x f(a + h) + 2 x f(a + 2h) + 4 x f(a + 3h) + … + f(b)). The number of intervals n must be even, because each parabola covers two strips: if you enter an odd number, the tool rounds it up to the next even number.
More intervals mean a closer estimate, because each parabola covers a shorter piece of the curve. Simpson rule is exact for polynomials up to degree 3, which is why the x squared example comes out at exactly 9.0000. For other functions the estimate approaches the exact value as n grows. To work with the arithmetic behind the formula, use the math calculator.

Worked examples
Example 1: the integral of x squared from 0 to 3. The exact value is (3^3 – 0^3) / 3 = 27 / 3 = 9. Simpson rule with 100 intervals gives 9.0000. The estimate matches the exact value, because Simpson rule is exact for polynomials up to degree 3.
Example 2: the integral of sin x from 0 to pi. The exact value is -cos(pi) + cos(0) = 1 + 1 = 2. Simpson rule with 100 intervals gives 2.0000. The estimate matches the exact value to 4 decimal places.
Example 3: the integral of cos x from 0 to pi / 2. The exact value is sin(pi / 2) – sin(0) = 1 – 0 = 1. Simpson rule with 100 intervals gives 1.0000.
Example 4: the integral of 1 / x from 1 to 2. The exact value is ln(2) – ln(1) = 0.6931. Simpson rule with 100 intervals gives 0.6931. The lower limit must stay above 0, because 1 / x is not defined at 0.
Example 5: the integral of e to the power x from 0 to 1. The exact value is e – 1 = 1.7183. Simpson rule with 100 intervals gives 1.7183.
Example 6, where the estimate is not exact: the integral of the square root of x from 0 to 4. The exact value is (2 / 3) x 4^1.5 = (2 / 3) x 8 = 5.3333. Simpson rule with 100 intervals gives 5.3327, which is off by 0.0006. The curve has a steep slope at 0, so the parabolas fit it less well there. Raising the interval count closes the gap. For a custom power, set the function to x to a power and enter the exponent: the integral of x cubed from 0 to 2 is (2^4 – 0^4) / 4 = 16 / 4 = 4, and Simpson rule gives 4.0000. To plot the curve first, use the graphing calculator.

Exact values for the preset functions
The table shows the antiderivative and the exact value for each preset function on its worked example limits. The tool shows the exact value beside every estimate, so you can judge the approximation.
| Function | Antiderivative | Limits | Exact value |
|---|---|---|---|
| x squared | x cubed / 3 | 0 to 3 | 9 |
| sin x | -cos x | 0 to pi | 2 |
| cos x | sin x | 0 to pi / 2 | 1 |
| e to the power x | e to the power x | 0 to 1 | 1.7183 |
| 1 / x | ln x | 1 to 2 | 0.6931 |
| square root of x | (2 / 3) x to the power 1.5 | 0 to 4 | 5.3333 |
The square root row is the honest one: the exact value is 5.3333 and the Simpson estimate with 100 intervals is 5.3327. Every numerical method has an error, and showing the exact value beside the estimate keeps that error visible. For the fraction arithmetic in the table, see the fraction calculator.
Common mistakes
Using an odd interval count: Simpson rule needs an even number of intervals, because each parabola covers two strips. An odd count breaks the weight pattern. This tool rounds an odd count up to the next even number, so entering 99 gives the same answer as entering 100.
Setting the lower limit above the upper limit: the tool needs b above a. If you want the integral from 3 to 0, it is the negative of the integral from 0 to 3, which is -9, so swap the limits and change the sign yourself.
Integrating 1 / x across 0: 1 / x is not defined at 0, and the integral across 0 does not exist as an ordinary number. Keep both limits on the same side of 0, and keep the lower limit above 0 for the 1 / x preset.
Treating the estimate as exact: the Simpson estimate is an approximation. It is exact for polynomials up to degree 3, and very close for smooth functions with enough intervals, but it is never a proof. Always read the exact value beside it, and raise the interval count if the two disagree. For areas of flat shapes instead of curves, use the area calculator.
Frequently asked questions
What is an integral?
An integral is the area under a curve between two limits. The integral of x squared from 0 to 3 is the area under that curve from x equals 0 to x equals 3, which is 9. Integrals also measure distance from speed, volume from cross sections, and total change from a rate of change.
What is Simpson rule?
Simpson rule is a numerical method for integrals. It cuts the range into equal strips, fits a parabola through each group of three points, and adds up the parabola areas. The weights follow the pattern 1, 4, 2, 4, 2, and so on, ending in 1. It is exact for polynomials up to degree 3.
Why does the tool ask for intervals?
The interval count sets how many strips Simpson rule cuts the range into. More intervals mean each parabola covers a shorter piece of the curve, so the estimate gets closer to the exact value. With 100 intervals, the estimate for x squared from 0 to 3 is 9.0000, which matches the exact value of 9.
Is the answer exact?
The exact value shown beside the estimate is exact, and the Simpson estimate is an approximation. The estimate is exact for polynomials up to degree 3, and very close for smooth functions with enough intervals. For the square root of x from 0 to 4, the exact value is 5.3333 and the estimate with 100 intervals is 5.3327.
How do I integrate x to a power that is not listed?
Set the function to x to a power and enter the exponent in the custom exponent field. For x cubed, enter 3: the integral from 0 to 2 is (2 to the power 4 minus 0) divided by 4, which is 16 divided by 4, or 4. Simpson rule gives 4.0000 for that case.
What happens if I enter an odd number of intervals?
Simpson rule needs an even number of intervals, because each parabola covers two strips. The tool rounds an odd count up to the next even number, so entering 99 gives the same answer as entering 100. The output shows the interval count actually used.
Math Calculator ·
Scientific Calculator ·
Graphing Calculator ·
Area Calculator ·
Volume Calculator ·
Last updated: November 16, 2026.
