Area & Perimeter Calculator
Calculate the area and perimeter of 9 common 2D shapes — square, rectangle, triangle, circle, trapezoid, parallelogram, rhombus, regular pentagon and regular hexagon — from a single shape picker.
Input
Output
| Property | Value |
|---|---|
| No data yet | |
Guides
Most area calculators handle one shape. This one covers nine of the most common — square, rectangle, triangle, circle, trapezoid, parallelogram, rhombus, regular pentagon and regular hexagon — behind a single shape picker, so you don't need to hunt down a different tool every time the shape changes.
The formulas
For a shape with the measurements below:
Square (side s) Area = s² Perimeter = 4s
Rectangle (length l, width w) Area = l × w Perimeter = 2(l + w)
Triangle (sides a, b, c) Area = √(s(s-a)(s-b)(s-c)) Perimeter = a + b + c
where s = (a+b+c) / 2 (Heron's formula)
Circle (radius r) Area = πr² Perimeter = 2πr (circumference)
Trapezoid (bases b1, b2; legs l1, l2; height h)
Area = (b1 + b2)/2 × h Perimeter = b1 + b2 + l1 + l2
Parallelogram (base b, side s, height h)
Area = b × h Perimeter = 2(b + s)
Rhombus (diagonals d1, d2) Area = (d1 × d2) / 2 Perimeter = 4 × √((d1/2)² + (d2/2)²)
Regular pentagon (side s) Area = (√(5(5+2√5))/4) s² Perimeter = 5s
Regular hexagon (side s) Area = (3√3/2) s² Perimeter = 6sSquare, rectangle and triangle also get a bonus row: diagonal for the square and rectangle (Pythagorean theorem), since it's cheap to compute and often needed alongside area/perimeter.
Worked example: a 3-4-5 right triangle has an area of 6 cm² and a perimeter of 12 cm; a regular hexagon with a 4 cm side has an area of about 41.57 cm² and a perimeter of 24 cm.
How to use it
- Pick a shape from the dropdown.
- Enter its measurements — the fields shown update automatically for the shape you picked.
- Pick a unit (millimeters through yards) — this labels the results only, no conversion is applied.
- Area and perimeter (plus diagonal, where relevant) update instantly as you type.
FAQ
Does the unit dropdown convert my measurement? No. It labels the output (e.g. "cm" vs "in") but performs no conversion — enter every measurement for a shape in the same unit, and the results come back in that unit.
Why does the rhombus ask for diagonals instead of a side length?
A rhombus's area only depends on its two diagonals (d1 × d2 / 2), and the side length can be derived from them, so asking for diagonals covers both area and perimeter from two numbers instead of three.
What if my triangle sides can't actually form a triangle? The calculator checks the triangle inequality (each side must be shorter than the sum of the other two) and shows a validation error instead of silently returning a wrong or negative area.
Can I use this for irregular polygons or a full triangle solve (angles, not just sides)? For a triangle solved from any mix of sides and angles (SSS, SAS, ASA, AAS, SSA), use the triangle calculator. For an irregular polygon defined by vertex coordinates, use the irregular polygon area calculator.
How precise are the results? Values are rounded to two decimal places. The underlying calculation is exact; only the displayed figure is rounded.
Privacy
Everything runs locally in your browser — the measurements you enter are never uploaded or stored anywhere.
Use it from code
From 3 credits per callREST API
curl -X POST https://api.iotools.cloud/v1/tool/area-perimeter-calculator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"shape": "square",
"unit": "cm",
"side": "5"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `area-perimeter-calculator` tool (Area & Perimeter Calculator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.