Ptolemy's Theorem Calculator

Enter the four ordered sides and one diagonal to find the other diagonal.

How it is calculated

Label the quadrilateral ABCD going around the vertices: a = AB, b = BC, c = CD, d = DA, and let p = AC be the diagonal you already know. Ptolemy's relation for a cyclic quadrilateral gives:

AC × BD = a·c + b·d
BD = (a·c + b·d) ÷ p

The tool shows the diagonal product a·c + b·d and the missing diagonal BD, both to four decimals, in the length unit you entered. All five numbers must be above zero. The tool also refuses shapes that cannot exist: the longest side must be shorter than the other three together, and the triangles ABC, ACD, ABD and BCD must all satisfy the triangle inequality, otherwise there is no result. It does not check that AC is the diagonal the sides really produce on a circle, so enter a measured or known value.

Worked example

Take sides AB = 25, BC = 60, CD = 39, DA = 52 and a known diagonal AC = 65. The two opposite-side products are a·c = 25 × 39 = 975 and b·d = 60 × 52 = 3120, so the diagonal product is 4,095.0000. Dividing by the known diagonal gives BD = 4095 ÷ 65 = 63.0000. The two diagonals are 65 and 63. As a check, triangles ABC and ACD are right-angled on AC (25² + 60² = 65² and 39² + 52² = 65²), so AC is a diameter and the four corners lie on one circle.

Try this example →

Common mistakes

  • Pairing the wrong sides. The products are AB·CD and BC·DA (opposite sides), not neighbouring sides, so the order a, b, c, d must follow the vertices around the shape.
  • Entering sides in an order that does not go around the shape. Sides 25, 39, 52, 60 with AC = 65 give no result, because 25, 39 and 65 cannot form a triangle; the same four sides taken as 25, 60, 39, 52 work.
  • Using the theorem on a quadrilateral that is not cyclic. For a general quadrilateral AC·BD is only less than or equal to the sum, so the answer is not the true diagonal.
  • Entering a diagonal that is not the one the sides produce. The tool only checks that the triangles can close, so a plausible but wrong AC still returns a number; for a true cyclic shape check that AC² = (ac + bd)(ad + bc) ÷ (ab + cd).
  • Mixing units, such as sides in centimetres and the diagonal in metres. The second diagonal comes out in whatever unit you used, so keep them all the same.

About this calculator

Ptolemy's theorem states that for any cyclic quadrilateral — one whose four vertices all lie on a single circle — the product of the diagonals equals the sum of the products of the two pairs of opposite sides: AC·BD = AB·CD + BC·DA. Given the four side lengths in order and one diagonal, this calculator rearranges the identity to solve for the missing diagonal, a relationship first recorded by the Greek astronomer Ptolemy in the Almagest to build his table of chords.

The theorem is a standard tool in Euclidean geometry courses and competition mathematics, where it's used to prove trigonometric identities (such as the sine addition formula), verify whether four points are concyclic, and solve olympiad-style problems involving inscribed polygons. It also generalizes into Ptolemy's inequality, which holds for any quadrilateral and reduces to equality only in the cyclic case — a fact geometry students and teachers use to test whether a given quadrilateral can be inscribed in a circle at all.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators