Math

Rectangle Calculator

Find a rectangle's area, perimeter, and diagonal from its length and width.


Rectangle Calculator

Three of the most common rectangle questions — area, perimeter, and diagonal length — answered together from just length and width.

How it works

Multiplying length by width gives area; doubling their sum gives perimeter; the Pythagorean theorem applied to length and width gives the diagonal.

What this does not include

This does not include a non-rectangular parallelogram (where the angles aren’t 90 degrees) — this calculator specifically assumes right angles throughout.

How to use this calculator

  1. Enter the length and width.

A worked example

A rectangle 5 × 8: area = 40, perimeter = 2(5+8) = 26, diagonal = √(5²+8²) = 9.433981.

What the variables mean

Variable Meaning
Length, width The rectangle’s two dimensions

Edge cases worth knowing

A square is just a rectangle where length equals width — this calculator’s formulas apply unchanged, with the diagonal formula simplifying to side × √2 in that special case.

A length of zero collapses the rectangle to a line with no area, so the calculator declines to show a result.

Frequently asked questions

What’s a practical use for the diagonal measurement?

Checking that a rectangular frame, doorway, or foundation is actually square — if the two diagonals of a rectangle aren’t equal, the corners aren’t true right angles.

Does a square use the same formulas?

Yes — a square is just a rectangle where length and width happen to be equal; all three formulas work unchanged.

Why does perimeter use “2 times the sum” instead of adding all four sides?

Because a rectangle has two pairs of equal sides — doubling the sum of one length and one width is a shortcut for adding all four sides individually.

Be the first to rate this

Written and checked by the Calculator Folks editorial team. How we write and review

Related calculators