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.
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
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
- Choose the shape.
- Choose the length unit of your measurements (mm, cm, m or km).
- Fill in the dimension fields shown, all in the same unit.
- 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
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.
Either a dimension of the chosen shape is missing or the three sides do not form a triangle. Any two sides of a triangle must add up to more than the third; sides 1, 2 and 5 cannot form a triangle.
Area = πr², circumference = 2πr. A circle with a 2 m radius has an area of 4π ≈ 12.5664 m² and a circumference of 4π ≈ 12.5664 m.
The exact perimeter needs an elliptic integral. The tool uses Ramanujan's second approximation, which is exact for a circle (a = b) and extremely accurate otherwise.
Next step
Related tools to continue your calculation.
- Calculate
Volume and Surface Area Calculator (Cube, Cylinder, Sphere, Cone)
Calculate the volume and surface area of a cube, cuboid, cylinder, sphere, cone, square pyramid or frustum, with the volume in m³ and litres.
- Calculate
Area and Volume Unit Converter
Convert square metres to decares (dönüm), hectares, ares, square feet and acres, and cubic metres to litres, cubic feet, US gallons and tonnes by density.
- Calculate
Exponent and Root Calculator (Power, Square Root, Cube Root, n-th Root)
Raise a number to any power (including fractional and negative exponents) and take its square root, cube root and n-th root.
- Calculate
Quadratic Equation Solver (ax² + bx + c = 0)
Solve ax² + bx + c = 0: discriminant, real or complex roots, the vertex of the parabola and the sum and product of the roots.
- Calculate
Pythagorean Theorem Calculator
Find the hypotenuse from the two legs of a right triangle, or the missing leg from one leg and the hypotenuse; also get the area, perimeter and height to the hypotenuse.