Skip to content

Area and Perimeter Calculator (Geometric Shapes)

Calculate the area and perimeter of a square, rectangle, triangle, circle, trapezoid, parallelogram, rhombus or ellipse, with the area in square metres.

Version 2

Things to keep in mind:

  • In the base-and-height triangle mode the side lengths are unknown, so the perimeter is not computed and shows 0; use the three-sides mode for the perimeter.
  • An ellipse perimeter has no closed formula; Ramanujan's second approximation is used. The error is negligible for near-circular ellipses and stays below 0.04% even for the flattest ones.
  • For trapezoids and parallelograms the perimeter is the sum of the sides entered. If a side is missing or shorter than the height the perimeter shows 0; the geometric consistency of the sides with the bases is not checked further.
  • Angle-based formulas (e.g. area from two sides and the included angle) and irregular polygons are not supported.

Calculator

Shape and unit

Choose the geometric shape; only the dimension fields of that shape are shown.

Enter every dimension in the same unit. The area is shown in this unit squared and the perimeter in this unit; the square-metre equivalent is shown too.

Dimensions

Enter a value of 0 or more in the selected length unit.

After the first calculation, the result updates automatically when you change a value.

Result

Enter the values and press Calculate to see the result here.

About this tool

This tool calculates the area and perimeter of nine basic plane shapes. Choose the shape and enter the dimensions in one length unit; the area is shown in that unit squared, the perimeter in that unit, and the area also in square metres.

Formulas

  • Square: A = a², P = 4a
  • Rectangle: A = a × b, P = 2(a + b)
  • Triangle (base and height): A = b × h / 2 (the perimeter needs the sides and is not computed)
  • Triangle (three sides, Heron's formula): s = (a + b + c) / 2, A = √(s(s − a)(s − b)(s − c)), P = a + b + c
  • Circle: A = πr², P = 2πr
  • Trapezoid: A = (a + c) / 2 × h, P = a + b + c + d
  • Parallelogram: A = a × h, P = 2(a + b)
  • Rhombus: A = e × f / 2, side = √((e/2)² + (f/2)²), P = 4 × side
  • Ellipse: A = πab; perimeter by Ramanujan's second approximation: P ≈ π(a + b)(1 + 3h / (10 + √(4 − 3h))), h = (a − b)² / (a + b)²

Example: a triangle with sides 3, 4 and 5 m has s = 6, A = √(6 × 3 × 2 × 1) = 6 m² and a perimeter of 12 m. An ellipse with semi-axes 5 and 3 m has an area of 15π ≈ 47.1239 m² and a perimeter of about 25.5270 m.

For sides that violate the triangle inequality (e.g. 1, 2 and 5) the area is 0 and "Valid shape" shows 0.

How to use

  1. Choose the shape.
  2. Choose the length unit of your measurements (mm, cm, m or km).
  3. Fill in the dimension fields shown, all in the same unit.
  4. Press Calculate.

Notes

π is used with 20 decimals (3.14159265358979323846). Area and perimeter are rounded to 4 decimals and the square-metre value to 6 decimals, halves rounded up (HALF_UP); intermediate steps are not rounded. Hidden fields of other shapes are ignored. "Valid shape" is 1 when the area is greater than zero and 0 when a dimension is missing or the three sides do not form a triangle.

Frequently asked questions

4 questions
  1. Use Heron's formula: compute the semi-perimeter s = (a + b + c) / 2, then A = √(s(s − a)(s − b)(s − c)). For sides 3, 4 and 5, s = 6 and the area is 6 square units.

Next step

Related tools to continue your calculation.

All tools in Math & Geometry