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.

Rectangle Diagonal

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 (a 16:9 aspect ratio at 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 your absolute maximum for a single rigid object on the floor. Furniture moving guides assume you can lift a 6.40 m × 6.40 m square (impossible), but a 6.40 m beam slid diagonally fits exactly.

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 diagonal because it is a single number that grows with both dimensions, while the aspect ratio (length:width) varies by format. A 55-inch 16:9 TV has different length and width than a 55-inch 4:3 monitor would, but both share the same diagonal, making same-diagonal comparisons consistent across formats. The downside is that a wider aspect ratio has less active surface area for the same diagonal: a 16:9 55" TV has about 947 in², while a 4:3 55" set (rarely made now) would have ~1,151 in², over 20% more glass for the same “size.”

Checking squareness in construction: The 3-4-5 rule is just the diagonal formula in disguise. Carpenters check that a corner is exactly 90° by measuring 3 units along one wall, 4 units along the other, and confirming the diagonal is exactly 5 units. If it is, the angle is square. Off by even a few millimeters at small scale becomes large errors at the corner of a foundation, so this verification is non-negotiable in framing and concrete work.


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.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.