Geometry & Shapes
Polygon Diagonals: Count Them or Find Their Length
Distinguish a polygon’s diagonal count from diagonal length, derive the count formula, and calculate rectangle and regular-polygon examples.
Decide whether the question asks for count or length
A diagonal joins two nonadjacent vertices. “Calculate the diagonal” can mean how many diagonals a polygon has or how long a particular one is. Side count alone is enough for the usual total-count formula, but not for a diagonal’s physical length. Even a regular hexagon has two different diagonal lengths. State the requested quantity before selecting a calculator, since a correct count such as 9 is not a length without any unit or specified scale.
Derive the diagonal count
At one vertex of an n-sided convex polygon, exclude the vertex itself and its two neighbouring vertices. This leaves n − 3 diagonal endpoints. Across all n vertices there are n(n − 3) endpoint-based counts, with every diagonal counted twice. Therefore D = n(n − 3)/2. A hexagon has 6 × 3 / 2 = 9 diagonals, while a triangle has zero. The count includes all vertex-to-vertex diagonals, regardless of whether some have the same length.
Calculate a rectangle’s diagonal length
The diagonal of a rectangle is the hypotenuse of a right triangle formed by its length and width. For dimensions 9 and 12, d = √(9² + 12²) = 15. Both diagonals have this length. A square of side s is the special case d = s√2, so a side of 5 gives diagonal 5√2, approximately 7.0711. Neither result comes from the count formula: a rectangle always has two diagonals, whether it is tiny or very large.
Distinguish diagonal spans in a regular polygon
For a regular n-gon with circumradius R, vertices separated by k steps have chord length 2R sin(kπ/n). Adjacent vertices have k = 1 and form a side; larger k values describe diagonals. In a regular hexagon of side s, R = s. A two-step diagonal is s√3 and a three-step diagonal is 2s. For s = 4, those lengths are approximately 6.9282 and 8. The sine formula uses radians as written; an equivalent degree argument is 180k/n degrees. Equivalent spans counted from opposite ends describe the same chord.
Check whether the polygon is regular
A polygon has a closed boundary made from straight segments. A regular polygon has equal side lengths and equal interior angles. Equal sides alone do not guarantee regularity: a rhombus can have equal sides but unequal angles. Likewise, a rectangle can have equal angles without equal sides. The regular-polygon calculator takes one side length and a side count, so its area and angle results depend on the regularity assumption. Do not feed an average side length into that form and treat the result as the measured area of an irregular plot.
Keep the measurement types distinct
Side lengths and perimeter use ordinary length units; area uses square units; angles use degrees or radians. If every length in a similar figure is multiplied by k, perimeter multiplies by k and area by k², while angles remain unchanged. This gives a direct check on a calculation with a converted side length. Converting centimetres to metres before calculating should describe the same figure as converting the final square centimetres to square metres, provided the area conversion factor is squared rather than copied from the length conversion.
List enough information to determine the answer
A side count identifies a broad class of shapes, but it does not usually determine their size or area. A perimeter likewise allows many different irregular shapes. Label which conditions are given and which are assumptions, and sketch the boundary before substituting numbers. For coordinate data, preserve the order around the boundary; sorting vertices simply by x-coordinate can create crossing segments. A photograph or drawing is not automatically to scale. Calculator output describes the ideal geometry entered into its fields, so retain the underlying measurements and assumptions when reporting a result.
Calculator for the supported step
For the rectangular length example, enter length 9 and width 12 in the Rectangle Calculator to obtain diagonal 15. General polygon diagonal counts use the formula below.