dopecalc

Rectangle Calculator

Calculate the area, perimeter, and diagonal length of a rectangle from its length and width.

About this Calculator

Calculate the area, perimeter, and diagonal length of a rectangle from its length and width.

Formula & Calculations

Formula

Area = l × w; Perimeter = 2(l + w); Diagonal = √(l² + w²)
Where:
  • l=Length of the rectangle (longer side)
  • w=Width of the rectangle (shorter side)
  • A=Area of the rectangle
  • P=Perimeter (distance around the rectangle)
  • d=Diagonal length (distance between opposite corners)

Assumptions

  • Length and width are perpendicular, forming right angles at all four corners.
  • All measurements use consistent units.
  • The diagonal is computed using the Pythagorean theorem: d² = l² + w².

Calculation Examples

Example 1

Inputs:Length = 8, Width = 6
Result:Area = 48, Perimeter = 28, Diagonal = 10

A = 8 × 6 = 48. P = 2(8 + 6) = 28. d = √(64 + 36) = √100 = 10.

Example 2

Inputs:Length = 12, Width = 5
Result:Area = 60, Perimeter = 34, Diagonal = 13

A = 12 × 5 = 60. d = √(144 + 25) = √169 = 13.

Frequently Asked Questions

Is a square a rectangle?

Yes, a square is a special case of a rectangle where the length equals the width. All properties of rectangles apply to squares, and the diagonal formula d = s√2 can be derived from the rectangle diagonal formula when l = w = s.

How is the diagonal computed?

The diagonal is computed using the Pythagorean theorem. Since a rectangle's sides are perpendicular, the diagonal forms the hypotenuse of a right triangle where the legs are the length and width: d = √(l² + w²).