Area Between Curves Calculator

Compute the area enclosed between two curves with the region shaded on a live graph.

Area Between Curves Calculator

Finding the Area Between Two Curves

The area trapped between two curves y = f(x) and y = g(x) over an interval [a, b] is found by integrating the gap between them:

Area = ∫ab |f(x) − g(x)| dx

The intuition mirrors the area-under-a-curve idea: at each x, the vertical distance between the curves is |f(x) − g(x)|, and integrating sweeps that varying gap across the interval, accumulating the enclosed region's total area. When one curve stays on top throughout, the absolute value is harmless — just integrate (top − bottom). The subtlety arrives when the curves cross: past a crossing, the former top becomes the bottom, and integrating f − g without the absolute value lets positive and negative gaps cancel, silently shrinking (or zeroing) the reported area.

How to Use This Calculator

Enter both functions and the interval. The calculator locates every crossing of the curves inside [a, b] by root-finding on f − g, splits the integral at each crossing, integrates each piece, and sums the absolute piece areas — the full textbook procedure, automated. The steps show the crossings, the piece-by-piece areas, and (when crossings exist) the signed integral too, so you can see exactly how much cancellation the absolute value prevented. The graph shades the enclosed region between the curves and marks the crossing points.

Worked Example

Find the area between f(x) = x and g(x) = x² on [0, 1]. The curves meet where x = x², i.e. at x = 0 and x = 1 — the interval's ends, so no interior split is needed. On (0, 1), the line sits above the parabola, so:

Area = ∫₀¹ (x − x²) dx = [x²/2 − x³/3]₀¹ = 1/2 − 1/3 = 1/6 ≈ 0.1667

The slender sliver between the line and parabola — visible shaded in the graph above — encloses exactly one-sixth of a square unit, one of the classic first results in this topic.

The Crossing-Point Procedure

  1. Find intersections: solve f(x) = g(x) on [a, b] — these are the region's internal seams.
  2. Split the interval at each intersection into pieces where one curve stays on top.
  3. Integrate (top − bottom) on each piece — equivalently, take |∫(f−g)| piece by piece.
  4. Add the pieces. Every term is positive; nothing cancels.

The sin-vs-cos example button shows the machinery at full stretch: the curves cross twice inside one period, producing three pieces whose areas sum to 4√2 ≈ 5.657, while the signed integral over the same interval is exactly 0 — total cancellation, and a vivid warning about skipping the absolute value.

Common Mistakes to Avoid

  • Integrating f − g straight through a crossing. The single most common error: the signed pieces cancel and the "area" comes out too small, zero, or negative.
  • Guessing which curve is on top. Check with a test point in each piece (or let this calculator's crossing detection do it) — "f came first in the problem" is not evidence.
  • Using given bounds when the problem says "the region enclosed." If no interval is stated, the bounds are the intersection points — find them first, then integrate between them.
  • Reporting a negative area. Areas are positive by definition; a negative result means signed cancellation crept in somewhere.

Real-World Applications

Economics leans on this construction constantly: consumer surplus is the area between the demand curve and the market-price line, producer surplus the area between price and supply, and deadweight loss the area between supply and demand over the quantities a policy suppresses — every one an area-between-curves integral read straight off a price-quantity diagram. In statistics, the area between two cumulative distribution functions measures how far apart two distributions are, and the Gini coefficient of income inequality is (twice) the area between the Lorenz curve and the perfect-equality line.

Engineering applications are just as direct: the net work of a thermodynamic cycle is the area enclosed between the expansion and compression curves on a pressure-volume diagram (the literal shape of an engine's P-V loop), hysteresis losses in magnetic materials are the area between magnetization curves, and comparing two velocity profiles' area gap gives the separation distance accumulated between two vehicles. Wherever two trends are plotted on shared axes, the region between them usually means something — and this integral measures it.

Frequently Asked Questions

What if the curves don't intersect at my bounds?

Nothing changes — the formula integrates the gap over whatever interval you specify, whether the region is "closed off" by intersections or simply cut off by your chosen bounds. Intersections only matter inside the interval, where they force a split.

Can I find the area between curves that are functions of y?

Yes — the mirror-image formula integrates (right − left) with respect to y: ∫|f(y) − g(y)| dy. It's the natural choice when curves are given as x = f(y) or when vertical slices would hit a curve twice. This calculator works with functions of x; for x = f(y) problems, swap the variable roles on paper first.

What happens if one "curve" is just the x-axis?

Then g(x) = 0 and the formula reduces to ∫|f(x)|dx — total unsigned area between a curve and the axis. That's exactly the "total area" (as opposed to signed area) question from the Definite Integral Calculator, handled by the same splitting procedure at the function's zeros.

How does the calculator find the crossings?

It scans f − g for sign changes across the interval and sharpens each one with bisection — the same numeric root-finding used by the Critical Points Calculator. Tangential touches (where the curves kiss without crossing) don't flip the sign and don't require a split, so they're harmlessly ignored.

Does the region's position matter — above or below the x-axis?

Not at all. Because the integrand is the difference of the curves, any common vertical shift cancels: the area between two curves is identical whether the whole picture floats above the axis, straddles it, or sits below. Only the gap matters.

Can the region between curves have infinite area?

Over an infinite interval, yes — unless the gap shrinks fast enough. The area between 1/x and the x-axis beyond x = 1 diverges, while the same region under 1/x² is exactly 1. Deciding which way it goes is precisely the convergence question handled by the Improper Integral Calculator.