The guide
Four kissing circles: why curvature beats radius and why the centre needs its own check
Why Descartes's circle theorem is a short formula in curvatures, why an enclosing circle counts as negative, why a centre needs its own test, and why integer gaskets stay integer.
- 3 and 3 fourth curvatures when the curvatures -1, 2, 2 touch
- 35 and 27 fourth curvatures for -10, 18, 23, both integers
- 2 of 4 centre sign pairs that touch for radii 3, 4 and 12
- 10.6569 wrong answer after dropping the enclosing circle's sign
- 1,456 new circles in a gasket to depth 6, 1,460 in all
Read the full guide Fold the guide
Three circles that touch, and the one that fits
Draw three circles so that each touches the other two. Between them sits a small curved gap, and one more circle fits into it, touching all three. There is a second answer too: another circle that touches the same three from the far side. Finding both is the job of Descartes’s circle theorem.
Descartes took up the question in 1643 in two letters to Princess Elisabeth of the Palatinate. She had been working on the general problem of Apollonius, which asks for circles touching three given circles of any size. When her partial results showed how tedious the general case was, he simplified it to three circles that touch each other, and out of that came the equation.
His own form was an awkward relation between the radii. The theorem was found again by Jakob Steiner in 1826 and by Frederick Soddy in 1936, who published it in a journal as a poem, The Kiss Precise. It says that the sum of the squares of the four bends is half the square of their sum.
The word bend is the old name for curvature, and the poem hides the whole trick. The formula is short because it uses curvature, the reciprocal of the radius, rather than the radius itself.
Why curvature, and why the sign
Write k for 1 divided by r. A small circle has a large curvature and a huge circle has a curvature near zero. A straight line is the limit of a circle with ever larger radius, so it has curvature exactly zero and simply drops out of the sums.
For four circles that touch at six separate points, 2 times the sum of the four squared curvatures equals the square of their sum. Solve that as a quadratic in the fourth curvature and you get k4 equal to k1 plus k2 plus k3, plus or minus twice the square root of k1 k2 plus k2 k3 plus k3 k1. The two signs give the two possible circles.
Here is where the sign convention matters. A circle that encloses the others must be given a negative curvature. Take an outer circle of radius 1 with two circles of radius one half inside it, touching it and each other. The curvatures are minus 1, 2 and 2, and the formula gives a fourth curvature of 3 and 3: two circles of radius one third, one above the middle and one below.
A quick check shows the relation at work. The four curvatures minus 1, 2, 2 and 3 add up to 6, and 6 squared is 36. The squares add up to 1, 4, 4 and 9, which is 18, and twice that is 36 as well. If the two sides ever disagree, the four circles do not all touch.
Drop the minus sign and the answer is wrong. The set 1, 2, 2 gives 10.6569 and minus 0.6569, which describes a different arrangement entirely, and no circle there touches the outer one. Treating a negative result as an error is a mistake of the same kind, because it just means the new circle holds the other three.
Two details are easy to miss. If the root under the square root is zero, as it is here, the two curvatures are equal, yet the circles are still different. And if the quantity under the root is negative, the three circles cannot all touch, so there is no real fourth circle.
The centre needs its own check
Curvature gives the size of the new circle but not where it sits. For the centre there is a complex version of the theorem. Treat each centre as a complex number z and the relation has the same shape, with each curvature multiplied by its centre. Solving it gives z4 as a sum of the three centres weighted by curvature, plus or minus twice a square root, all divided by k4.
The trap sits in that plus or minus. It does not necessarily correspond to the plus or minus in the formula for k4. A tool that pairs the plus with the plus can place the centre in the wrong spot while the curvature looks perfect.
The cure is to test. For each of the four sign pairs, compute the candidate centre and check that its distance to every given centre equals the sum or difference of the radii. Take three circles of radius 3, 4 and 12. The curvatures are one third, one quarter and one twelfth, the inner solution has curvature 1.39315, and the other has curvature minus 0.05982, a circle of radius 16.7178 that encloses all three.
Only 2 of 4 sign pairs pass the distance test. Pairing the plus sign with both curvatures puts the enclosing circle’s centre at minus 67.483 minus 54.256i, which is 86.589 from the first circle when it should be 13.718. The honest method is to try every sign and keep what passes.
The idea is older and wider than the poem. Japanese mathematicians treated problems of circles and their tangencies often, and Yamaji Nushizumi stated a form of the circle theorem in 1751, also as a relation between radii. The special case of one straight line with three circles was recorded on a sangaku tablet in 1824. Each rediscovery wrote the same relation, and each time the clearest way to write it turned out to be curvature.
Why integer gaskets stay integer
Suppose the four starting curvatures are all whole numbers. The second solution of the quadratic differs from the first by an integer, because both differ from an integer by the square root of an integer, so it must be an integer too. Replace one circle by its alternative, and you get another quadruple of integers.
The curvatures minus 10, 18 and 23 are a case in point. The formula gives 35 and 27, both integers, and either one completes a quadruple that can be reflected again. Do it again and again, in every possible way, and you build an Apollonian gasket, an infinite set of circles filling every gap. Each replacement is 2 times the sum of the other three curvatures, minus the old one, so adding, doubling and subtracting integers can never produce a fraction. That is why the gasket from minus 10, 18, 23 and 27 is made entirely of integer curvatures.
The count of circles grows quickly. Each new circle opens three fresh gaps, never one back through the circle it replaced, so a generation has three times as many as the one before. Starting from the four circles, the generations add 4, 12, 36, 108 circles and so on. To depth 6 that is 1,456 new circles, and 1,460 with the first four.
The result is a fractal with a dimension of about 1.3057, which means it is more than a curve and less than a filled region. The same rules, with a straight line in the quadruple 0, 0, 1, 1, build the Ford circles that sit on the number line at the rational points.
What the calculator does and does not do
The calculator takes three circles by curvature or by radius, with optional centres. It gives both fourth curvatures, tests all four sign pairs, checks every distance, verifies the quadruple relation, draws the circles and builds the gasket to the depth you choose.
It solves one problem only: the fourth circle for three circles that touch each other. It does not solve the general problem of Apollonius, circles that are not mutually tangent, spheres in three dimensions, or packings beyond the gasket recursion shown. A straight line among the inputs is placed on the x axis.
Every answer is verified rather than trusted. For each fourth circle the page measures the distance between every pair of centres and compares it with the sum of the two radii, or their difference for a circle inside another. It then repeats the centre search by a separate numerical method, Newton’s method, from several starting points, and checks that the two routes land on the same point. A result that fails either test is reported as a failure, not rounded into agreement.
Use it to see why the formula needs signed curvatures, why the centre has its own test, and why a gasket of integers never leaves the integers.
Sources
Every source consulted for this guide. Links checked November 22, 2026.
- Descartes's theorem Wikipedia (CC BY-SA)
- Apollonian gasket Wikipedia (CC BY-SA)
- Problem of Apollonius Wikipedia (CC BY-SA)
- Curvature Wikipedia (CC BY-SA)
- Inversive geometry Wikipedia (CC BY-SA)
- Soddy's hexlet Wikipedia (CC BY-SA)
- Frederick Soddy Wikipedia (CC BY-SA)
- Ford circle Wikipedia (CC BY-SA)
- Complex number Wikipedia (CC BY-SA)
- René Descartes Wikipedia (CC BY-SA)
- Elisabeth of the Palatinate Wikipedia (CC BY-SA)
- Circle packing Wikipedia (CC BY-SA)
- Steiner chain Wikipedia (CC BY-SA)
- Math.hypot() MDN Web Docs (CC BY-SA)