Area & Perimeter Calculator

Area and perimeter of squares, rectangles, triangles, circles, trapezoids and rhombuses, with the formula applied to your numbers.

How to use

  1. Pick the shape — square, rectangle, triangle, circle, trapezoid or rhombus. The fields change to match what that shape needs.
  2. Type the measurements: area and perimeter appear as you type, with the formula filled in using your own numbers.
  3. For triangles, choose "three sides" to use the Heron formula, or "base and height" when that is what you have.

About this tool

Perimeter is the distance around a flat shape and area is the surface it covers — two answers that come from the same measurements but almost never from the same formula. This calculator covers the six shapes that show up most: the square (A = s², P = 4s), the rectangle (A = w × h, P = 2(w + h)), the triangle, the circle (A = πr², C = 2πr), the trapezoid (A = ((a + b) ÷ 2) × h) and the rhombus (A = (D × d) ÷ 2). Choosing the shape swaps the fields, so you are never asked for a measurement the formula does not use.

The triangle gets two entries because there are two situations. If you know the three sides, the Heron formula applies: half the perimeter s = (a + b + c) ÷ 2, then A = √(s(s−a)(s−b)(s−c)) — and before computing, the tool checks the triangle inequality, refusing side sets where one side is longer than the other two together, since no such triangle exists. If you know a base and its height, the area is simply b × h ÷ 2, but the perimeter stays out of reach without the other sides, and the tool says so instead of inventing a number. The rhombus perimeter comes from its diagonals through Pythagoras: each side is √((D÷2)² + (d÷2)²). Trapezoid legs are optional — fill them in and the perimeter appears too.

The practical uses are everywhere: litres of paint and boxes of tile follow area, fencing and skirting boards follow perimeter, and a round tablecloth needs both the area of the fabric and the circumference of the hem. Results are rounded to four decimals and carry no unit: measure every side in the same unit and the area comes out squared — centimetres give cm², metres give m². All of it is computed in JavaScript inside your browser, with nothing sent anywhere.

The formula

Square: A = s², P = 4s · Rectangle: A = w × h, P = 2(w + h) · Triangle (Heron): s = (a + b + c) ÷ 2, A = √(s(s−a)(s−b)(s−c)) · Triangle (base and height): A = b × h ÷ 2 · Circle: A = πr², C = 2πr · Trapezoid: A = ((a + b) ÷ 2) × h · Rhombus: A = (D × d) ÷ 2, side = √((D÷2)² + (d÷2)²).

Frequently asked questions

What is the difference between area and perimeter?

Area is the surface inside the shape and perimeter is the length of its outline. Paint and tiles are bought by area; fences, baseboards and trims are bought by perimeter.

How do I get the area of a triangle when I only know the three sides?

Use the Heron formula: take half the perimeter s = (a + b + c) ÷ 2, then A = √(s(s−a)(s−b)(s−c)). For sides 3, 4 and 5 the result is exactly 6. Pick "Triangle (three sides)" and the tool applies it.

Why does it say my three sides cannot form a triangle?

Because they break the triangle inequality: each side has to be shorter than the sum of the other two. Sides of 1, 2 and 9 cannot close into a triangle, so no area exists.

What unit does the result use?

The same one you typed. The numbers are unitless — enter centimetres and the area is in cm², enter metres and it is in m². Just avoid mixing units in the same calculation.

Why does the circle need a radius and not a diameter?

Both formulas are written around the radius, so the tool asks for it and shows the diameter (2r) in the steps. If you measured the diameter, divide it by two before typing.

Do my measurements leave my browser?

No. Every calculation runs in JavaScript on your device — nothing is uploaded, stored or logged.

Related tools

Long links? Shorten them for free

Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.

Vai.la is not responsible for how the tools are used or for decisions made based on their results.