What this calculator does
Two circles with radii r₁ and r₂ whose centres are a distance d apart. Where they overlap, the common region is a lens bounded by an arc of each circle; the calculator gives that overlap, the area the two discs cover together, the parts that belong to one circle only, and the common chord through the two crossing points. Circles that are apart (d ≥ r₁ + r₂) have no overlap, and when one circle lies inside the other (d ≤ |r₁ − r₂|) the overlap is the whole smaller disc.
Formulas
Half the common chord:
\[ k = \frac{\sqrt{(-d+r_1+r_2)(d+r_1-r_2)(d-r_1+r_2)(d+r_1+r_2)} }{2d} \]
Distance from centre 1 to the chord:
\[ x_1 = \frac{d^2 + r_1^2 - r_2^2}{2d}, \quad x_2 = d - x_1 \]
Half-angles:
\[ \alpha_i = \operatorname{atan2}(k, x_i) \]
Overlap (lens) area:
\[ A = r_1^2\alpha_1 + r_2^2\alpha_2 - d k \]
Union and perimeters:
\[ A_\cup = \pi r_1^2 + \pi r_2^2 - A, \quad P_{lens} = 2(r_1\alpha_1 + r_2\alpha_2) \]
Derivation
The lens is two circular segments cut off by the common chord. Each segment is a sector of angle 2α minus the triangle from that circle\u2019s centre to the chord, \(r_i^2\alpha_i - x_i k\); since \(x_1 + x_2 = d\) the two triangles add up to d·k. The half chord k is the height of the triangle with sides r₁, r₂ and d, from Heron\u2019s formula. The union area counts the overlap once (inclusion–exclusion), and its outline is the part of each circle outside the other, angles 2π − 2α.
$$ A = r_1^2\alpha_1 + r_2^2\alpha_2 - d k $$
Solving from what you know
Choose what you know: Both radii and the distance between the centres. The calculator first solves for the defining size and then computes every other value from the formulas above. A size of 0 or less, or a combination that cannot form the shape, is refused with a sentence that says why.
Worked example
With the defaults r₁ = 5, r₂ = 3, d = 6: the common chord is ≈ 4.988877, the overlap ≈ 6.927129, and the two discs cover ≈ 99.887021 together.
Results are accurate to at least 9 significant digits for ordinary inputs. When a result depends on the small difference of two nearly equal entries (closer than one part in a million), fewer digits are reliable. Values are shown with up to 6 decimal places. The unit you pick is a label: lengths are shown in that unit and areas in its square.
Lengths from 0.000001 to 1,000,000,000 are accepted (and 0 where a size of 0 makes sense).
Frequently asked questions
What if the circles do not touch?
For d ≥ r₁ + r₂ the overlap is 0 and the union is the sum of the two disc areas.
What if one circle is inside the other?
For d ≤ |r₁ − r₂| the overlap is the whole smaller disc, and the union is the larger disc.
Is this the Venn diagram area?
Yes: the overlap is the middle region of a two-set Venn diagram drawn with circles, and the "only" areas are the two outer regions.
How accurate are the results?
Results are accurate to at least 9 significant digits for ordinary inputs. When a result depends on the small difference of two nearly equal entries (closer than one part in a million), fewer digits are reliable.
References
The formulas on this page are derived here, step by step, from the standard formulas for the circle, the circular sector and the circular segment, which the reference below contains.
D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulae, 33rd edition, CRC Press, 2018