It should be noted that a line segment that connects two consecutive vertices of a polygon is a side of the polygon, not a diagonal. This means that triangles have no diagonals. The number of diagonals in an n-sided polygon can be calculated using the following formula.