Regular Polygon
Enter how many sides and the side length.
About this tool
The polygon is equilateral and equiangular.
At least 3 sides are required.
How to use it
- Open this page and provide the input it asks for.
- Set the options that are visible, then use Calculate polygon.
- Read the result in the panel. Copy it or download it when a file is offered. The input stays in this browser.
Limitations
- At least 3 sides are required.
Side count and side length, then tan
The formula in the code
The side count n must be an integer from 3 through 64. The side length s must be greater than zero. The perimeter is n × s, an exact product. The area is (n × s × s) / (4 × tan(π / n)). That expression is the standard regular-polygon area written with the tangent of half the central angle’s related quantity π/n. The panel prints area and perimeter. A hexagon is only the case n = 6. It is not a separate tool.
A hexagon with side two
n = 6 and s = 2. The perimeter is 12. tan(π/6) = 1/√3. The area is (6 × 4) / (4 × tan(π/6)) = 24 × √3 / 4 = 6√3, about 10.3923048454. A square is n = 4 and should agree with side squared: tan(π/4) = 1, so the area formula becomes (4 × s²) / 4 = s². Side 5 therefore prints area 25 and perimeter 20, which is the rectangle page’s square as a special case of this tangent formula.
Counts the page will not attempt
n = 2 is rejected. n = 65 is rejected. A non-integer such as 3.5 is rejected. A side length of zero or less is rejected. The page does not accept an apothem instead of a side, and it does not accept a radius of the circumscribed circle as a substitute for s. If your measurement is the distance from center to vertex, convert it to a side length before typing. The diagram uses the side count to place the vertices. It does not accept a custom angle.
An equilateral triangle as the smallest legal count
n = 3 and s = 6. The perimeter is 18. tan(π/3) = √3, so the area is (3 × 36) / (4√3) = 108 / (4√3) = 27 / √3 = 9√3, about 15.5884572681. That matches the equilateral formula (√3 / 4) × side squared, which is another way to see the tangent expression is not a hexagon-only trick. A count of 64 is the last accepted polygon. Beyond that the tangent of a very small π/n is still mathematically defined, but the page refuses the count rather than drawing a nearly circular fan of sides. If your figure is regular, do not switch to the vertex shoelace form unless you are ready to type every coordinate.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

