polygon calculator
Compute everything about polygons—regular and irregular. Enter a side, radius, perimeter, or area for a regular polygon and get all properties, or input coordinates for an irregular polygon to get the area (shoelace), perimeter, centroid, and a drawing. Built for engineers, surveyors, architects, teachers, and students.
Interactive polygon calculator
Results
- Side (s)
- —
- Perimeter (P)
- —
- Area (A)
- —
- Inradius / apothem (r)
- —
- Circumradius (R)
- —
- Interior angle
- —
- Exterior angle
- —
- Central angle
- —
Results
- Perimeter
- —
- Area (shoelace)
- —
- Centroid (x̄, ȳ)
- —
Data source & methodology
AuthoritativeDataSource: Wolfram MathWorld — Polygon (accessed October 25, 2025). All regular‑polygon relations follow standard Euclidean geometry identities for n‑gons; coordinate‑area uses the Gauss "shoelace" formula.
All computations strictly follow the formulas and data provided by this source.
The formulas, explained
Regular n‑gon (n ≥ 3), with side s, inradius r, circumradius R, perimeter P, area A:
\(\displaystyle P = n\,s\), \(\quad r = \tfrac{s}{2\tan(\pi/n)} = R\cos(\tfrac{\pi}{n})\)
\(\displaystyle R = \tfrac{s}{2\sin(\pi/n)}\)
\(\displaystyle A = \tfrac{1}{2} P r = \frac{n s^{2}}{4\tan(\pi/n)} = \tfrac{1}{2} n R^{2}\sin\!\left(\tfrac{2\pi}{n}\right) = n r^{2}\tan\!\left(\tfrac{\pi}{n}\right)\)
Angles: interior \(\alpha = \tfrac{(n-2)\,180^\circ}{n}\), exterior \(\beta = \tfrac{360^\circ}{n}\), central \(\gamma = \tfrac{360^\circ}{n}\).
Irregular polygon area (shoelace) with vertices (xi, yi):
\(\displaystyle A = \tfrac{1}{2}\left|\sum_{i=1}^{m} x_i y_{i+1} - y_i x_{i+1}\right|\), with \((x_{m+1},y_{m+1})=(x_1,y_1)\).
Centroid (for simple polygons): \(\displaystyle x\bar{} = \tfrac{1}{6A}\sum (x_i + x_{i+1})(x_i y_{i+1}-x_{i+1}y_i)\), and similarly for \(\displaystyle y\bar{}\).
Glossary of variables
- n: number of sides (integer ≥ 3).
- s: side length.
- r: inradius / apothem (distance from center to a side).
- R: circumradius (distance from center to a vertex).
- P: perimeter.
- A: area.
How it works: a step‑by‑step example
Example: n = 6 (regular hexagon) with side s = 4 cm.
- Perimeter: \(P = n s = 6\times 4 = 24\,\text{cm}\).
- Inradius: \(r = \tfrac{s}{2\tan(\pi/6)} = \tfrac{4}{2\tan 30^\circ} \approx 3.464\,\text{cm}\).
- Circumradius: \(R = \tfrac{s}{2\sin(\pi/6)} = \tfrac{4}{2\times 0.5} = 4\,\text{cm}\).
- Area: \(A = \tfrac{1}{2} P r \approx \tfrac{1}{2}\times 24\times 3.464 \approx 41.57\,\text{cm}^2\).
Frequently asked questions
What is the fastest way to get a regular polygon’s area?
Provide any one of s, r, R, P, or A with n. The calculator uses closed‑form identities to derive the rest instantly—no iteration needed.
Does the shoelace formula require convex polygons?
No. It works for any simple (non‑self‑intersecting) polygon. If vertices cross (self‑intersect), the computed area is the algebraic area and may not match the intuitive region.
Which angle is shown as “interior angle”?
The internal angle at each vertex of a regular polygon: \(\alpha = (n-2)\times 180^\circ/n\).
How do units propagate?
If your input is in meters, linear results (s, r, R, P) are in meters and areas in square meters. Enter a custom unit label to annotate outputs.
Can I paste coordinates from CAD or CSV?
Yes. Use “Paste sample” to see the expected format, then replace with your points. The table accepts decimals and scientific notation.
Why do I get an error for 2 or fewer points?
At least three non‑collinear points are required to form a polygon. The calculator validates this and warns you if the data is insufficient.
Do you round results?
Displayed values are rounded for readability, but internal computations use full double precision.
Tool developed by Ugo Candido. Content reviewed by the CalcDomain Editorial Board.
Last accuracy review: