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.
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
- Calculus Volume 1, §6.1 Areas between Curves (curves that cross, Theorem 6.2) — OpenStax
- Calculus Volume 1, §5.3 The Fundamental Theorem of Calculus — OpenStax
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