Regular Polygon Calculator — Any Number of Sides

← Back to Engineering Library

If you're dealing with a hexagonal shaft, a bolt head, or any part with a symmetric, multi-sided shape, you'll often need area, perimeter, angles, and apothem values on hand. This Regular Polygon Calculator gets you those numbers quickly from just the number of sides and the side length. Useful for mechanical layout, checking fits, or setting up CNC code. You'll find the formulas, a worked example, and some technical background further down the page.

What is a Regular Polygon?

A regular polygon has all sides of equal length and all interior angles equal. Examples include the equilateral triangle, square, hexagon, and octagon. This calculator gives you area, perimeter, interior angle, and apothem for any such shape, as long as it has at least 3 sides.

Simple Explanation

Think about cutting a part from stock where each edge is the same length and each angle is the same. That’s a regular polygon. As you add sides, the profile becomes more like a circle, and at high counts, the difference gets hard to see by eye. This tool handles the math so you can focus on whether the result is practical for your build.

📐 Browse all 1000+ Interactive Calculators

Regular Polygon Geometry Diagram

Regular Polygon Calculator   Any Number of Sides Technical Diagram

Regular Polygon Calculator

How to Use This Calculator

Engineering calculation notice

This calculator is intended for education, concept evaluation, and preliminary design. Results are based on the equations and assumptions described on this page, but cannot account for every real-world load case, tolerance, material property, environmental condition, installation detail, safety factor, code, or regulatory requirement. Verify all inputs, assumptions, units, and results independently before selecting components or using the result in a real application. Safety-critical, structural, medical, lifting, transportation, or regulated applications must be reviewed by a qualified engineer.

Found a calculation error? Message us

  1. Enter the number of sides (n) — must be a whole number, 3 or greater.
  2. Enter the side length (s) in your chosen unit.
  3. Select Metric (mm) or Imperial (in) to match your project units.
  4. Click Calculate to see your result.

📹 Video Walkthrough — How to Use This Calculator

Regular Polygon Calculator — Any Number of Sides

Regular Polygon Calculator Interactive Visualizer

Watch how changing the number of sides and side length affects area, perimeter, interior angle, and apothem in real-time. See your polygon transform from triangle to near-circle as you increase the sides.

Number of Sides (n) 6
Side Length (mm) 20 mm

AREA

1039.2 mm²

PERIMETER

120 mm

INTERIOR ANGLE

120°

APOTHEM

17.3 mm

FIRGELLI Automations — Interactive Engineering Calculators

Mathematical Equations

Primary Area Formula

Use the formula below to calculate the area of a regular polygon.

A = (ns²) / (4 tan(π/n))

Additional Formulas

Perimeter:

P = ns

Interior Angle:

θ = (n-2) × 180° / n

Apothem:

a = s / (2 tan(π/n))

Circumradius:

R = s / (2 sin(π/n))

Where: n = number of sides, s = side length, A = area, P = perimeter, θ = interior angle, a = apothem, R = circumradius

Simple Example

A regular hexagon (6 sides) with a side length of 10mm:

  • Area: (6 × 10²) / (4 × tan(π/6)) = 259.81 mm²
  • Perimeter: 6 × 10 = 60 mm
  • Interior Angle: (6−2) × 180° / 6 = 120°
  • Apothem: 10 / (2 × tan(π/6)) = 8.66 mm

Complete Technical Guide to Regular Polygons

Understanding Regular Polygon Geometry

A regular polygon is just a shape with identical sides and identical angles, and you’ll see them in everything from bolt heads and gear blanks to indexing plates. In a machine shop or on the design bench, knowing how to get precise measurements for these shapes speeds things up—especially when you want a tight fit or are managing tolerances in assemblies.

Every regular polygon breaks down nicely into n identical triangles, with the center as their common vertex. All the basic geometry—area, perimeter, angles—starts from this kind of breakdown.

Mathematical Foundation

