What this calculator does
Calculate perimeter, area, apothem, circumradius, and angles from side count and side length.
How it works
The calculator evaluates area = ns² ÷ [4 tan(π/n)]. Inputs are checked before calculation, and invalid values such as zero denominators or out-of-range selections produce a clear error instead of a misleading result.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
2-
?sides=Number of sides nNumber · Required · Default: 6
-
?sideLength=Side length sNumber · Required · Default: 5
Outputs
6-
areaAreaNumber · Primary output
-
perimeterPerimeterNumber
-
apothemApothemNumber
-
circumradiusCircumradiusNumber
-
interiorAngleInterior angleNumber · Suffix: °
-
exteriorAngleExterior angleNumber · Suffix: °
Inputs and results
The inputs are Number of sides n, Side length s. Results include Area, Perimeter, Apothem, Circumradius, Interior angle, Exterior angle.