Area Between Curves Calculator

Area between two polynomial curves on [a, b], finding where they cross and integrating |f − g| piece by piece exactly, with a fraction answer.

1, 0, 0 means x². Use 0 for a missing power. Up to degree 20. Use a point for decimals (1.5), no thousands separators, and separate numbers with spaces or a comma and a space.
−1, 2 means −x + 2. Enter 0 for the x-axis.
Must be greater than a.

Results

Area between the curves
3
Where the curves meet between a and b
x = 1
Area of each piece
[0, 1]: g above f, area 7/6 ≈ 1.166666667 [1, 2]: f above g, area 11/6 ≈ 1.833333333
Net integral of (f − g) (signed, for comparison)
0.666667
Exactly 2/3. Pieces where g is above f count as negative here.
Difference
f(x) − g(x) = x² + x − 2

How it’s calculated

The area between two curves is the integral of the gap between them, |f(x) − g(x)|. When one curve stays on top, that is just ∫(top − bottom) dx. When the curves cross, the top and bottom swap, so the interval is split at each crossing and each piece is added as a positive area.

A = ∫ from a to b of |f(x) − g(x)| dx = |D(x₁) − D(a)| + |D(x₂) − D(x₁)| + … + |D(b) − D(xₖ)| where D is an antiderivative of f − g and x₁ … xₖ are the crossings

The crossings are the roots of the polynomial f − g inside [a, b]. The calculator finds every one of them by splitting the interval where f − g turns around and bisecting each sign change, then integrates each piece exactly from the antiderivative. When the crossings are rational and the inputs are short decimals it also gives the exact fraction.

Example: f(x) = x² and g(x) = 2 − x on [0, 2]. f − g = x² + x − 2 = (x + 2)(x − 1), so the curves cross at x = 1. With D(x) = x³/3 + x²/2 − 2x: D(0) = 0, D(1) = −7/6, D(2) = 2/3. The pieces are |−7/6 − 0| = 7/6 (g on top) and |2/3 + 7/6| = 11/6 (f on top), so the area is 7/6 + 11/6 = 3. The plain integral of f − g would give only 2/3, because the first piece counts as negative.

Frequently asked questions

Why is the area different from the integral of f − g?

The integral counts parts where g is above f as negative, so pieces can cancel. Area is always positive, so the calculator splits at the crossings and adds the absolute value of each piece.

How do I find the area between a curve and the x-axis?

Enter 0 as g(x). The result is the total area between the curve and the axis, counting parts below the axis as positive.

What if I want the area of the region enclosed by two curves?

Use the outermost crossing points as a and b. For x² and 2 − x these are x = −2 and x = 1, giving an area of 4.5.

Can I use non-polynomial curves?

Not here. This calculator handles polynomials (entered as coefficient lists), which covers lines, parabolas, cubics and so on, so the crossings and areas can be found exactly.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator