Diagonal of Rectangle Calculator – Find d from Width and Height
The diagonal of a rectangle is the straight line connecting two opposite corners, splitting the rectangle into two congruent right triangles. This calculator finds the diagonal from a rectangle's width and height, or reverses the process to solve for a missing side when the diagonal and one side are already known — along with the angles the diagonal forms, the area, and the perimeter.
The Core Diagonal Formula
Because a rectangle's diagonal, width, and height form a right triangle, the Pythagorean theorem applies directly:
d = √(w² + h²)
For example, a rectangle with a width of 6 m and a height of 8 m has a diagonal of d = √(6² + 8²) = √(36 + 64) = √100 = 10 m. This is the classic 6-8-10 right-triangle relationship, a multiple of the well-known 3-4-5 triple.
Finding a Missing Side
If the diagonal and one side are already known, the other side can be found by rearranging the same formula:
h = √(d² − w²)w = √(d² − h²)
For instance, with a diagonal of 10 m and a known width of 6 m, the height is h = √(10² − 6²) = √(100 − 36) = √64 = 8 m. The diagonal must always be strictly greater than either known side — otherwise the values cannot form a valid rectangle.
Angles Formed by the Diagonal
The diagonal creates two angles with the rectangle's sides, commonly called alpha (α) and beta (β):
α = arctan(h / w) — the angle between the diagonal and the width sideβ = arctan(w / h) — the angle between the diagonal and the height side
These two angles always sum to exactly 90 degrees, since the diagonal and the two sides form a right triangle. For the 6-8-10 example above, α ≈ 53.13° and β ≈ 36.87°.
Area and Perimeter
Alongside the diagonal, the calculator reports the rectangle's area and perimeter for convenience:
Area = w × hPerimeter = 2(w + h)
Common Applications
- Construction and carpentry — checking that a frame, door, or wall section is square by comparing measured diagonals
- Screens and displays — verifying an advertised diagonal size (e.g., a 15.6-inch laptop screen) from its physical width and height
- Flooring and tiling — measuring a room's diagonal to plan diagonal tile layouts or estimate cable and baseboard runs
- Architecture and engineering — validating rectangular layouts on drawings and site plans
- Everyday tasks — sizing picture frames, boxes, or furniture that must fit through a doorway diagonally
Why a Rectangle's Diagonals Are Equal
A rectangle has two diagonals of equal length, both computed with the same formula, because opposite sides of a rectangle are equal and all four corners are right angles. This property is often used as a practical check for squareness: if two diagonals measured across a frame or opening are equal, the corners are true right angles.
Precision and Accuracy
All calculations use standard 64-bit floating-point arithmetic, accurate to about 15 significant digits. Displayed values are rounded to your chosen precision, from 0 to 10 decimal places.