<span>If it is a regular octagon, all sides are of equal length, so
multiply the length of one side by 8 to get the perimeter.
For an irregular octagon add together the length of each of the
eight sides to get the perimeter.
</span>
If you know the radius <span>RR</span> of the circle that inscribes a regular polygon having <span>nn</span>sides, the side of the regular polygon can be easily found with trigonometry.
The polygon is composed by <span>nn</span> identical triangles having a common vertex in the center of this circle, therefore this angle is <span><span>2π/n.</span></span>