UTILS.
100% in-browser
🌓

Area Between Two Curves Calculator

Compute the area enclosed between f(x) and g(x) over [a,b], finding intersections and integrating |f−g| with Simpson's rule so crossing regions add correctly.

Enter two functions of x. Leave both bounds blank to use the enclosed region between the outer intersections.

About this tool

The Area Between Two Curves Calculator is a free, in-browser tool that computes the region enclosed between two functions f(x) and g(x). The area is the integral of the absolute difference, ∫|f(x) − g(x)| dx — using the absolute value so that portions where f is above g and portions where g is above f both contribute positively rather than cancelling. Both functions are parsed and integrated locally in your browser, so nothing you enter is uploaded.

Enter the two functions using x as the variable (for example f = x^2 and g = x). The tool first finds every point where the curves cross by scanning for sign changes of f − g and refining each with bisection, then splits the interval at those intersections and integrates the difference on each piece with composite Simpson's rule, taking the absolute value of each piece so crossings are handled correctly. You can supply explicit bounds a and b, or leave both blank and the calculator integrates between the outermost intersection points it finds — the natural enclosed region.

This is a standard calculus II application for the area of a bounded region. The result panel reports the total enclosed area, the effective lower and upper bounds used, and the list of intersection x-values. For f(x) = x² and g(x) = x the curves cross at x = 0 and x = 1, and the enclosed area works out to exactly 1/6 ≈ 0.166667.

Frequently asked questions

What is the area between two curves formula?
It is ∫ from a to b of |f(x) − g(x)| dx. The absolute value ensures the area is positive everywhere; on any subinterval it equals the integral of (upper curve − lower curve), which is why intersection points must be located first.
Do I have to enter the bounds a and b?
No. If you leave both bounds blank, the calculator finds the curves' intersection points and integrates between the outermost pair — the fully enclosed region. Enter explicit bounds only when you want the area over a specific interval.
How are crossing regions handled?
The tool locates every intersection of f and g, splits the interval at each one, and integrates |f − g| separately on each piece. Because each piece uses the absolute difference, regions where the curves swap over add up instead of cancelling out.
What is the area between y = x² and y = x?
They intersect at x = 0 and x = 1, and between them x is above x², so the area is ∫₀¹ (x − x²) dx = 1/2 − 1/3 = 1/6 ≈ 0.1667, which the calculator returns automatically.

More tools