Boneyard Tools

Polygon Diagonals and Angles Calculator

This calculator takes one number, the count of sides, and returns four results for that polygon at once. It counts the diagonals with the formula n times n minus 3, over 2, then finds the sum of the interior angles, each interior angle of the regular version and the exterior angle. Use the stepper or type any whole number from 3 up to 1000.

How to count polygon diagonals

  1. Enter the number of sides in the field, a whole number of at least 3.
  2. Use the stepper arrows to nudge the count up or down by one, or type the value directly.
  3. Read the diagonals count in the first result card, computed as n times n minus 3, over 2.
  4. Read the interior angle sum, each interior angle and the exterior angle in the remaining cards.
  5. Click Copy result to grab all four values as plain text.

Examples

Hexagon (6 sides)

sides = 6
diagonals = 9, angle sum = 720 deg, interior angle = 120 deg, exterior angle = 60 deg

Decagon (10 sides)

sides = 10
diagonals = 35, angle sum = 1440 deg, interior angle = 144 deg, exterior angle = 36 deg

Heptagon (7 sides), angles rounded

sides = 7
diagonals = 14, angle sum = 900 deg, interior angle = 128.571429 deg, exterior angle = 51.428571 deg

Frequently asked questions

What is the formula for the number of diagonals?

The number of diagonals equals the number of sides times the number of sides minus three, all divided by two, written n times n minus 3, over 2. Each of the n corners connects to every other corner except itself and its two neighbours, which is n minus 3 diagonals per corner, and dividing by two removes the double counting.

Why does a triangle have no diagonals?

A diagonal joins two corners that are not already next to each other. In a triangle every pair of corners is joined by a side, so there is nothing left to join. The formula agrees: 3 times 3 minus 3 is 3 times 0, which is 0.

What is the sum of the interior angles?

The interior angles add up to the number of sides minus two, times 180 degrees. You can see why by slicing the shape into triangles from one corner: an n-sided polygon splits into n minus 2 triangles, and each triangle carries 180 degrees.

Are the interior and exterior angles for a regular polygon?

Yes. Each interior angle is the angle sum divided by the number of sides, and each exterior angle is 360 divided by the number of sides. Those single figures only apply when every angle is equal, which is the regular case. An irregular polygon has the same angle sum but unequal individual angles.

Why do the exterior angles always add to 360 degrees?

Walk once around the boundary of any convex polygon and you turn through a full circle by the time you return to the start. Those turns are the exterior angles, so they total 360 degrees no matter how many sides there are, which is why each one in a regular polygon is 360 over n.

Why are some angles shown with decimals?

When the number of sides does not divide evenly, the angles are not whole numbers. A heptagon gives 900 over 7 for the interior angle, so the tool rounds to six decimal places and shows 128.571429 degrees rather than a repeating decimal.

What values can I enter?

A whole number from 3 to 1000. Fractions and decimals are rejected because a polygon cannot have a fractional side, and anything below 3 is refused because you need at least three sides to enclose a region.

Does it draw the polygon or its diagonals?

No. This is a numeric calculator, not a drawing tool. It returns the diagonal count and the three angle figures as text you can copy, without rendering the shape itself.

Does it run online or on my device?

It runs entirely in your browser with a couple of arithmetic steps, so it works offline once the page has loaded and the number you enter is never sent anywhere.

Learn more

Related tools