Area Under Curve Calculator

Enter a function f(x), a lower limit, and an upper limit to compute the area under the curve using numerical integration. The Area Under Curve Calculator applies Simpson's Rule across your defined interval and returns the definite integral value — the signed area between your function and the x-axis. Supports common functions like sin, cos, sqrt, log, exp, and polynomial expressions.

Enter a valid JavaScript math expression. Use x as the variable. Examples: x^2, Math.sin(x), Math.sqrt(x), Math.log(x), Math.exp(x)

The starting x-value of the integration interval.

The ending x-value of the integration interval.

Simpson's Rule is most accurate for smooth functions.

Higher values give more accurate results. Must be even for Simpson's Rule.

Results

Area Under Curve ∫f(x)dx

--

Absolute Area (|∫f(x)dx|)

--

Interval Width (b − a)

--

Average Value of f(x)

--

f(a) — Value at Lower Limit

--

f(b) — Value at Upper Limit

--

f(x) Over Integration Interval

Results Table

Frequently Asked Questions

What is the area under a curve?

The area under a curve refers to the region between the graph of a function f(x) and the x-axis over a defined interval [a, b]. Mathematically, it is computed as the definite integral ∫ₐᵇ f(x)dx. When f(x) is positive, the area is positive; when f(x) is negative, the signed area is negative.

How does this calculator compute the area under a curve?

This calculator uses numerical integration methods — Simpson's Rule, the Trapezoidal Rule, or the Midpoint Rule — to approximate the definite integral. Simpson's Rule is the default and most accurate for smooth, continuous functions. The interval [a, b] is divided into n subintervals, and weighted averages of f(x) are summed to estimate the total area.

What functions can I enter?

You can enter any valid JavaScript math expression using x as the variable. This includes polynomials (x^2, x^3), trigonometric functions (Math.sin(x), Math.cos(x), Math.tan(x)), logarithms (Math.log(x)), exponentials (Math.exp(x)), and square roots (Math.sqrt(x)). You can also combine them, e.g. Math.sin(x) * x + 2.

What is the difference between signed area and absolute area?

The signed (definite) integral counts area below the x-axis as negative and area above as positive — they can cancel each other out. The absolute area sums the magnitude of all regions regardless of sign. Use absolute area when you want the total enclosed area between the curve and the x-axis without cancellation.

Why should the number of subintervals (n) be even?

Simpson's Rule requires an even number of subintervals because it processes the interval in pairs, fitting parabolas to groups of three points. If you enter an odd number, the calculator automatically increments it by one to ensure correctness.

How accurate is numerical integration?

Simpson's Rule is highly accurate for smooth functions and converges as O(h⁴), where h is the subinterval width. With n = 1000 subintervals (the default), results are accurate to many decimal places for most common functions. Accuracy decreases for functions with sharp discontinuities or singularities within the interval.

Can this calculator find the area between two curves?

To find the area between two curves f(x) and g(x), enter the difference as your function — for example: f(x) - g(x). Set the lower and upper limits to the x-values where the two curves intersect, then compute the integral of the combined expression.

What does the average value of f(x) mean?

The average value of a function over [a, b] is defined as (1 / (b−a)) × ∫ₐᵇ f(x)dx. It represents the constant height a rectangle would need to have over the same interval to match the same total area as the curve — essentially the 'mean height' of the function.

More Math Tools