Regular Polygon Calculator

Find the perimeter and area of a regular polygon.

How it is calculated

A regular polygon has n equal sides of length s and equal angles. The perimeter is simply P = n × s. The area is A = ¼ × n × s² ÷ tan(π ÷ n), where the angle is in radians; this works for any number of sides from 3 upward. The number of sides is rounded to the nearest whole number, and values below 3 give no result, as does a side length of zero or less. Use one length unit throughout: the perimeter then comes out in that unit and the area in that unit squared. The tool labels them "units" and "units²" since no unit is assumed. It is for regular polygons only.

Worked example

A regular hexagon with side 4. Perimeter = 6 × 4 = 24. Area: ¼ × 6 × 4² = ¼ × 6 × 16 = 24, divided by tan(π ÷ 6) = tan(30°) ≈ 0.5774, so 24 ÷ 0.5774 ≈ 41.57. The tool shows a perimeter of 24.00 units and an area of 41.57 units². A hexagon fits six equilateral triangles, each of area about 6.93.

Try this example →

Common mistakes

  • Using it for an irregular polygon. The formulas need all sides and angles equal, otherwise the area is wrong.
  • Entering the distance across the shape instead of one side. The input is the length of a single side.
  • Typing a non-whole number of sides, such as 5.4. It is rounded to 5, which may hide a typo.
  • Mixing units. The area is in the square of whatever unit the side uses, so cm gives cm².
  • Entering 2 sides and expecting something. A polygon needs at least 3 sides, so smaller counts give no result.

About this calculator

This calculator finds the perimeter, P = n·s, and area, A = (1/4)·n·s²·cot(π/n), of any regular polygon from its number of sides n and side length s, where the area formula comes from splitting the polygon into n congruent isosceles triangles meeting at the center and using the cotangent of the half-angle at the apex. This generalizes the familiar formulas for squares, pentagons, and hexagons into a single equation that works for any number of sides.

Architects and land surveyors use it when laying out regular-shaped plots, gazebos, or plaza tiles, and CAD and graphics developers use the same geometry when generating polygon shapes programmatically. Geometry and trigonometry students use this calculator to check homework involving pentagons, hexagons, or higher-order polygons, and game developers building tile-based or procedurally generated environments use it to compute exact polygon dimensions.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators