**An octagon has 20 diagonals.** A shape's diagonals are determined by counting its number of sides, subtracting three and multiplying that number by the original number of sides. This number is then divided by two to equal the number of diagonals.

The formula for finding the diagonals of a polygon with n-sides is n(n-3)/2. In the case of an octagon, n equals eight, and so the equation would be 8(8-3)/2.

A diagonal is the line that connects two vertices, or points where two sides connect. These lines can be used to divide a segment into pieces evenly and can help mathematicians better understand the way that various shapes work. Diagonals can also be used in reverse to help determine the sides of a particular shape. When drawing diagonals to a shape, the lines will never be on the same plane as the sides. The diagonals will never align with the lines and they will never touch the lines.

While it is possible to simply draw a shape and then draw diagonals through the shape, it is much easier to use the formula. Mathematicians developed this formula to help students, teachers and others easily determine the number of diagonals in a shape without the need to draw.