Two Circles Calculator

Two Circles Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

k=(−d+r1+r2)(d+r1−r2)(d−r1+r2)(d+r1+r2)2d,x1=d2+r12−r222d,x2=d−x1,αi=atan2(k,xi),A=r12α1+r22α2−dk,A∪=πr12+πr22−A,Plens=2(r1α1+r2α2)k = \frac{\sqrt{(-d+r_1+r_2)(d+r_1-r_2)(d-r_1+r_2)(d+r_1+r_2)} }{2d},\; x_1 = \frac{d^2 + r_1^2 - r_2^2}{2d}, \quad x_2 = d - x_1,\; \alpha_i = \operatorname{atan2}(k, x_i),\; A = r_1^2\alpha_1 + r_2^2\alpha_2 - d k,\; A_\cup = \pi r_1^2 + \pi r_2^2 - A, \quad P_{lens} = 2(r_1\alpha_1 + r_2\alpha_2)
Usage stats

Advertisement

Results

Union area
99.887021
square units
Overlap area6.927129square units
Area only in circle 171.612687square units
Area only in circle 221.347205square units
Common chord length4.988877
Overlap perimeter11.11374
Outer perimeter of the union39.151742

Report an error on this page

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.

Advertisement

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).

Two overlapping circles with radii 5 and 3, center distance 6, and common chord approximately 4.988877.
For the worked example, radii 5 and 3 and center distance 6 give a common chord of approximately 4.988877.

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.

Advertisement
The overlap and union of two circles, labeled approximately 6.927129 and 99.887021 respectively.
The overlap area is approximately 6.927129; the area covered by the two discs together is approximately 99.887021.

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

Last updated: