Math

Rectangle Calculator

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


Rectangle Calculator

Advertisement

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 by

J. Adeyemi

Statistics writer

J. Adeyemi writes the statistics and probability calculators, from descriptive summaries through to distributions and conditional probability. The recurring theme is scope: each page states precisely which question it answers, because most statistical mistakes come from applying a correct formula to the wrong question. Related-but-different measures get separate pages rather than being quietly merged.

Reviewed by

T. Okafor

Calculator reviewer — mathematics

T. Okafor reviews the mathematics calculators, verifying algebraic correctness and, just as importantly, behaviour at the edges — division by zero, undefined results, and the floating-point cases where a formula technically returns a number that should be reported as undefined. Every test case is recomputed independently rather than taken on trust.

How we write and review

Related calculators