Geometry
Total number of diagonals
Each vertex offers n - 3 diagonals, and multiplying by n counts each one twice, so the product is halved.
Last updated
The Formula
D = n(n - 3) / 2
Each vertex offers n - 3 diagonals, and multiplying by n counts each one twice, so the product is halved.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| n | Number of sides | count | Whole number of three or more; it also equals the number of vertices. |
| n - 3 | Diagonals from one vertex | count | Excludes the vertex itself and its two neighbours. |
| D | Total distinct diagonals | count | Each segment is counted once, after halving the double tally. |
What Each Symbol Means
ncount
Number of sides
Whole number of three or more; it also equals the number of vertices.
n - 3count
Diagonals from one vertex
Excludes the vertex itself and its two neighbours.
Dcount
Total distinct diagonals
Each segment is counted once, after halving the double tally.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to calculate the number of diagonals in a polygon page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Calculate The Number Of Diagonals In A Polygon, filed under Math. Every number the guide produces comes from substituting into this one line.
Common Questions
What is the formula for Total number of diagonals?
The formula for Total number of diagonals is D = n(n - 3) / 2. Each vertex offers n - 3 diagonals, and multiplying by n counts each one twice, so the product is halved.
What does each symbol in Total number of diagonals stand for?
n is number of sides; n - 3 is diagonals from one vertex; D is total distinct diagonals.
What units should I use with Total number of diagonals?
Substitute n as a plain count, n - 3 as a plain count, D as a plain count. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using Total number of diagonals?
Forgetting to divide by two. Reporting n(n - 3) directly doubles the answer: 40 instead of 20 for an octagon. Each diagonal joins two vertices and is therefore encountered twice when you walk around the corners.