Quick answer
A regular polygon with n sides of length s has area n s² ÷ (4 tan(π/n)), interior angle (n − 2) × 180° ÷ n and perimeter n·s. A square (n = 4, s = 3) has area 9, perimeter 12, interior angle 90° and apothem 1.5.
Enter the number of sides and side length. The calculator returns area, perimeter, interior angle and apothem.
Related tools: Polygon Interior Angle Calculator: Interior and exterior angles of a polygon. Area Calculator: Area of common two-dimensional shapes. Right Triangle Calculator: Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter.
How to use the Regular Polygon Calculator
- Enter number of sides (a whole number, between 3 and 1000).
- Enter side length (above 0).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Number of sides | A whole number | ≥ 3, ≤ 1000 |
| Side length | A number | > 0 |
Formula and method
Formula
A = n s² ÷ (4 tan(π/n)); interior angle = (n − 2) × 180° ÷ n
IEEE-754 double precision; shown to at most 6 decimal places.
Regular polygon formulas; apothem = s ÷ (2 tan(π/n)).
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Number of sides = 4; Side length = 3.
| Result | Value |
|---|---|
| Area | 9 |
| Perimeter | 12 |
| Interior angle | 90° |
| Apothem | 1.5 |
Example 2
Inputs: Number of sides = 6; Side length = 1.
| Result | Value |
|---|---|
| Area | 2.598076 |
| Perimeter | 6 |
| Interior angle | 120° |
| Apothem | 0.866025 |
The first line is the headline result (area). Below it the regular Polygon Calculator lists perimeter, interior angle and apothem, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Another example
A regular hexagon with s = 2: area = 6 × 4 ÷ (4 × tan 30°) = 10.392, perimeter 12, interior angle 120°, apothem 1.732.
Regular only
All sides and angles must be equal. As n grows, the polygon approaches a circle. Irregular polygons need coordinates and a different method.
How the result changes with number of sides
Holding every other input at the first worked example, this table changes only number of sides. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Number of sides | Area | Perimeter | Interior angle |
|---|---|---|---|
| 4 | 9 | 12 | 90° |
| 8 | 43.455844 | 24 | 135° |
| 16 | 180.984222 | 48 | 157.5° |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Number of sides: entering "2" shows "Number of sides must be at least 3." beside that field and no result.
Choosing between the Regular Polygon Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Polygon Interior Angle Calculator](/math/polygon-interior-angle-calculator/) | number of sides | Sum of interior angles |
| [Area Calculator](/math/area-calculator/) | shape and a | Area |
| [Right Triangle Calculator](/math/right-triangle-calculator/) | leg a and leg b | Hypotenuse c |
| [Pythagorean Theorem Calculator](/math/pythagorean-theorem-calculator/) | find, leg a and other side | Hypotenuse c |
| [Triangle Calculator](/math/triangle-calculator/) | side a, side b and side c | Area |
Background: geometry measurements
Geometry results carry units that depend on the quantity: a perimeter or length is in linear units such as cm, an area or surface area is in square units (cm²) and a volume is in cubic units (cm³). Use one length unit for every input, because the calculator multiplies the numbers as given.
Flat (2D) shapes have an area and a perimeter; solids (3D) have a surface area and a volume. Two familiar checks: a circle of radius r has area πr² and circumference 2πr, and a sphere has volume (4/3)πr³ and surface area 4πr².
Assumptions and limitations
- Regular polygons only
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for number of sides to confirm this.
Frequently asked questions
What is the area of a regular octagon with side 1?
A regular octagon with side 1 has area 2(1 + √2) ≈ 4.828.
What is the apothem?
The distance from the centre to a side's midpoint.
How many diagonals does a hexagon have?
A hexagon has n(n − 3) ÷ 2 = 9 diagonals.
What does the Regular Polygon Calculator calculate?
Area, perimeter and angles of a regular polygon. It returns Area, Perimeter, Interior angle and Apothem.
What formula does the Regular Polygon Calculator use?
A = n s² ÷ (4 tan(π/n)); interior angle = (n − 2) × 180° ÷ n. Regular polygon formulas; apothem = s ÷ (2 tan(π/n)).
What do I need to enter in the regular Polygon Calculator?
You enter Number of sides and Side length.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Regular polygons only.
What is an example of a regular Polygon result?
With number of sides 4 and side length 3, the area is 9.
Related calculators
- Polygon Interior Angle Calculator — Interior and exterior angles of a polygon.
- Area Calculator — Area of common two-dimensional shapes.
- Right Triangle Calculator — Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter.
- Pythagorean Theorem Calculator — Find the hypotenuse or a missing leg of a right triangle.
- Triangle Calculator — Area, perimeter, angles and type of a triangle from its three sides.
- Circle Calculator — Radius, diameter, circumference and area of a circle from any one of them.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.