The Polygon Perimeter from Inner Radius and Number of Sides calculator computes the length of the perimeter of a regular polygon of (n) sides that is inscribed inside a circle of radius (r).
INSTRUCTIONS: Choose units and enter the following:
Polygon Perimeter (P): The calculator return to total perimeter of the regular polygon in meters. However this can be automatically converted to compatible units via the pull-down menu.
P = 2⋅n⋅r⋅tan(π/n)
A regular n-sided polygon is a polygon with n equal length sides and is a polygon which also has n equal angles at the n vertices of the polygon. Because of the symmetries of this construction, a radius of the circle intersects the sides of the polygon at a right angle. As shown in the picture, Figure 1, lines from the vertices to the circle's center form isosceles triangles with the sides of the regular polygon.
The n-sided area of a regular polygon, as can be seen in Figure 1, is comprised of n isosceles triangles. The polygons is constructed to have the circle intersect each of the sides of the polygon at exactly one point on each side of the polygon, and thus each side of the polygon is tangent to the circle at the point where the radius intersects the polygon's side. It also can be shown that the radii through the point s/2 on the side of the polygon splits each triangle into two equal right triangles.
If we imagine the sides of the polygon as the bases of these isosceles triangles, then we can see the perimeter of the polygon is given by the simple formula:
 `Perimeter_"(polygon)" = n * s`
We can find the length of the polygons side s by noting first that the triangle with base s/2 and height r is a right triangle. We also note that the angle, `alpha`, is given by:
 `alpha = (2 * pi) /n`
We also see that line L is the hypotenuse of the right triangle and thus relates r and s/2 as:
 `tan(alpha/2) = (1/2s) / r`
Substituting equation  into equation  we get:
 `tan( ((2*pi) / n)/2 ) = s / (2*r)`
And rearranging we get the polygon side, s, in terms of the radius, r, and the number of sides of the regular polygon, n:
 `s = 2*r *tan( pi / n)`
Finally to calculate the total perimeter of the regular polygon, we substitute equation  into equation :
 `Perimeter_"(polygon)" = n * 2*r * tan( pi / n)`