Polygon Diagonals Calculator
Find how many diagonals a polygon has, plus its total interior angles, from the side count.
Result
How it is calculated
The tool reads one input, n, the number of sides of a simple polygon. It must be a whole number from 3 up to 1,000,000,000: a decimal such as 12.7, a value below 3, or a larger one shows no result. It returns two values: the diagonal count D = n(n − 3) / 2 and the interior-angle sum S = (n − 2) × 180, in degrees. The angle sum is for the whole polygon, not for one corner. For a regular polygon you can divide S by n to get each angle; the tool does not do that step. A triangle gives 0 diagonals and 180 degrees, since no two of its vertices are non-adjacent.
Worked example
Take a dodecagon, n = 12. Each vertex can join 12 − 3 = 9 others, so there are 12 × 9 = 108 endpoint pairs; every diagonal is counted from both ends, so 108 / 2 = 54 diagonals. For the angles, (12 − 2) × 180 = 10 × 180 = 1,800 degrees. The tool shows 54 diagonals and an interior-angle sum of 1,800. If the dodecagon is regular, each corner is 1,800 / 12 = 150 degrees.
Common mistakes
- Typing the number of vertices and the number of sides as different things: they are always equal for a polygon, so a hexagon is 6, not 5 or 7.
- Expecting the angle result to be one angle. It is the total of all interior angles; divide by the side count yourself for a regular polygon.
- Entering 2 for a two-sided figure, or a value with decimals. Fewer than 3 sides gives no result, and so does a decimal like 12.7; only whole numbers work.
- Using the formula on a star or self-intersecting shape. The formulas assume a simple polygon whose sides do not cross.
- Forgetting the divide-by-two and counting
n(n − 3), which counts every diagonal twice.
About this calculator
A diagonal is any line segment connecting two non-adjacent vertices of a polygon. For a polygon with n sides, the number of diagonals is given by the formula n(n − 3)/2 — each of the n vertices can connect to n − 3 others (excluding itself and its two adjacent neighbors), and dividing by 2 corrects for counting each diagonal twice. The sum of a polygon's interior angles follows a separate but related formula, (n − 2) × 180°, which comes from the fact that any n-sided polygon can be split into n − 2 triangles by drawing diagonals from a single vertex.
These formulas are foundational in geometry education and appear constantly in computational geometry, where counting diagonals relates to triangulation algorithms used in computer graphics, mesh generation, and GIS (geographic information systems) for breaking complex polygons into triangles for rendering or area calculation. Architects and structural engineers also reference diagonal counts when analyzing bracing patterns in polygonal trusses and frameworks.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments