Rectangle Calculator
Area, perimeter and diagonal of a rectangle or square from its length and width.
Area is length × width, perimeter is 2 × (length + width), and the diagonal is √(length² + width²) by Pythagoras.
How the rectangle calculator works
Area is length × width, perimeter is 2 × (length + width), and the diagonal is √(length² + width²) by Pythagoras. A square is a rectangle with equal sides.
Formula: A = lw; P = 2(l + w); d = √(l² + w²)
Worked examples
| Inputs | Area | Note |
|---|---|---|
| 8 × 5 | 40 | area 40, diagonal 9.43 |
| 4 × 4 square | 16 | diagonal 4√2 |
FAQFrequently asked questions
What is the difference between area and perimeter?
Area is the space inside (square units); perimeter is the distance around (plain units).
How do I find the diagonal?
Pythagoras on the two sides: √(l² + w²).
Does the order of length and width matter?
No — every result is symmetric.
How many tiles or boards do I need?
Divide the rectangle's area by the area of one tile, then add 5–10% for cuts.
What is the largest area for a given perimeter?
A square — for a perimeter of 20, a 5 × 5 square (area 25) beats any other rectangle.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Common Core State Standards — Mathematics — the terms and methods taught in US schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.