Regular Polygon Calculator: Area, Perimeter, Interior Angle
About this calculator The regular polygon calculator takes the number of sides n n n and the side length s s s and returns the area A = n s 2 4 tan ( π / n ) A = \dfrac{n s^2}{4\tan(\pi/n)} A = 4 tan ( π / n ) n s 2 , the perimeter P = n s P = ns P = n s and each interior angle ( n − 2 ) ⋅ 180 ∘ n \dfrac{(n-2)\cdot 180^\circ}{n} n ( n − 2 ) ⋅ 18 0 ∘ . It can also work backwards, solving the side length from the area and the number of sides.
A “regular polygon” is one whose sides are all equal and whose angles are all equal: the equilateral triangle, the square, the regular pentagon, the regular hexagon (nuts, honeycomb), the regular octagon (stop signs), and so on. As long as a shape meets both conditions, measuring one side tells you everything. It strings together the triangle and square of elementary geometry and the circle (the limit as n → ∞ n \to \infty n → ∞ ), and is the starting point for understanding how polygons approximate a circle.
What it does not do: it does not handle irregular polygons (shapes with unequal sides or angles must be split into triangles and computed piece by piece), it does not handle star polygons, and it does not convert units—whatever unit the side is in, the area is in its square.
How to use this calculator 01 Open the panel this page corresponds to “Math tools → Formulas → Regular polygon” (/#/mathtools/formula?calculator=calculator.regular-polygon). It opens with “Sides n” = 6 and “Side s” = 5 filled in, and the area, perimeter and interior angle computed at once. 02 Find area, perimeter and interior angle change the number of sides and the side length; fields marked “input” are yours, the three marked “computed” update live. Enter an integer of 3 or more for the number of sides. 03 Solve the side length from the area clear “Side s”, enter the known area in “Area” and keep “Sides n”; the side field switches to “computed” and shows the result. Note that “Perimeter” then shows 0 (the engine computes the perimeter with the empty side as 0, and the solved side is not fed back); enter the result into the side field by hand to see the perimeter. 04 Read the results values are shown to at most 8 decimal places with trailing zeros removed—for example the area of a regular hexagon with side 5 appears as 64.95190528; for integer n n n the interior angle is usually an integer or a terminating decimal (regular pentagon 108, regular heptagon 128.57142857). 05 Copy the formula the copy button to the right of the panel title copies the formula text A = n×s²/(4tan(π/n)) to the clipboard.
Worked examples All four examples were recomputed by the engine’s regular-polygon compute routine; the display convention is at most 8 decimal places with trailing zeros removed.
Example 1: default inputs, a regular hexagon with side 5
Inputs: n = 6 n = 6 n = 6 , s = 5 s = 5 s = 5 .
Half the central angle π / 6 = 30 ∘ \pi/6 = 30^\circ π /6 = 3 0 ∘ , tan 30 ∘ = 0.57735027 \tan 30^\circ = 0.57735027 tan 3 0 ∘ = 0.57735027 .
Area A = 6 × 25 4 × 0.57735027 = 150 2.30940108 = 64.95190528 A = \dfrac{6 \times 25}{4 \times 0.57735027} = \dfrac{150}{2.30940108} = 64.95190528 A = 4 × 0.57735027 6 × 25 = 2.30940108 150 = 64.95190528 .
Perimeter P = 6 × 5 = 30 P = 6 \times 5 = 30 P = 6 × 5 = 30 .
Interior angle = ( 6 − 2 ) × 180 ∘ / 6 = 120 ∘ = (6-2)\times 180^\circ / 6 = 120^\circ = ( 6 − 2 ) × 18 0 ∘ /6 = 12 0 ∘ .
Interface shows: area 64.95190528 , perimeter 30 , interior angle 120 . Hand check: apothem a = 5 / ( 2 tan 30 ∘ ) = 4.33012702 a = 5/(2\tan 30^\circ) = 4.33012702 a = 5/ ( 2 tan 3 0 ∘ ) = 4.33012702 , area = 1 2 × 30 × 4.33012702 = 64.95190528 = \tfrac12 \times 30 \times 4.33012702 = 64.95190528 = 2 1 × 30 × 4.33012702 = 64.95190528 , in agreement; circumradius R = 5 / ( 2 sin 30 ∘ ) = 5 = s R = 5/(2\sin 30^\circ) = 5 = s R = 5/ ( 2 sin 3 0 ∘ ) = 5 = s —the regular hexagon is the only regular polygon whose circumradius equals its side, because it is made of 6 equilateral triangles.
Figure 1: the regular hexagon of Example 1. Area = 6 isosceles triangles of base s and height a
Example 2: equilateral triangle and square—checking against familiar formulas
Enter n = 3 n = 3 n = 3 , s = 4 s = 4 s = 4 :
tan ( π / 3 ) = tan 60 ∘ = 1.73205081 \tan(\pi/3) = \tan 60^\circ = 1.73205081 tan ( π /3 ) = tan 6 0 ∘ = 1.73205081 .
A = 3 × 16 4 × 1.73205081 = 48 6.92820323 = 6.92820323 A = \dfrac{3 \times 16}{4 \times 1.73205081} = \dfrac{48}{6.92820323} = 6.92820323 A = 4 × 1.73205081 3 × 16 = 6.92820323 48 = 6.92820323 .
Interface shows: area 6.92820323 , perimeter 12 , interior angle 60 . This equals the school formula 3 4 s 2 = 3 4 × 16 = 4 3 = 6.92820323 \dfrac{\sqrt 3}{4}s^2 = \dfrac{\sqrt 3}{4}\times 16 = 4\sqrt 3 = 6.92820323 4 3 s 2 = 4 3 × 16 = 4 3 = 6.92820323 .
Enter n = 4 n = 4 n = 4 , s = 4 s = 4 s = 4 : tan 45 ∘ = 1 \tan 45^\circ = 1 tan 4 5 ∘ = 1 , A = 4 × 16 / 4 = 16 = s 2 A = 4 \times 16 / 4 = 16 = s^2 A = 4 × 16/4 = 16 = s 2 ; the interface shows area 16 , perimeter 16 , interior angle 90 —the square’s formula s 2 s^2 s 2 is the general formula’s special case at n = 4 n = 4 n = 4 .
Example 3: a stop sign—a regular octagon with side 10
Inputs: n = 8 n = 8 n = 8 , s = 10 s = 10 s = 10 .
tan ( π / 8 ) = tan 22.5 ∘ = 0.41421356 = 2 − 1 \tan(\pi/8) = \tan 22.5^\circ = 0.41421356 = \sqrt 2 - 1 tan ( π /8 ) = tan 22. 5 ∘ = 0.41421356 = 2 − 1 .
A = 8 × 100 4 × 0.41421356 = 800 1.65685425 = 482.84271247 A = \dfrac{8 \times 100}{4 \times 0.41421356} = \dfrac{800}{1.65685425} = 482.84271247 A = 4 × 0.41421356 8 × 100 = 1.65685425 800 = 482.84271247 .
P = 80 P = 80 P = 80 , interior angle = 6 × 180 ∘ / 8 = 135 ∘ = 6 \times 180^\circ / 8 = 135^\circ = 6 × 18 0 ∘ /8 = 13 5 ∘ .
Interface shows: area 482.84271247 , perimeter 80 , interior angle 135 . In closed form A = 2 ( 1 + 2 ) s 2 = 200 ( 1 + 2 ) = 482.84271247 A = 2(1+\sqrt 2)s^2 = 200(1+\sqrt 2) = 482.84271247 A = 2 ( 1 + 2 ) s 2 = 200 ( 1 + 2 ) = 482.84271247 . If the side is in centimetres, such a sign has an area of about 0.048 m²; the apothem is a = 10 / ( 2 tan 22.5 ∘ ) = 12.07106781 a = 10/(2\tan 22.5^\circ) = 12.07106781 a = 10/ ( 2 tan 22. 5 ∘ ) = 12.07106781 , so the “distance across flats” (as one would measure with a spanner) is 2 a = 24.14 2a = 24.14 2 a = 24.14 .
Example 4: solving the side, and approaching a circle for large n
Inputs: area A = 100 A = 100 A = 100 , n = 6 n = 6 n = 6 (side cleared).
s = 4 × 100 × tan 30 ∘ 6 = 230.94010768 6 = 38.49001795 = 6.20403239 s = \sqrt{\dfrac{4 \times 100 \times \tan 30^\circ}{6}} = \sqrt{\dfrac{230.94010768}{6}} = \sqrt{38.49001795} = 6.20403239 s = 6 4 × 100 × tan 3 0 ∘ = 6 230.94010768 = 38.49001795 = 6.20403239 .
Interface shows: side s 6.20403239 , interior angle 120; “Perimeter” shows 0 (see the convention note in step 3). Entering 6.20403239 back into the side field gives perimeter 37.22419436.
Enter n = 360 n = 360 n = 360 , s = 1 s = 1 s = 1 : area 10312.97851164 , perimeter 360 , interior angle 179 . A circle with the same perimeter of 360 has area 360 2 / ( 4 π ) = 10313.24031235 360^2/(4\pi) = 10313.24031235 36 0 2 / ( 4 π ) = 10313.24031235 ; the polygon is only 0.0025% smaller than the circle—with many sides a regular polygon is practically indistinguishable from a circle, which is exactly how Archimedes squeezed π \pi π between 96-gons.
When the number of sides is not an integer
The engine does not check that n n n is an integer: entering n = 4.5 n = 4.5 n = 4.5 , s = 2 s = 2 s = 2 gives an area of 5.36289117 and an interior angle of 100—numbers that hold algebraically but describe no geometric figure. A real polygon can only have an integer number of sides, at least 3.
The inputs of Example 1 can be entered directly into the panel to reproduce it; change the number of sides from 6 to 8, 12 and 100 in turn and watch the interior angle approach 180° and the area approach that of a circle with the same perimeter.
Principles and derivation Cutting into n isosceles triangles
Join the centre of a regular n n n -gon to each vertex to obtain n n n congruent isosceles triangles: base s s s , legs R R R , and apex angle equal to the full 360° divided into n n n central angles, 2 π / n 2\pi/n 2 π / n . Drop a perpendicular from the centre to the base; the isosceles triangle splits into two right triangles with legs s / 2 s/2 s /2 and the apothem a a a , and acute angle π / n \pi/n π / n . Hence
tan π n = s / 2 a ⇒ a = s 2 tan ( π / n ) , sin π n = s / 2 R ⇒ R = s 2 sin ( π / n ) \tan\frac{\pi}{n} = \frac{s/2}{a}\;\Rightarrow\; a = \frac{s}{2\tan(\pi/n)},\qquad
\sin\frac{\pi}{n} = \frac{s/2}{R}\;\Rightarrow\; R = \frac{s}{2\sin(\pi/n)} tan n π = a s /2 ⇒ a = 2 tan ( π / n ) s , sin n π = R s /2 ⇒ R = 2 sin ( π / n ) s
Each isosceles triangle has area 1 2 s a \tfrac12 s a 2 1 s a ; adding the n n n of them:
A = n ⋅ 1 2 s a = 1 2 ( n s ) a = 1 2 P a = n s 2 4 tan ( π / n ) A = n \cdot \tfrac12 s a = \tfrac12 (ns)\,a = \tfrac12 P a = \frac{n s^2}{4\tan(\pi/n)} A = n ⋅ 2 1 s a = 2 1 ( n s ) a = 2 1 P a = 4 tan ( π / n ) n s 2
The form “area = perimeter × apothem ÷ 2” is exactly isomorphic to the circle’s A = 1 2 ⋅ 2 π r ⋅ r = π r 2 A = \tfrac12 \cdot 2\pi r \cdot r = \pi r^2 A = 2 1 ⋅ 2 π r ⋅ r = π r 2 —a circle is an “infinite polygon” whose apothem equals its radius and whose perimeter is 2 π r 2\pi r 2 π r .
Why the interior angle is (n − 2)·180° / n
Drawing diagonals from one vertex to all the others splits any n n n -gon into n − 2 n - 2 n − 2 triangles, each with angle sum 180°, so the polygon’s angle sum is ( n − 2 ) ⋅ 180 ∘ (n-2)\cdot 180^\circ ( n − 2 ) ⋅ 18 0 ∘ . In a regular polygon all angles are equal, so dividing equally among the n n n angles gives each interior angle. Another view: each exterior angle is 360 ∘ / n 360^\circ/n 36 0 ∘ / n (walking once round the polygon turns you through 360° in total), so the interior angle is 180 ∘ − 360 ∘ / n 180^\circ - 360^\circ/n 18 0 ∘ − 36 0 ∘ / n , which simplifies to the same expression. For n = 3 , 4 , 5 , 6 , 8 n = 3, 4, 5, 6, 8 n = 3 , 4 , 5 , 6 , 8 this gives 60°, 90°, 108°, 120°, 135°.
Which regular polygons tile the plane
When several identical regular polygons meet at a vertex, their interior angles must add up to exactly 360°, so 360 ∘ / θ int 360^\circ / \theta_{\text{int}} 36 0 ∘ / θ int must be an integer: the equilateral triangle (6), the square (4) and the regular hexagon (3) work; the regular pentagon (360 / 108 = 3.33 360/108 = 3.33 360/108 = 3.33 ) and the regular octagon (360 / 135 = 2.67 360/135 = 2.67 360/135 = 2.67 ) do not. Only these three regular polygons tile the plane on their own. That honeycomb uses hexagons is no accident: among the three, the hexagon encloses a given area with the shortest perimeter (the “honeycomb conjecture”, proved by Hales in 1999).
Approaching the circle: from polygons to π
For a fixed perimeter P P P , the regular n n n -gon has area A n = P 2 4 n tan ( π / n ) A_n = \dfrac{P^2}{4n\tan(\pi/n)} A n = 4 n tan ( π / n ) P 2 . As n → ∞ n \to \infty n → ∞ , n tan ( π / n ) → π n\tan(\pi/n) \to \pi n tan ( π / n ) → π , so A n → P 2 / ( 4 π ) A_n \to P^2/(4\pi) A n → P 2 / ( 4 π ) , exactly the area of a circle with perimeter P P P . In Example 4, n = 360 n = 360 n = 360 is already within 0.0025%. In Measurement of a Circle Archimedes used inscribed and circumscribed regular 96-gons to bound 3 10 71 < π < 3 1 7 3\tfrac{10}{71} < \pi < 3\tfrac{1}{7} 3 71 10 < π < 3 7 1 , using precisely this convergence; Liu Hui’s “circle-cutting” method reached π ≈ 3.1416 \pi \approx 3.1416 π ≈ 3.1416 with a regular 3072-gon.
Starting from the circumradius or apothem
If what you know is not the side but R R R (say, a regular polygon inscribed in a circle) or a a a (say, the across-flats distance of a nut), convert to the side first and then use this calculator: s = 2 R sin ( π / n ) s = 2R\sin(\pi/n) s = 2 R sin ( π / n ) , s = 2 a tan ( π / n ) s = 2a\tan(\pi/n) s = 2 a tan ( π / n ) . The equivalent direct formulas are A = 1 2 n R 2 sin ( 2 π / n ) A = \tfrac12 nR^2\sin(2\pi/n) A = 2 1 n R 2 sin ( 2 π / n ) and A = n a 2 tan ( π / n ) A = na^2\tan(\pi/n) A = n a 2 tan ( π / n ) .
Assumptions
The figure really is a regular polygon : all sides equal and all interior angles equal. Meeting only one condition (a rhombus has equal sides but unequal angles) does not qualify.
Convex polygon : the formulas are for convex regular polygons; the “area” of star polygons such as the pentagram is defined differently and is out of scope.
Plane geometry : in the Euclidean plane; regular polygons on a sphere have larger angle sums.
Number of sides is an integer ≥ 3 : the engine does not check this, and outputs for non-integer n n n have no geometric meaning.
One unit : side, apothem and radius share a length unit; the area is its square.
Solve-mode convention : when solving the side from the area, the perimeter field is computed from the unfilled side (0) and shows 0, which does not mean the perimeter is zero.
Scope and limitations Can calculate area, perimeter and interior angle of any regular polygon with n ≥ 3 n \ge 3 n ≥ 3 from the side length; the side length from the area and number of sides. Approximate only a real “regular” polygon always has manufacturing error; the relative error in the area is twice that in the side (Δ A / A ≈ 2 Δ s / s \Delta A/A \approx 2\,\Delta s/s Δ A / A ≈ 2 Δ s / s ). Cannot calculate irregular polygons (split into triangles or use the coordinate “shoelace” formula), direct input of R R R or a a a (convert to s s s as above first), star polygons, or the surface area of 3D polyhedra. Does not output the apothem, circumradius, exterior angle, number of diagonals (n ( n − 3 ) / 2 n(n-3)/2 n ( n − 3 ) /2 ) or other auxiliary quantities; compute them by hand from the formulas when needed. Numerics for very large n n n , tan ( π / n ) \tan(\pi/n) tan ( π / n ) is tiny, but in double precision n n n up to the order of 10 7 10^7 1 0 7 still gives 8 or more significant figures; everyday use is unaffected.
Common mistakes
Writing tan(π/n) by hand in degree mode : π / n \pi/n π / n is in radians. On an ordinary calculator in degree mode use tan ( 180 ∘ / n ) \tan(180^\circ/n) tan ( 18 0 ∘ / n ) ; for the hexagon enter tan ( 30 ∘ ) \tan(30^\circ) tan ( 3 0 ∘ ) , not tan ( 0.5236 ∘ ) \tan(0.5236^\circ) tan ( 0.523 6 ∘ ) .
Taking the circumradius as the side : only the regular hexagon has R = s R = s R = s . For the square R = s / 2 R = s/\sqrt 2 R = s / 2 , for the equilateral triangle R = s / 3 R = s/\sqrt 3 R = s / 3 , for the regular octagon R = 1.3066 s R = 1.3066\,s R = 1.3066 s .
Taking the “across-flats” distance as the side : a nut’s nominal size (e.g. 17 mm for an M10 nut) is the across-flats distance 2 a 2a 2 a , not the side. The side is s = 2 a tan ( π / n ) s = 2a\tan(\pi/n) s = 2 a tan ( π / n ) ; for a hexagon s = 2 a × 0.57735 = 1.1547 a s = 2a \times 0.57735 = 1.1547\,a s = 2 a × 0.57735 = 1.1547 a , so a 17 mm nut has a = 8.5 a = 8.5 a = 8.5 mm and side 9.81 mm.
Applying the formula to an irregular shape : a pentagon with all five sides equal to 5 but unequal angles has a smaller area than the regular pentagon; the formula holds only for regular polygons.
Dropping the square in the area unit : a regular hexagon with side 5 cm has area 64.95 cm², not 64.95 cm.
Entering a decimal or a number below 3 for the sides : the engine computes regardless, but the result is meaningless (see the note after Example 4).
Perimeter showing 0 in solve mode : that is a convention, not a result; enter the solved side back into the field.
Typical use cases Teaching: from triangle and square to circle Check the familiar formulas with n = 3 n = 3 n = 3 and 4 4 4 first, then push n n n up to 100 and 1000 and watch the interior angle approach 180° and the area approach that of the circle with the same perimeter—an encounter with limits and the origin of π \pi π in one go.
Building and gardening: gazebos, flower beds, tiles For a hexagonal gazebo, find the floor area from the side (flooring material); for an octagonal flower bed, find the perimeter (edging length); decide which regular-polygon tiles tile without gaps (only 3, 4 and 6 sides).
Mechanical and hardware: nuts and shaft holes A nut is a regular hexagon: convert the across-flats distance to the side and cross-sectional area; octagonal and dodecagonal splines or spanner openings work the same way.
Signs and design Size conversions and area estimates for stop signs (regular octagon), honeycomb patterns (regular hexagon) and badges (regular pentagon, regular decagon).
FAQ I know the circumradius R; how do I get the area? Use A = 1 2 n R 2 sin ( 2 π / n ) A = \tfrac12 nR^2\sin(2\pi/n) A = 2 1 n R 2 sin ( 2 π / n ) , or first compute the side s = 2 R sin ( π / n ) s = 2R\sin(\pi/n) s = 2 R sin ( π / n ) and enter it. For a hexagon with R = 5 R = 5 R = 5 , s = 5 s = 5 s = 5 and the area is 64.95.
And if I know the apothem (inradius) a? A = n a 2 tan ( π / n ) A = na^2\tan(\pi/n) A = n a 2 tan ( π / n ) , or s = 2 a tan ( π / n ) s = 2a\tan(\pi/n) s = 2 a tan ( π / n ) . For a hexagon with a = 4.3301 a = 4.3301 a = 4.3301 , s = 5 s = 5 s = 5 .
Why does the interior angle show a decimal like 128.57142857? The regular heptagon’s interior angle is 5 × 180 ∘ / 7 = 900 ∘ / 7 5 \times 180^\circ / 7 = 900^\circ/7 5 × 18 0 ∘ /7 = 90 0 ∘ /7 , not an integer; the interior angle is an integer only when n n n divides 360 (n = 3 , 4 , 5 , 6 , 8 , 9 , 10 , 12 , … n = 3, 4, 5, 6, 8, 9, 10, 12, \dots n = 3 , 4 , 5 , 6 , 8 , 9 , 10 , 12 , … ).
Which has the larger area, a regular polygon or a circle? For the same perimeter, the circle has the largest area; the more sides a regular polygon has, the closer it gets (the isoperimetric inequality). In Example 4 the 360-gon is only 0.0025% smaller than the circle.
Can it compute irregular polygons? No. With vertex coordinates use the shoelace formula A = 1 2 ∣ ∑ ( x i y i + 1 − x i + 1 y i ) ∣ A = \tfrac12\left|\sum (x_i y_{i+1} - x_{i+1} y_i)\right| A = 2 1 ∣ ∑ ( x i y i + 1 − x i + 1 y i ) ∣ ; with sides and angles, split into triangles.
What happens if I enter 2 or 1 for the number of sides? For n = 2 n = 2 n = 2 , tan ( π / 2 ) \tan(\pi/2) tan ( π /2 ) is infinite, the area is 0 and the interior angle 0; for n = 1 n = 1 n = 1 , tan π = 0 \tan\pi = 0 tan π = 0 and the area is infinite. Neither has geometric meaning; the field’s minimum hint is 3.
References and further reading
The regular-polygon definition in the CalcX engine source src/data/formulas.ts (compute(known, solveFor) supports area / perimeter / intAngle and solving s from area); every figure on this page was recomputed by that engine.
Wikipedia, Regular polygon (访问日期:2026-09-09)—the various equivalent formulas for area, apothem and circumradius.
Wikipedia, Apothem (访问日期:2026-09-09)—derivation of A = 1 2 P a A = \tfrac12 Pa A = 2 1 P a .
Euclid, Elements , Book IV , edited and annotated by D. E. Joyce, Clark University (访问日期:2026-09-09)—compass-and-straightedge constructions of regular polygons inscribed in and circumscribed about a circle.
Wikipedia, Honeycomb conjecture (访问日期:2026-09-09)—the regular hexagon has the least perimeter among equal-area partitions, proved by Hales in 1999.
Wikipedia, Euclidean tilings by convex regular polygons (访问日期:2026-09-09)—only the equilateral triangle, square and regular hexagon tile the plane on their own.
Archimedes, Measurement of a Circle , Proposition 3; Liu Hui’s circle-cutting method in his commentary on the “circular field” rule of the Nine Chapters on the Mathematical Art —the original sources on approximating the circle by regular polygons.
Privacy All inputs and calculations run inside your browser and are never uploaded to a server. The text on this page is static content; it neither contains nor records any user input.
Sources & review
Reviewed by CalcX 编辑组
Updated 2026-09-09
Open Regular Polygon Calculator: Area, Perimeter, Interior Angle in CalcX