Rectangle Calculator
Find area, perimeter, diagonal & angles instantly. Enter length & width — or solve from area, perimeter, or diagonal.
What Is a Rectangle Calculator?
A rectangle calculator finds every geometric property of a rectangle — area, perimeter, diagonal length, and interior angles — from any two known values. Unlike a circle where one measurement (radius) unlocks everything, a rectangle needs two independent measurements because its length and width can vary independently.
This calculator offers four input modes: Length × Width (the most common), Area + Length (to find missing width), Perimeter + Length (common in fencing problems), and Diagonal + Length (used in construction squaring). Enter any valid pair and all other properties compute instantly with a labeled diagram.
How to Use This Calculator
- Choose your input mode: Pick whichever two values you already know — Length & Width, Area & Length, Perimeter & Length, or Diagonal & Length
- Enter both values — the labels update to match your selected mode
- Select a unit (cm, m, inches, feet, etc.) — area output uses the squared version of your unit automatically
- Choose decimal places (2, 4, or 6) for output precision
- Click "Calculate Rectangle" to see area, perimeter, diagonal, and angles — plus an SVG diagram with your exact dimensions
Rectangle Formulas Explained
Three formulas cover all rectangle calculations. Area uses multiplication, perimeter uses addition, and the diagonal uses the Pythagorean theorem — because the diagonal of a rectangle is the hypotenuse of the right triangle formed by its length and width:
Rectangle Reference Table
Every row is independently calculated — no interpolation. Diagonal values use the exact Pythagorean formula:
| Length | Width | Area | Perimeter | Diagonal |
|---|---|---|---|---|
| 2 | 1 | 2 | 6 | 2.2361 |
| 4 | 3 | 12 | 14 | 5.0000 |
| 5 | 4 | 20 | 18 | 6.4031 |
| 8 | 5 | 40 | 26 | 9.4340 |
| 10 | 6 | 60 | 32 | 11.6619 |
| 10 | 8 | 80 | 36 | 12.8062 |
| 12 | 8 | 96 | 40 | 14.4222 |
| 15 | 10 | 150 | 50 | 18.0278 |
| 20 | 12 | 240 | 64 | 23.3238 |
| 25 | 15 | 375 | 80 | 29.1548 |
Notice the 4×3 rectangle produces a diagonal of exactly 5.0000 — that's the famous 3-4-5 Pythagorean triple (3² + 4² = 5²). Builders use this relationship to check corners: measure 3 ft along one wall, 4 ft along the adjacent wall, and the diagonal between those two points should be exactly 5 ft if the corner is a true right angle. Reference: Khan Academy — Pythagorean Theorem
Understanding the Rectangle Diagonal
The diagonal of a rectangle runs from one corner to the opposite corner. It's always longer than either side but shorter than their sum — bounded by max(l, w) < d < l + w. For a 12×8 rectangle: max(12,8) = 12 < 14.4222 < 20 (l+w). Every rectangle has two diagonals of equal length that bisect each other at their midpoints — a property that squares share but parallelograms don't.
| Shape | Length | Width | Diagonal | Angle α | Angle β |
|---|---|---|---|---|---|
| 3-4-5 rectangle | 4 | 3 | 5.0000 | 36.8699° | 53.1301° |
| Primary example | 12 | 8 | 14.4222 | 33.6901° | 56.3099° |
| 10×6 rectangle | 10 | 6 | 11.6619 | 30.9638° | 59.0362° |
| 5×4 rectangle | 5 | 4 | 6.4031 | 38.6598° | 51.3402° |
| Square (10×10) | 10 | 10 | 14.1421 | 45.0000° | 45.0000° |
The square row shows a useful fact: when length equals width, both diagonal angles are exactly 45°. The diagonal of a square always equals the side length multiplied by √2 ≈ 1.4142. A 10×10 square has diagonal 10 × 1.4142 = 14.1421 — and that same √2 factor appears in every square regardless of size.
Real-World Rectangle Examples
Rectangles are the most common shape in construction, design, and everyday objects. Three examples with all values calculated from the formulas above:
- Room dimensions (15 × 12 ft): Area = 180 sq ft (flooring needed), Perimeter = 54 ft (baseboard trim needed), Diagonal = 19.2094 ft (squaring check measurement). For carpet that costs $3.50/sq ft, total material cost = 180 × $3.50 = $630 before waste factor.
- NFL football field (360 × 160 ft): Area = 57,600 sq ft, Perimeter = 1,040 ft. The playing field alone (excluding end zones) is 300 × 160 ft = 48,000 sq ft. Diagonal = √(360² + 160²) = √(129,600 + 25,600) = √155,200 = 393.95 ft — the longest kick return path possible.
- US Letter paper (11 × 8.5 in): Area = 93.5 sq in, Perimeter = 39 in, Diagonal = 13.9014 in. Standard A4 paper (the international equivalent) is 297 × 210 mm = 62,370 mm² = 623.70 cm².
Reference: NIST — SI Units of Length
Aspect Ratios and Common Rectangle Formats
Aspect ratio is the ratio of length to width (or width to height in screen terminology). Most screens, papers, and photographs use standardized ratios that were chosen for aesthetic or technical reasons. All diagonals below are calculated at unit scale — multiply by actual size for real dimensions:
| Format | Ratio | Area (unit) | Diagonal (unit) | Common Use |
|---|---|---|---|---|
| HD Video / Widescreen | 16:9 | 144.00 | 18.3576 | TV, YouTube, monitors |
| Ultrawide Monitor | 21:9 | 189.00 | 22.8473 | Gaming, productivity |
| Classic TV / Photos | 4:3 | 12.00 | 5.0000 | Old monitors, photos |
| 35mm Film / DSLR | 3:2 | 6.00 | 3.6056 | Camera sensors, prints |
| Square | 1:1 | 1.00 | 1.4142 | Instagram, prints |
| US Letter Paper | 8.5:11 | 93.50 | 13.9014 | US standard paper |
| A4 Paper (metric) | √2:1 | 62,370 mm² | 360.56 mm | International standard |
A4 paper's ratio is particularly elegant: it's designed so that folding an A4 sheet in half along the long edge produces an A5 sheet with the exact same aspect ratio. This works because the ratio is √2:1 — halving the long side gives √2/2 : 1 = 1 : √2, which is the same ratio flipped. Reference: ISO 216 — Standard Paper Sizes
5 Tips for Rectangle Calculations
- Use the 3-4-5 rule to check right angles without a protractor. A 4×3 rectangle has a diagonal of exactly 5.0000. In construction: measure 3 units along one wall from a corner, 4 units along the adjacent wall, and if the diagonal between those endpoints is 5 units, the corner is a perfect 90°. Any Pythagorean triple works (5-12-13, 8-15-17) — 3-4-5 is simply the most convenient.
- When measuring for flooring or carpet, add 10% waste. A 15×12 ft room has 180 sq ft of floor area. Carpet installers recommend ordering 180 × 1.10 = 198 sq ft to account for cuts, seams, and direction matching. Tile calculations typically add 5–10% for breakage, with more needed for diagonal tile patterns.
- Perimeter determines fencing or framing material — not area. A 25×15 garden plot has 375 sq ft of growing area but requires 80 linear feet of fencing (perimeter = 80). These two numbers are independent — a 20×20 plot has the same 400 sq ft area but different perimeter (80 ft) and different shape entirely. Budget fencing from perimeter, seed from area.
- Doubling one side doubles area but not perimeter proportionally. A 12×8 rectangle (area 96, perimeter 40) vs 24×8 (area 192, perimeter 64): area doubled, but perimeter went from 40 to 64 — only a 60% increase. This asymmetry matters for cost estimation when you change one room dimension.
- The diagonal of a square is always side × √2 ≈ side × 1.4142. A 10×10 room has a diagonal of 14.1421 ft. This √2 factor comes directly from Pythagoras: d = √(s²+s²) = s√2. Useful for quickly estimating whether a piece of furniture can fit through a doorway diagonally — a 36-inch-wide door can pass an item up to 36 × 1.4142 = 50.9 inches wide at 45°.