Rectangle Diagonal Calculator
Calculate rectangle diagonal from length and width using d = √(l²+w²).
Returns aspect ratio, area, perimeter, and 3D box diagonal if height is given.
The diagonal of a rectangle is the straight line connecting opposite corners. Because the diagonal, length, and width form a right triangle, the Pythagorean theorem applies directly.
The formula:
d = √(l² + w²)
A rectangle has two diagonals and they are always equal in length. If you measure both diagonals of a frame and they differ, you have a parallelogram (slanted), not a true rectangle. Carpenters use this exact test when checking that a floor frame, door opening, or cabinet is square.
Square special case:
d = s√2 ≈ 1.414 × s
For a square (l = w = s), the diagonal is about 41% longer than each side. The √2 ratio is the simplest geometric irrational number and the one the Pythagoreans famously found unsettling, since it appears in the most ordinary geometric figure.
3D box (rectangular prism) diagonal:
d₃ = √(l² + w² + h²)
Each additional dimension adds a squared term under the radical. The longest line you can draw inside a rectangular box runs corner-to-corner along this space diagonal. This is what you check when asking “will this long object fit in this box?” The answer is yes only if the object’s length is ≤ d₃.
Worked example, TV size: A TV screen measures 48 inches wide × 27 inches tall. Divide the two and 48 / 27 = 1.778, exactly 16:9.
d = √(48² + 27²) = √(2304 + 729) = √3033 = 55.1 inches
That is why this display is sold as a “55-inch TV”. The diagonal is the industry-standard measurement. Note that two TVs both labeled “55 inches” can have noticeably different active surface areas if one is widescreen and the other is closer to square, but 16:9 is now universal for new sets.
Worked example, room layout: You have a 5 m × 4 m room and want to know the longest item you can carry diagonally across the floor.
d = √(5² + 4²) = √(25 + 16) = √41 = 6.40 m
That is the absolute maximum for a single rigid object lying flat on that floor, and only if it is thin enough to be treated as a line. A beam with real width needs less than 6.40 m, because the corners of the beam reach the walls before its ends do. Treat the diagonal as a ceiling, not a target.
Worked example, fitting a long object into a box: A shipping box is 1.0 m × 0.8 m × 0.6 m. Can you ship a 1.4 m hockey stick in it?
d₃ = √(1.0² + 0.8² + 0.6²) = √(1.00 + 0.64 + 0.36) = √2.00 = 1.414 m
Yes, 1.40 m < 1.414 m, just barely. The stick has to lie corner-to-corner along the longest space diagonal, but it does fit.
Quick reference, common rectangles:
| Dimensions | Diagonal |
|---|---|
| 3 × 4 | 5 (exact, the classic 3-4-5 Pythagorean triple) |
| 5 × 12 | 13 (Pythagorean triple) |
| 8 × 15 | 17 (Pythagorean triple) |
| 9 × 16 (16:9 TV at “1 unit”) | 18.36 ≈ 1.147 × longer side |
| 4 × 3 (4:3 old TV) | 5.0 |
| 1 × 1 (square) | 1.414 (√2) |
| 1 × 2 (domino) | 2.236 (√5) |
| Golden rectangle (1 × 1.618) | 1.902 |
Why TVs are sold by diagonal, not area: Manufacturers settled on the diagonal because it is one number that grows with both dimensions, while the aspect ratio varies by format. Both a 16:9 set and a 4:3 monitor can be “55 inches” and be directly comparable on that one figure.
The catch is that the same diagonal buys less glass as the shape gets wider. Work it out: at 16:9 a 55-inch screen is 47.9 × 27.0 in, so 1,293 in² of picture. At 4:3 it would be 44 × 33 in, so 1,452 in². That is 12% more screen for the identical advertised size, which is the quiet cost of the switch to widescreen. Push on to an ultrawide 21:9 and the same 55 inches falls to 1,095 in², another 15% down.
Checking squareness in construction: The 3-4-5 rule is the diagonal formula in disguise. Measure 3 units along one wall, 4 along the other, and if the line between those marks is exactly 5 units the corner is square. Scale it up for accuracy: 6-8-10 or 9-12-15 on a foundation, because a 3 mm error over a 3 ft triangle becomes a 30 mm error over 30 ft. That is why the rule is always run on the longest legs the site allows.
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.