What is the diagonal of a rectangle?
The diagonal of a rectangle is the straight line connecting two opposite corners. Because a rectangle's sides meet at right angles, the diagonal forms the hypotenuse of a right triangle whose legs are the length (l) and width (w). This calculator finds the diagonal, the angle the diagonal makes with the length side, and also reports the rectangle's perimeter and area.
How to use this calculator
Enter the length and width of your rectangle in any consistent unit (cm, m, inches, feet — just keep them the same). The calculator instantly returns the diagonal length, the diagonal angle in degrees, the perimeter, and the area. All four values update from the same two inputs.
The formula explained
Using the Pythagorean theorem, the diagonal is $$d = \sqrt{l^{2} + w^{2}}$$ The diagonal angle relative to the length side is $$\theta = \arctan\!\left(\frac{w}{l}\right)$$ expressed in degrees. Perimeter is \(P = 2(l + w)\) and area is \(A = l \times w\).
Worked example
For a rectangle with length 3 and width 4: the diagonal is $$\sqrt{3^{2} + 4^{2}} = \sqrt{9 + 16} = \sqrt{25} = \mathbf{5}$$ The diagonal angle is \(\arctan(4/3) \approx \mathbf{53.13°}\). The perimeter is \(2(3 + 4) = \mathbf{14}\), and the area is \(3 \times 4 = \mathbf{12}\). This is the classic 3-4-5 right triangle.
FAQ
Do both diagonals of a rectangle have the same length? Yes. A rectangle's two diagonals are always equal in length and bisect each other.
What is the diagonal of a square? For a square with side s, both length and width equal s, so the diagonal is \(s\sqrt{2} \approx 1.414 \times s\).
Why does the angle use arctan? The diagonal, length, and width form a right triangle; the tangent of the angle at the length side equals the opposite side (width) over the adjacent side (length), so the angle is \(\arctan(w/l)\).