2D shape area and perimeter calculator

Area and perimeter of a rectangle, triangle or trapezoid.

Enter your values and press Calculate. Your inputs stay in the address, so you can switch language or share the link.

Formula

rectangle: A = l·w, P = 2(l+w) triangle: A = ½b·h, P = a+b+c trapezoid: A = ½(a+b)·h, P = a+b+c+d

How it works

A rectangle's area is length times width. A triangle's area is half its base times its height (its perimeter needs all three side lengths, which base and height alone do not give). A trapezoid's area is half the sum of its two parallel sides times its height.

Worked example

The same calculation with the default values:

  • Shape Rectangle
  • Rectangle: length · Triangle: base · Trapezoid: side a 8
  • Rectangle: width · Triangle: height · Trapezoid: side b 5
  • Triangle: third side (for perimeter) · Trapezoid: height 6
  • Trapezoid: fourth side (for perimeter) 7
  1. A = 8 × 5 = 40
  2. P = 2 × (8 + 5) = 26

Result: Area: 40 · Perimeter: 26

The formulas here assume a regular, simple shape as described (rectangle, triangle, trapezoid) with the given sides forming a valid closed figure - an irregular or self-intersecting polygon needs a different, more general method (such as the shoelace formula) not covered here.

Common mistakes

  • Entering side lengths that can't actually form the chosen shape (e.g. a triangle where one side is longer than the sum of the other two) - the formula will still compute a number, but it won't correspond to any real figure.
  • Mixing up height (the perpendicular distance used in the area formula) with a slanted side length - for a triangle or trapezoid, the height must be measured perpendicular to the base, not along a slanted edge.
  • Using inconsistent units across the different sides entered (e.g. one side in meters, another in centimeters) - every length must be in the same unit before calculating.

Related calculators