Shapes & spaces

Regular polygon diagonal count calculator

Count all segments between nonadjacent vertices, counting each pair once.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Each vertex reaches n−3 nonadjacent vertices. Dividing by two removes the double count from the two endpoints.

THE FORMULAn(n−3)/2

A worked example

An octagon has 8 × 5 ÷ 2 = 20 diagonals.

Good to know

The same count applies to any simple polygon with n distinct vertices.

Read the result

Count all segments between nonadjacent vertices, counting each pair once.

The primary result is labeled “Diagonals”. Keep the input definitions in view when comparing this result with another method.

Try a related calculation

The same count applies to any simple polygon with n distinct vertices.

For a related exercise, try the circle calculator.

A few questions, answered

How can I check the default inputs by hand?

An octagon has 8 × 5 ÷ 2 = 20 diagonals.

Which rule does this calculator apply?

n(n−3)/2

Find your calculator

Start typing to explore the library.