Number of Diagonals
Count of diagonals in an n-sided polygon.
Live Calculator
MembersVariables
Example
Hexagon has 9 diagonals
How it works
A polygon with n vertices has a diagonal joining any two non-adjacent vertices. From each vertex, you can connect to n - 3 other vertices by diagonals, because you cannot connect to itself or its two neighbors; this gives n(n - 3) connections if counted from every vertex. But each diagonal is counted twice, once from each end, so dividing by 2 gives D = n(n - 3)/2.
When to use it
Use this formula when you need to find how many diagonals a polygon has without drawing them all. It is common in geometry problems, pattern spotting, and combinatorics questions involving polygons.
Worked example, step by step
Find the number of diagonals in an octagon. Use the formula D = n(n - 3)/2 Substitute n = 8: D = 8(8 - 3)/2 Simplify inside the brackets: D = 8 × 5 / 2 Calculate: D = 40 / 2 Final answer: D = 20 diagonals
Common mistakes to avoid
- Forgetting to divide by 2 and counting each diagonal twice
- Using the formula for the number of sides instead of the number of diagonals
- Including the sides of the polygon as diagonals
Did You Know?
A polygon with n sides has n(n−3)/2 diagonals, so a humble decagon already hides 35 of them.
Share this formula
More in Geometry & Trigonometry
View allPythagorean Theorem
BasicRelates the sides of a right triangle.
Area of a Circle
BasicThe area enclosed by a circle.
Circumference of a Circle
BasicThe perimeter (boundary length) of a circle.
Equation of a Circle
IntermediateThe standard form of the equation of a circle with centre (h, k) and radius r.
Area of a Rectangle
BasicArea of a rectangle.
Area of a Triangle
BasicArea of a triangle from base and height.