Shapes & spaces

Circle rectangle overlap area calculator

Find the common area of a circular disk and an axis-aligned rectangle, with circle and rectangle coverage fractions.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

The overlap is the set of points inside both the circular disk and the rectangle. At each horizontal position, the circle permits a vertical interval and the rectangle permits another. Their common height is integrated over the shared horizontal range. This page translates and scales to a unit circle, splits the range where a rectangle edge meets the circle and evaluates circular-segment antiderivatives on the resulting pieces. It reports area and both objects’ coverage fractions.

THE FORMULAA=∫max(0,min(ymax,cy+√(r²−(x−cx)²))−max(ymin,cy−√(r²−(x−cx)²))) dx.

A worked example

A unit circle centered at the origin meets the rectangle with x and y bounds zero through two in its upper-right quarter. The common area is π/4≈0.78539816. That covers one quarter of the circle but only π/16≈0.19634954 of the rectangle, whose area is four. The same overlap therefore has different fractions depending on which object supplies the denominator.

Good to know

The rectangle must be axis-aligned with strictly increasing x and y bounds. The radius is positive and all lengths share one unit. Formula evaluation is floating point, not a symbolic exact-area certificate. Very thin slivers and near-tangent intersections can lose relative precision. Coordinates are bounded by ±10⁹ and radius by 10⁻⁹ through 10⁹. Rotated rectangles and arbitrary curved boundaries are not supported.

The clipping changes where the rectangle meets each circular branch

A rectangle can contain the whole disk, lie entirely inside it, miss it or cut off several different circular pieces. One segment formula applied to the entire bounding box cannot distinguish all those cases. The vertical-slice construction uses the lower of the two upper bounds and the higher of the two lower bounds, with zero height whenever those bounds do not overlap. Boundary crossings mark where that expression changes.

Scaling to a unit disk keeps the circular primitive consistent across small and large radii. After integration, multiplication by radius squared restores the original area units. Translation does not change the answer, and multiplying every coordinate and radius by ten multiplies the area by one hundred. These geometric identities are useful independent checks when preparing a worksheet or comparing different unit systems.

The upper-right quarter of a unit disk lies inside the default rectangleArea = π/4Disk share 1/4Quarter disk; rectangle continues to 2
The rectangle extends from zero to two in both coordinates. Its common region with the unit disk is one quarter disk, area π/4. The rectangle area is four, so its covered fraction is π/16.

The Convex polygon intersection area calculator from coordinates clips straight-edged regions. This page instead integrates one curved disk boundary against rectangle bounds.

Area fractions need an explicitly named reference object

Circle coverage divides the overlap by πr². Rectangle coverage divides it by width times height. Neither is generally the fraction of the union, and they should not be substituted for intersection-over-union in an image-analysis application. A very large rectangle can cover the entire disk while having only a tiny fraction of its own area covered. The page keeps the two denominators visible rather than returning an ambiguous percentage.

A tangent contact has zero area even though the closed boundaries share a point. Rounding a tiny computed sliver to zero can also happen near tangency, which is a numerical limitation rather than a topological proof of disjointness. If dimensions come from measurements, their uncertainty can dominate such a small overlap. The two-circle overlap calculator answers a related lens-area problem, while this page clips one disk against four straight supporting edges.

A few questions, answered

Can I enter a rotated rectangle?

No. The bounds describe an axis-aligned rectangle. Rotating its corners without changing the method would solve a different shape.

Does the result include the circumference length inside the rectangle?

No. It measures two-dimensional common area. Boundary length would require a different piecewise calculation.

Find your calculator

Start typing to explore the library.