Rectangle Calculator

Compute area, perimeter, and diagonal of any rectangle with the Rectangle Calculator. Supports multiple units including cm, m, inches, and feet.

868.5K uses Updated · 2026-05-04 Runs locally · zero upload
AD

How to Use Rectangle Calculator

The Rectangle Calculator instantly computes all key geometric properties of a rectangle from just two inputs — length and width. Select a unit, enter the measurements, and read the results.

  1. Select the unit — choose from mm, cm, m, km, in, ft, or yd. All three results are displayed in the chosen unit (area in the unit squared).
  2. Enter the length — type the length of the longer (or either) side.
  3. Enter the width — type the width of the shorter (or other) side.
  4. Read the results — the Rectangle Calculator shows area, perimeter, and diagonal with the full substitution formulas for each.

Negative values and zero are rejected with an error message. The Rectangle Calculator displays results to four decimal places for precision.

Formula & Theory - Rectangle Calculator

The Rectangle Calculator uses three fundamental formulas from Euclidean geometry:

Area:      A = l × w
Perimeter: P = 2 × (l + w)
Diagonal:  d = √(l² + w²)
SymbolMeaning
lLength of the rectangle
wWidth of the rectangle
AArea
PPerimeter
dDiagonal length

The diagonal formula follows directly from the Pythagorean theorem: a rectangle’s diagonal divides it into two congruent right triangles, with legs l and w and hypotenuse d. The area formula gives the total enclosed surface, and the perimeter gives the total boundary length.

Assumptions and Limits

  • Both length and width must be positive real numbers. The Rectangle Calculator does not accept zero or negative dimensions.
  • A square is a special case of a rectangle (l = w); the Rectangle Calculator works correctly for squares.
  • Unit conversion between different unit systems (e.g. cm to inches) is not performed automatically. Convert your measurements to a single unit before entering them.

Use Cases for Rectangle Calculator

The Rectangle Calculator is a versatile tool for students, professionals, and anyone working with rectangular shapes:

  • Classroom geometry — practice area and perimeter formulas and verify manual calculations with the Rectangle Calculator.
  • Home improvement and flooring — calculate the floor area of a rectangular room to estimate how much material you need for tiles, carpet, or hardwood.
  • Paper and screen sizes — find the diagonal of A4 paper, monitor screens, or mobile devices to compare display sizes.
  • Framing and construction — compute perimeter to estimate how much baseboard, fencing, or trim is needed for a rectangular space.

The step-by-step formula display ensures that users of the Rectangle Calculator understand not just the answer but how it was derived.

Frequently asked questions about Rectangle Calculator

What does the Rectangle Calculator compute?

The Rectangle Calculator computes the area (length × width), perimeter (2 × (length + width)), and diagonal (√(length² + width²)) of a rectangle given its two side lengths.

Which units does the Rectangle Calculator support?

The Rectangle Calculator supports millimeters (mm), centimeters (cm), meters (m), kilometers (km), inches (in), feet (ft), and yards (yd). Select the unit that matches your measurement before entering values.

What is the formula for the diagonal of a rectangle?

The diagonal d = √(l² + w²), derived from the Pythagorean theorem applied to the right triangle formed by the length, width, and diagonal of the rectangle.

Is my data stored?

No. All calculations happen in your browser; nothing is sent to a server.