Drag to turn, scroll or pinch to zoom. Tap a result to see it on the model.

Regular polygon: area and perimeter calculator

Sizes

    How to calculate the area and perimeter of a regular polygon

    A regular n-gon splits into n identical isosceles triangles meeting at the centre. Each has base a and height r (the apothem), so A = n·a·r/2 = P·r/2. Each interior angle is (n − 2)·180°/n. As n grows the polygon gets closer and closer to its circumscribed circle, which is how Archimedes squeezed π.

    Formulas

    Perimeter
    P = n a
    Apothem (inradius)
    r = a/(2tan(π / n))
    Circumradius
    R = a/(2sin(π / n))
    Area
    A = (P r)/2
    Interior angle
    φ = ((n - 2) · 180°)/n
    Sum of interior angles
    Σ = (n - 2) · 180°
    Number of diagonals
    D = (n(n - 3))/2

    Worked example

    Given: number of sides n = 6, side a = 3 cm.

    1. PerimeterP = 6 · 3 = 18 cm
    2. Apothem (inradius)r = 3/(2 · tan(π/6)) = 2.5981 cm
    3. CircumradiusR = 3/(2 · sin(π/6)) = 3 cm
    4. AreaA = (18 · 2.5981)/2 = 23.3827 cm²
    5. Interior angleφ = ((6 - 2) · 180)/6 = 120°
    6. Sum of interior anglesΣ = (6 - 2) · 180 = 720°
    7. Number of diagonalsD = (6 · (6 - 3))/2 = 9

    Common questions about the regular polygon

    How do you calculate the area of a regular polygon?

    Use A = (P r)/2. For example, with n = 6 and a = 3 cm, A = 23.3827 cm².

    How do you calculate the perimeter of a regular polygon?

    Use P = n a. For example, with n = 6 and a = 3 cm, P = 18 cm.

    Can I find the side from the area?

    Yes. In Solve, choose the area under “I know”, type its value and choose the side under “Find”. The other sizes stay as they are. For example, with n = 6 and A = 58 cm², a = 4.7249 cm.

    Related shapes

    All 37 shapes and their main formulas

    Each one has its own model, sizes you can change and the formula behind every number. Pick one to open it in the lab.

    How the lab works

    Change a size, watch everything follow

    Drag a slider or type an exact value. The model, every result and every worked formula update at once, and the grid under the model counts one unit per square.

    See what a number means

    Tap a result and the model shows it: water fills a volume, paint sweeps a surface or an area, a dot walks the perimeter, vertices and edges are counted one by one.

    Work backwards

    Know the area and need the radius? Solve finds the size that gives the value you typed, then shows every other measurement for it.

    One set of formulas everywhere

    Every formula is written once and evaluated by the same engine in this page and on the API, with a test that checks both give the same numbers.

    Questions

    Can I work backwards from an area or a volume?

    Yes. Open Solve, choose the measurement you know, type its value and pick the size to find. The lab searches for the size that gives exactly that value and shows every other measurement for it, for example a circle with an area of 200 cm² has a radius of 7.9788 cm and a circumference of 50.1326 cm.

    How accurate are the results?

    Every formula is exact and computed in double precision, then rounded to the number of decimals you choose. Two values have no exact elementary formula and are labelled as approximations: the perimeter of an ellipse (Ramanujan) and the surface of an ellipsoid (Knud Thomsen, within 1.07 %).

    Which units can I use?

    Millimetres, centimetres, decimetres, metres, kilometres, inches, feet and yards. Areas and volumes follow the length unit (cm², cm³), and every volume is also given in litres.

    Is there an API?

    Yes. The same engine answers at https://techtools.cz/geometry-lab-api/ without a key: list the shapes, compute any of them, solve backwards, or evaluate an expression. The documentation is at https://techtools.cz/geometry-lab-api/docs.

    For developers and AI agents

    Public JSON, no key, no sign-in. Every response carries the formula, the worked step and the value.

    curl 'https://techtools.cz/geometry-lab-api/compute?shape=cone&r=3&h=4&unit=cm'
    curl 'https://techtools.cz/geometry-lab-api/solve?shape=circle&given=A&value=200&unknown=r'
    curl 'https://techtools.cz/geometry-lab-api/calc?expr=2pi*r^2&vars%5Br%5D=3'
    curl 'https://techtools.cz/geometry-lab-api/shapes'