Rectangle Calculator

Area, perimeter and diagonal of a rectangle from its length and width.

What does this calculator do?

The three quantities you usually need from a rectangle, in one place: the area (length × width), the perimeter (the total edge length) and the diagonal (from the Pythagorean theorem — both diagonals of a rectangle are equal). Use any length unit — as long as every input uses the same one, the results come out in that unit (areas in that unit squared).

Formula

Two products and one square root:

A = l × w
P = 2(l + w)
d = √(l² + w²)
Rectangle diagramA rectangle with length l, width w and a dashed diagonal d.lwd
Diagram not to scale.

How to use it

Enter the length and width in the same unit. Which side you call "length" does not matter — all three results are symmetric in l and w.

Worked example

Length 8 and width 5: area = 40, perimeter = 26, diagonal = √(64 + 25) = √89 = 9.434.

Formula version1.0.0
FormulaA = l × w P = 2(l + w) d = √(l² + w²)
Precision4 decimals

Frequently asked questions

Why would I need the diagonal?

Screens and boards are sold by diagonal; carpenters compare the two diagonals to check an assembly is square. The diagonal is also the longest straight line that fits inside the rectangle.

Does this work for a square?

Yes — a square is a rectangle with l = w. For solving a square backwards from its area, perimeter or diagonal, the dedicated Square Calculator is more direct.

What unit is the area in?

The square of whatever unit you entered: metres give m², feet give ft². Use the Area Converter to move between systems.

Sources

Related calculators

Last updated: 2026-07-31 · v1.0.0 · Report an error