The area formula A = (ns²)/(4 tan(π/n)) works because you’re just summing up n matching isosceles triangles that make up the shape. Each triangle’s base is the side length s; height is the apothem. The tangent function comes from basic trigonometry connecting the angles to these triangle dimensions.

Put another way: the apothem is s/(2 tan(π/n)), and each triangle’s area is (1/2) × base × height = (1/2) × s × apothem. Do that for all n sides and you have the complete area.

Engineering Applications

Hexagon heads on bolts or nuts are common because the 120° angle gives six easy gripping points with good strength. Honeycomb and hex-nut layouts use this shape to use less material without losing much strength. For routing or switching parts precisely, regular polygons show up as indexing plates—a 12-sided version gives twelve detents at 30° each, handy for controlled rotation and stops. Systems using actuators and rotary stages sometimes use these same polygons for setting up accurate angular steps.

Practical Design Considerations

When laying out regular polygon shapes, you’ll want to be clear about circumscribed versus inscribed dimensions. For instance, a hexagon inside a 10mm circle ends up at 10mm across the flats, but if it surrounds a 10mm circle, the sides bump up to about 11.55mm. These are easy mistakes to make when tolerance is tight.

Corners concentrate stress—especially if sides are short (few-sided polygons). Adding a small fillet at each vertex will spread loads and reduce cracking, especially for drive shafts or connectors. As you add more sides, the shape behaves more like a round section and stress at corners drops.

Worked Example: Hexagonal Shaft Design

Here's a quick hex shaft example used for torque transmission:

Given: Regular hexagon, side length s = 15mm

Calculations:

  • Number of sides: n = 6
  • Area: A = (6 × 15²)/(4 tan(π/6)) = (6 × 225)/(4 × 0.5774) = 1350/2.309 = 584.8 mm²
  • Perimeter: P = 6 × 15 = 90mm
  • Interior angle: θ = (6-2) × 180°/6 = 120°
  • Apothem: a = 15/(2 tan(π/6)) = 15/1.155 = 12.99mm

This tells you the shaft will have 584.8 mm² of usable cross-sectional area. The apothem here (12.99mm) is basically the largest bore or shaft you could inscribe inside the hex and still have it touch all sides—handy for checking fits and machining clearances.

Advanced Applications in Automation

Regular polygons are useful for cam profiles, indexing tables, and gear blanks in automation. If you need an automated fixture with eight stopped positions, use an octagon—each face gives you a home position at 45°. The math also helps for robotics if you need to plan precise, repeatable paths; the symmetry makes both programming and construction more manageable.

Manufacturing and Tolerance Considerations

Even a 0.1mm tolerance on a cut polygon side can vary the area quite a bit, especially for shapes with fewer sides. If you’re CNC programming, use the calculator’s output to double-check minimum tool diameter versus the apothem, and consider how side length changes with any tool wear or measurement error.

Quality checks on CMMs often use the polygon’s calculated angles for spot checks and part inspection. Reference the calculated angles and distances to make sure the cut or milled part is actually regular—not just visually close.

Regular polygon formulas are basic, but they come up again and again if you work hands-on in fabrication, assembly, or design. Whether you’re trying to maximize space, plan rotation stops, or just ensure reliable wrench fits, being able to crunch these numbers quickly saves time and helps prevent mistakes when tolerances matter.

Frequently Asked Questions

What is the minimum number of sides for a regular polygon?
How accurate is the regular polygon area formula?
What's the difference between apothem and radius in a regular polygon?
Why do interior angles approach 180° as sides increase?
How do I calculate a regular polygon if I only know the radius?
What engineering applications commonly use regular polygons?

📐 Browse all 1000+ Interactive Calculators →

About the Author

Robbie Dickson

Chief Engineer & Founder, FIRGELLI Automations

Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.

Need to implement these calculations?

Explore the precision-engineered motion control solutions used by top engineers.

Share This Article
Tags: