Generic Rectangle Calculator

Enter a rectangle's length and width to get its area (A = l × w), perimeter (P = 2(l + w)), and diagonal (d = √(l² + w²)), plus an optional material cost estimate.

Quick Facts

Area formula
A = l × w
Multiply length by width; doubling either dimension doubles the area.
Perimeter formula
P = 2(l + w)
Sum of all four sides — two lengths and two widths.
Diagonal formula
d = √(l² + w²)
Follows from the Pythagorean theorem across the length and width.

Your Results

Calculated
Area
-
A = length × width, in square units
Perimeter
-
P = 2 × (length + width)
Diagonal
-
d = √(length² + width²)
Estimated Material Cost
-
Area × cost per square unit

Ready

Enter a length, width, and unit, then press Calculate.

Formula and Method for a Rectangle

A rectangle is a four-sided polygon with two pairs of equal, parallel sides and four 90° interior angles. Its area is the product of its two distinct side lengths — the length (l) and the width (w): A = l × w. This calculator also derives the perimeter and diagonal from the same two measurements, plus an optional material cost estimate.

How the calculation works

Enter the length, width, and the unit they are measured in. The calculator multiplies length by width to get the area (in square units, such as ft² or m²), adds length and width and doubles the sum to get the perimeter (P = 2(l + w)), and applies the Pythagorean theorem to get the diagonal (d = √(l² + w²)) — the diagonal is the hypotenuse of the right triangle formed by the length and width. If you enter a cost per square unit, the tool multiplies it by the area to estimate total material cost.

Common mistakes

  • Confusing length/width with area: a 12 ft by 8 ft rectangle has an area of 96 ft², not 20 ft² (that's the sum) and not 40 ft² (that's the perimeter).
  • Mixing units: keep length and width in the same unit — convert inches to feet, or centimeters to meters, before entering the values.
  • Diagonal vs. side: the diagonal (√(l² + w²)) is always longer than either side; do not substitute it for length or width when computing area.

Real-world applications

  • Flooring, tiling, and carpet estimates use area directly to calculate how much material to buy (add 5–10% extra for cuts and waste).
  • Fencing, edging, and baseboard projects use perimeter to determine how much linear material is needed.
  • Framing and layout checks use the diagonal to confirm a rectangle is truly square-cornered — equal diagonals confirm 90° corners.
  • Construction, landscaping, and interior-design budgets combine area with a cost per square unit to estimate material costs before purchasing.

Frequently Asked Questions

What is the formula for the area of a rectangle?
The area of a rectangle equals its length times its width: A = l × w. A rectangle with a 12 ft length and 8 ft width has an area of 12 × 8 = 96 ft².
How do I find the perimeter of a rectangle?
Add the length and width, then double the sum: P = 2(l + w). A 12 ft by 8 ft rectangle has a perimeter of 2 × (12 + 8) = 40 ft.
How is the diagonal of a rectangle calculated?
The diagonal is the square root of the length squared plus the width squared: d = √(l² + w²), which comes directly from the Pythagorean theorem applied to the right triangle formed by the length, width, and diagonal. A 12 ft by 8 ft rectangle has a diagonal of about 14.42 ft.
What is the difference between a rectangle and a square in this calculator?
A square is simply a rectangle whose length and width are equal. Enter the same value for both length and width to get square results — the same A = l × w, P = 2(l + w), and d = √(l² + w²) formulas apply either way.