Regular Polygon Calculator - Area, Perimeter & Apothem
Use this regular polygon calculator to enter the number of sides and side length and read area, perimeter, angles, apothem, and circumradius in real time.
Regular Polygon Calculator
Results
What Is a Regular Polygon Calculator?
A regular polygon calculator solves the geometry of any n-sided polygon whose sides are equal in length and whose interior angles are all the same. Enter the number of sides and the length of one side, and the tool returns the perimeter, area, apothem, circumradius, interior angle, and exterior angle in real time. It is built for students, designers laying out hexagonal tiles or decagonal skylights, and engineers working with regular cross-sections.
- • Homework and exam preparation: Check answers for problems about area, perimeter, apothem, and angles of any regular polygon.
- • Architecture and tiling layouts: Compute the side length, area, and apothem for regular hexagonal tiles, octagonal windows, or decagonal skylights.
- • Mechanical and design drafting: Compute the circumradius of a bolt-circle pattern or the inradius of a regular nut profile.
- • Programming and graphics work: Generate vertex coordinates of a regular n-gon for games or graphics routines without re-deriving the trigonometry.
The math that describes a regular polygon only needs three pieces of information: the number of sides n, the side length a, and the constant pi. With those, every other measurement follows. The regular polygon calculator on this page runs those derivations for you, and it labels the polygon with its common name so you can sanity-check the result.
For projects that already know the apothem or perimeter and want to start there instead of from the side length, Polygon Area Calculator handles the same shape using a different entry value.
How the Regular Polygon Calculator Works
The regular polygon calculator combines six closed-form formulas that all depend on the number of sides n and the side length a. It labels the shape with its common polygon name and computes the interior and exterior angles in degrees, with units kept consistent across the result panel.
- n: Number of equal sides; an integer >= 3. Inputs below 3 are clamped to 3.
- a: Side length. Any non-negative real number; the same units propagate to every output.
- alpha: Interior angle at each vertex in degrees. Approaches 180 as n grows.
- beta: Exterior angle at each vertex in degrees. Approaches 0 as n grows.
- r (apothem): Inradius, the distance from the center to the middle of a side.
- R (circumradius): Circumradius, the distance from the center to a vertex.
The apothem and circumradius share the same denominator structure; the only difference is sin or tan. The apothem uses tan(pi / n) for the half-angle to the side midpoint, and the circumradius uses sin(pi / n) for the half-angle to a vertex.
Worked example: regular hexagon with side 4
n = 6, a = 4
Perimeter = 6 * 4 = 24; Apothem = 4 / (2 * tan(pi/6)) = 3.4641; Circumradius = 4 / (2 * sin(pi/6)) = 4; Interior angle = (6 - 2) * 180 / 6 = 120 deg; Area = 6 * 4^2 / (4 * tan(pi/6)) = 41.5692 square units.
Perimeter 24, area 41.5692 sq units, apothem 3.4641, circumradius 4, interior 120 deg, exterior 60 deg.
Notice the circumradius equals the side length for any regular hexagon, which is why hexagons are the most common regular polygon in nature and engineering.
According to Omni Calculator: Polygon Calculator, the area of a regular polygon with n sides of length a is A = n * a^2 / (4 * tan(pi / n)), the apothem is a / (2 * tan(pi / n)), the circumradius is a / (2 * sin(pi / n)), the interior angle is (n - 2) * 180 / n, and the exterior angle is 360 / n.
The hexagon is the most-used case of the regular polygon formulas, and Hexagon Calculator focuses on that specific shape with dedicated apothem, perimeter, and diagonal outputs.
Key Concepts Behind the Regular Polygon Calculator
Four ideas make the regular polygon formulas work: every regular polygon is built from congruent isosceles triangles, the side length controls everything, the apothem and circumradius are different center-to-edge distances, and the angles sum to fixed amounts.
Equilateral and equiangular
A regular polygon is equilateral (all sides equal) and equiangular (all interior angles equal). Drop either constraint and you must switch to a coordinate-based method.
Apothem vs circumradius
The apothem (inradius) is the perpendicular distance from the center to the middle of a side; the circumradius is the distance from the center to a vertex. R is always larger than r.
Interior and exterior angles
The interior angle alpha equals (n - 2) * 180 / n degrees and the exterior angle beta equals 360 / n degrees. They sum to 180, and alpha approaches 180 as n grows.
Polygon names by side count
Common names: 3 triangle, 4 square, 5 pentagon, 6 hexagon, 7 heptagon, 8 octagon, 9 nonagon, 10 decagon, 12 dodecagon. Beyond 12 sides, use n-gon.
A handy way to see why these formulas work is to draw lines from the center to each vertex: you get n congruent isosceles triangles, each with two sides of length R and a base of length a. The area of one triangle is (1/2) * R^2 * sin(2 * pi / n), and multiplying by n gives the area formula expressed through R instead of a.
The smallest valid regular polygon is the equilateral triangle, and Triangle Calculator solves the same set of measurements plus extras like the inradius and circumradius formulas for any triangle, not just the equilateral one.
How to Use the Regular Polygon Calculator
The interface has two inputs and seven live results, so the workflow is short. The polygon name updates as the number of sides changes.
- 1 Enter the number of sides: Type the integer n in the first field. Use 3 for an equilateral triangle, 4 for a square, 6 for a regular hexagon, 8 for an octagon, and so on. The default is 6.
- 2 Enter the side length: Type the length of one side in the second field. Use whatever unit you are working in. The default is 4.
- 3 How to use the polygon name: The first result confirms the shape: Regular hexagon for n = 6 or Regular decagon for n = 10.
- 4 How to use the perimeter and area: Perimeter is the boundary length and area is the surface covered. Use these to size materials or check answers.
- 5 How to use the apothem and circumradius: Apothem r is the center-to-side distance, useful for incircles. Circumradius R is the center-to-vertex distance, useful for bolt circles.
- 6 How to use the interior and exterior angles: Interior angle alpha and exterior angle beta are displayed in degrees. They sum to 180 for any n. Use alpha for vertex bevels and beta for layout.
Try a worked example: enter n = 6 and side length a = 4. The result panel shows a Regular hexagon with perimeter 24, area 41.5692 sq units, apothem 3.4641, circumradius 4, interior angle 120 deg, and exterior angle 60 deg.
As n grows past a few hundred sides the regular polygon is visually indistinguishable from a circle, and Circle Calculator is the natural next step when the user wants to drop the side constraint and reason about radius and circumference directly.
Benefits of Using the Regular Polygon Calculator
Hand-calculating regular polygon values is fine for triangles and squares but becomes error-prone as n grows. The calculator removes that error class and bundles the results in one place.
- • Six outputs from two inputs: Perimeter, area, apothem, circumradius, interior angle, and exterior angle are all derived from n and a. No need to look up six different formulas.
- • Works for any n: From triangle (n = 3) to 1000-gon and beyond, the same code path computes the result. The interface labels the shape with its common name when n <= 12.
- • Real-time updates: Each result recomputes as you type, with a short animation that signals the change.
- • Two equivalent area formulas: The same area is computed in two ways: A = n * a^2 / (4 * tan(pi / n)) and A = (1/2) * apothem * perimeter. They agree to floating-point precision, which makes the calculator a useful cross-check.
- • Sanity checks built in: Edge cases (n below 3, non-integer n, side length 0) are clamped or returned as zero so the result always represents a valid regular polygon.
Most regular polygon problems start from a known side length and a sketch that names the shape. The calculator matches that workflow: the user picks n, types the side, and reads the result. The (1/2) * apothem * perimeter form still applies for back-solve from the apothem or circumradius.
When the project mixes regular polygons with rectangles, trapezoids, and other shapes, Area Calculator keeps the area work flowing on a single page instead of switching back and forth between shape-specific tools.
Factors That Affect Regular Polygon Results
Three numerical factors drive the output: the number of sides, the side length, and the precision of pi and the trig functions.
Number of sides n
n is the dominant variable for angle and ratio behavior. Doubling n does not double the area, because the area scales with both n and 1 / tan(pi / n).
Side length a
Because area is proportional to a^2, a small error in side length is amplified in the area result. A 1% error in a becomes a 2% error in area, and a 5% error in a becomes a 10% error in area.
Approximation of pi and trigonometric functions
JavaScript uses IEEE 754 double-precision floats, which give about 15 significant decimal digits. For typical n (<= 1000) the output is accurate to all displayed decimals.
- • The result is a decimal approximation, not an exact symbolic form. For exact symbolic results, derive them directly from the formulas.
- • The formulas assume equilateral and equiangular sides. For irregular polygons, polygons with a reflex angle, or polygons with holes, use a coordinate-based method like the shoelace formula instead.
The interior and exterior angle formulas are the easiest to verify: alpha = (n - 2) * 180 / n and beta = 360 / n, and they always sum to 180 degrees. These formulas hold for every regular n-gon with n >= 3.
According to Wolfram MathWorld: Regular Polygon, a regular polygon has equal side lengths and equal interior angles, and its area can be written as (n / 2) * R^2 * sin(2 * pi / n), where R is the circumradius and n is the number of sides.
According to Wikipedia: Regular polygon, a regular polygon is both equiangular and equilateral, and each interior angle of a regular n-gon measures (n - 2) * 180 / n degrees, with the polygon divisible into n congruent isosceles triangles meeting at the center.
If the polygon is not perfectly regular, the formulas on this page no longer apply, and Irregular Polygon Area Calculator handles the general case using the shoelace formula on a list of vertex coordinates.
Frequently Asked Questions
Q: What is a regular polygon?
A: A regular polygon is a closed two-dimensional figure with all sides the same length and all interior angles the same measure. Common examples are the equilateral triangle, square, regular pentagon, regular hexagon, and regular octagon. The formulas on this page assume that equal-sides-equal-angles condition.
Q: What is the formula for the area of a regular polygon?
A: The area of a regular polygon with n sides of length a is A = n * a^2 / (4 * tan(pi / n)). The same area is also equal to (1/2) * apothem * perimeter, which is the form most geometry textbooks use. Both forms give the same numeric value to floating-point precision.
Q: How do I compute the interior angle of a regular polygon?
A: Each interior angle of a regular n-gon is alpha = (n - 2) * 180 / n degrees. For a square (n = 4) the interior angle is 90, for a regular hexagon (n = 6) it is 120, and for a regular dodecagon (n = 12) it is 150. The exterior angle is beta = 360 / n degrees and the two always sum to 180.
Q: What is the apothem of a regular polygon?
A: The apothem is the perpendicular distance from the center of the polygon to the middle of one of its sides. For a regular polygon with side length a and n sides, the apothem equals a / (2 * tan(pi / n)). The apothem is also called the inradius because it is the radius of the inscribed circle.
Q: Can I compute the area of a regular polygon with just the side length?
A: Yes. The side length plus the number of sides is enough to compute the area, the perimeter, the apothem, the circumradius, and both angle measures. This calculator only needs those two inputs, and it returns all six other measurements.
Q: What is the difference between a regular polygon and an irregular polygon?
A: A regular polygon is equilateral and equiangular, so all sides and all interior angles are equal. An irregular polygon has at least one side of a different length or one interior angle of a different measure, so the closed-form formulas on this page no longer apply. For irregular shapes, use a coordinate-based area method instead.