Cyclic Quadrilateral Calculator

Find the area and diagonal product of a quadrilateral whose four corners lie on one circle, using just its four side lengths.

Math and PercentUpdated 2026-11-183 min read
Cyclic Quadrilateral Calculator
Sides are entered in order around the quadrilateral.
Area by Brahmagupta's formula
...
Semiperimeter s...
Perimeter...
Diagonal product, ac + bd...

What it does

A cyclic quadrilateral is a four sided figure whose vertices all sit on one circle. The circle is called the circumcircle. Because the corners lie on a circle, opposite angles are supplementary, meaning each pair adds to 180 degrees. That single fact unlocks several clean formulas that would not hold for an ordinary quadrilateral.

The most useful of these is Brahmagupta's formula for area. It uses only the four side lengths and the semiperimeter, with no angles and no height to measure. The result is also the largest area any quadrilateral with those four side lengths can have. Setting one side to zero turns it into Heron's formula for a triangle, so the two belong to the same family.

Ptolemy's theorem adds another relation. In a cyclic quadrilateral the product of the two diagonals equals the sum of the products of opposite sides, written ac + bd when the sides run a, b, c, d around the figure. It is a favorite in contest geometry and gives a quick check on a drawn figure.

This tool takes the four sides in order and returns the area, the semiperimeter, the perimeter and the diagonal product. It also checks that the four lengths can form a quadrilateral at all, since a side longer than the other three combined makes the figure impossible.

The underlying model is a convex cyclic quadrilateral in a flat plane. A crossed quadrilateral needs different treatment, and four arbitrary side lengths only guarantee a cyclic figure because a suitable circle can always be fitted to a valid convex set. All lengths must use the same unit, and the area comes back in square units.

How to use

  1. Check that the four side lengths can form a quadrilateral, with no side longer than the other three together.
  2. Enter the sides in order around the figure as a, b, c and d.
  3. Read the perimeter, which is the sum of the four sides, and the semiperimeter s, which is half of it.
  4. Read the area computed by Brahmagupta's formula from s and the four sides.
  5. Read the diagonal product ac + bd given by Ptolemy's theorem.
  6. Use one length unit for all four sides, so the area is reported in square units.

Formula

s = (a + b + c + d) / 2. Area K = sqrt((s - a)(s - b)(s - c)(s - d)). Diagonal product p x q = ac + bd, where a, b, c, d are the sides in order.
a, b, c, d
The four side lengths taken in order around the quadrilateral.
s
The semiperimeter, half the sum of the four sides.
K
The area of the cyclic quadrilateral, in square units.
p, q
The two diagonals of the quadrilateral.

Brahmagupta's formula applies to a convex cyclic quadrilateral and assumes opposite angles sum to 180 degrees. Four positive sides form a valid quadrilateral only when each side is shorter than the sum of the other three. A rectangle is a simple check case: its area from the formula matches length times width, and its diagonal product matches the square of one diagonal. The formula is a special case of Bretschneider's formula for any quadrilateral.

Worked example

Example: sides 7, 15, 20 and 24

Defaults: a = 7, b = 15, c = 20 and d = 24, entered in order around the figure.

  1. Add the sides: perimeter = 7 + 15 + 20 + 24 = 66.
  2. Halve it: s = 66 / 2 = 33.
  3. Find the four factors: 33 - 7 = 26, 33 - 15 = 18, 33 - 20 = 13 and 33 - 24 = 9.
  4. Multiply the factors: 26 x 18 x 13 x 9 = 54756.
  5. Take the square root: area = sqrt(54756) = 234.
  6. Ptolemy product: ac + bd = 7 x 20 + 15 x 24 = 140 + 360 = 500.
  7. The tool shows area 234, semiperimeter 33, perimeter 66 and diagonal product 500.

Reference table

Area and diagonal product for three sets of four side lengths
Sides a, b, c, dsArea Kac + bd
7, 15, 20, 2433234500
6, 5, 6, 5113061
3, 4, 5, 6918.973739

Limits

  • Models a convex cyclic quadrilateral only, not a crossed one.
  • If a side is at least the sum of the other three, no quadrilateral exists and the tool stops with a message.
  • Assumes the four sides can be arranged on one circle, and ignores small errors in measured side lengths.
  • Gives the diagonal product, not each diagonal separately, since four sides do not fix the individual diagonals.

Common mistakes

  • Entering the sides out of order, which changes the Ptolemy pairing of opposite sides.
  • Using the full perimeter instead of the semiperimeter in Brahmagupta's formula.
  • Applying the formula to a quadrilateral that is not cyclic, where the area would be smaller.
  • Forgetting to take the square root after multiplying the four semiperimeter differences.
  • Expecting a single diagonal length when the data only determines the product of the two diagonals.

Try it yourself

Quick checks. Answers sit tucked under each question.

A cyclic quadrilateral has sides 6, 5, 6 and 5 in order. Find s and the area.

Perimeter = 22, so s = 11. The factors are 5, 6, 5 and 6, whose product is 900. Area = sqrt(900) = 30, which matches a 6 by 5 rectangle.

Find the diagonal product for sides 3, 4, 5 and 6 in order.

Ptolemy gives ac + bd = 3 x 5 + 4 x 6 = 15 + 24 = 39.

Can sides 2, 3, 4 and 11 form a quadrilateral?

No. The largest side 11 is greater than 2 + 3 + 4 = 9, so the figure is impossible and the tool returns an error.

Questions

What is a cyclic quadrilateral?

A four sided figure whose four vertices all lie on one circle. Its opposite angles are supplementary, adding to 180 degrees.

What does Brahmagupta's formula compute?

The area of a convex cyclic quadrilateral from its four sides: the square root of (s-a)(s-b)(s-c)(s-d), with s the semiperimeter.

What does Ptolemy's theorem give here?

It says the product of the two diagonals equals ac + bd, the sum of the products of opposite sides.

Why can one side not be too long?

A quadrilateral requires each side to be shorter than the other three combined. Otherwise the ends cannot meet and no circle can close the figure.

Does the order of the sides matter?

The area does not depend on order, but the Ptolemy pairing does. Enter the sides as they run around the figure so opposite sides are paired correctly.

Is this related to Heron's formula?

Yes. Brahmagupta's formula reduces to Heron's formula for a triangle when one side is set to zero.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.