The polygon diagonals formula explained
Where n times n minus 3 over 2 comes from, why you divide by two, and how the count grows as a polygon gains sides.
Counting connections from each corner
Start at any one corner of an n-sided polygon and ask how many diagonals leave it. You can draw a line to every other corner, but three of those lines are not diagonals: the line to itself does not exist, and the lines to the two neighbouring corners are sides, not diagonals. That leaves n minus 3 genuine diagonals from every corner. Since there are n corners, a first guess is n times n minus 3 lines in total.
Why you divide by two
That first guess counts every diagonal twice. The diagonal from corner A to corner C is the very same segment as the one from C to A, yet the corner-by-corner tally records it once at A and once at C. To fix the double counting you halve the total, which turns n times n minus 3 into n times n minus 3, over 2. This is exactly the formula the calculator uses, and it always lands on a whole number because one of n and n minus 3 is even.
How fast the count grows
Because the formula multiplies two terms that both rise with n, the diagonal count climbs far faster than the side count. A pentagon has 5 diagonals, a hexagon has 9, a decagon has 35, and a 20-sided icosagon already has 170. Add just one side and you add a diagonal to every existing corner plus the new corner's own set. This quadratic growth is why complex polygons look like a dense web of crossing lines even though each corner only reaches a handful of partners.
Diagonals versus the angle results
The diagonal count is pure combinatorics: it depends only on how many corners exist, not on their positions, so a squashed irregular hexagon has the same 9 diagonals as a perfect one. The angle figures beside it are geometric instead. The interior angle sum of n minus 2 times 180 holds for any simple polygon, but the single interior and exterior angle values assume a regular shape where every angle matches. Reading the two kinds of result together tells you both the structure and the shape.