{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"regular-polygon"},"result":{"entity_type":"calculator","id":"regular-polygon","calculator_id":"regular-polygon","canonical_url":"https://tttkmbb.com/geometry/regular-polygon","name":"Regular Polygon Calculator","title":"Regular Polygon Calculator – Area, Perimeter, Angles, Apothem and Circumradius","category":"geometry","category_name":"Geometry","tool_name":"calculate_regular_polygon_properties","featured_mcp_tool":false,"description":"Computes the area, perimeter, interior and exterior angles in degrees, apothem, circumradius and number of diagonals of a regular polygon from its number of sides and side length.","use_when":"You need properties of an equilateral, equiangular polygon (pentagon, hexagon, octagon, …) with 3 to 100 sides.","do_not_use_when":"The polygon is irregular (split it into triangles and use triangle-area) or is a square, for which rectangle also works.","inputs":[{"name":"number_of_sides","label":"Number of sides","type":"integer","required":true,"min":3,"max":100,"description":"Number of sides n (3 = equilateral triangle, 4 = square, 6 = hexagon, …).","example":6},{"name":"side_length","label":"Side length","type":"number","unit":"units","required":true,"exclusive_min":0,"description":"Length of each side.","example":2}],"outputs":[{"name":"polygon_name","label":"Name","type":"string","decimals":4,"description":"Common name of the polygon (e.g. hexagon), or n-gon."},{"name":"area","label":"Area","type":"number","unit":"units²","decimals":4,"description":"n × s² / (4 × tan(180° / n))."},{"name":"perimeter","label":"Perimeter","type":"number","unit":"units","decimals":4,"description":"n × s."},{"name":"interior_angle_deg","label":"Interior angle","type":"number","unit":"degrees","decimals":4,"description":"(n − 2) × 180° / n."},{"name":"exterior_angle_deg","label":"Exterior angle","type":"number","unit":"degrees","decimals":4,"description":"360° / n."},{"name":"interior_angle_sum_deg","label":"Sum of interior angles","type":"number","unit":"degrees","decimals":0,"description":"(n − 2) × 180°."},{"name":"apothem","label":"Apothem (inradius)","type":"number","unit":"units","decimals":4,"description":"Distance from the centre to the middle of a side = s / (2 × tan(180° / n))."},{"name":"circumradius","label":"Circumradius","type":"number","unit":"units","decimals":4,"description":"Distance from the centre to a vertex = s / (2 × sin(180° / n))."},{"name":"diagonals","label":"Number of diagonals","type":"integer","decimals":4,"description":"n × (n − 3) / 2."}],"input_schema":{"type":"object","properties":{"number_of_sides":{"description":"Number of sides n (3 = equilateral triangle, 4 = square, 6 = hexagon, …).","type":"integer","minimum":3,"maximum":100,"examples":[6]},"side_length":{"description":"Length of each side. Unit: units.","type":"number","exclusiveMinimum":0,"examples":[2],"x-unit":"units"}},"additionalProperties":false,"required":["number_of_sides","side_length"]},"output_schema":{"type":"object","properties":{"polygon_name":{"description":"Common name of the polygon (e.g. hexagon), or n-gon.","type":"string"},"area":{"description":"n × s² / (4 × tan(180° / n)). Unit: units².","type":"number","x-unit":"units²"},"perimeter":{"description":"n × s. Unit: units.","type":"number","x-unit":"units"},"interior_angle_deg":{"description":"(n − 2) × 180° / n. Unit: degrees.","type":"number","x-unit":"degrees"},"exterior_angle_deg":{"description":"360° / n. Unit: degrees.","type":"number","x-unit":"degrees"},"interior_angle_sum_deg":{"description":"(n − 2) × 180°. Unit: degrees.","type":"number","x-unit":"degrees"},"apothem":{"description":"Distance from the centre to the middle of a side = s / (2 × tan(180° / n)). Unit: units.","type":"number","x-unit":"units"},"circumradius":{"description":"Distance from the centre to a vertex = s / (2 × sin(180° / n)). Unit: units.","type":"number","x-unit":"units"},"diagonals":{"description":"n × (n − 3) / 2.","type":"integer"}}},"formula":"With n = number_of_sides and s = side_length: area = n·s² / (4·tan(π/n)); perimeter = n·s; interior angle = (n − 2)·180°/n; exterior angle = 360°/n; apothem = s / (2·tan(π/n)); circumradius = s / (2·sin(π/n)); diagonals = n·(n − 3)/2","sources":[{"name":"Wikipedia – Regular polygon","url":"https://en.wikipedia.org/wiki/Regular_polygon","type":"reference","retrieved_at":"2026-09-23"},{"name":"Wolfram MathWorld – Regular Polygon","url":"https://mathworld.wolfram.com/RegularPolygon.html","type":"reference","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Hexagon, side 2","inputs":{"number_of_sides":6,"side_length":2},"expected":{"polygon_name":"hexagon","area":10.3923,"perimeter":12,"interior_angle_deg":120,"exterior_angle_deg":60,"interior_angle_sum_deg":720,"apothem":1.7321,"circumradius":2,"diagonals":9},"url":"https://tttkmbb.com/api/v1/calculate/regular-polygon?number_of_sides=6&side_length=2"},{"name":"Pentagon, side 10","inputs":{"number_of_sides":5,"side_length":10},"expected":{"polygon_name":"pentagon","area":172.0477,"perimeter":50,"interior_angle_deg":108,"exterior_angle_deg":72,"apothem":6.8819,"circumradius":8.5065,"diagonals":5},"url":"https://tttkmbb.com/api/v1/calculate/regular-polygon?number_of_sides=5&side_length=10"}],"faq":[{"q":"What is the apothem?","a":"The perpendicular distance from the centre to a side, equal to the radius of the inscribed circle. Area also equals perimeter × apothem / 2."},{"q":"Can I start from the circumradius instead of the side?","a":"Convert first: side = 2 × R × sin(180° / n), then enter that side length."}],"tags":["regular polygon","hexagon","pentagon","octagon","interior angle","apothem"],"related":[{"calculator_id":"circle","reason":"Limit of a regular polygon as the number of sides grows; the circumscribed circle."},{"calculator_id":"triangle-area","reason":"Area of a general (irregular) triangle."},{"calculator_id":"angle","reason":"Convert the angles to radians."}],"links":{"html":"https://tttkmbb.com/geometry/regular-polygon","markdown":"https://tttkmbb.com/geometry/regular-polygon.md","json":"https://tttkmbb.com/geometry/regular-polygon.json","api":"https://tttkmbb.com/api/v1/calculate/regular-polygon","schema":"https://tttkmbb.com/api/v1/calculators/regular-polygon","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:23:13Z"}