What is a diagonal of a rectangle?
The diagonal of a rectangle is the straight line that joins two opposite corners. Every rectangle has two diagonals, and they are always equal in length. Because the two sides of a rectangle meet at a right angle, the diagonal forms the hypotenuse of a right triangle whose other two sides are the length and the width of the rectangle.
This calculator works in three directions. If you know the length and the width, it returns the diagonal. If you know the diagonal and one of the sides, it solves for the missing side. It also reports the area and the perimeter so you have a complete description of the rectangle in one place.
Key concepts
- Length (l) — one pair of parallel sides of the rectangle.
- Width (w) — the other pair of parallel sides, perpendicular to the length.
- Diagonal (d) — the segment connecting two opposite corners; the hypotenuse of the right triangle formed by the length and width.
- Area (A) — the surface enclosed by the rectangle, equal to length times width.
- Perimeter (P) — the total distance around the rectangle.
How does the calculator work?
The diagonal follows directly from the Pythagorean theorem applied to the right triangle made by the two sides. The calculator converts every length to metres internally, applies the formula in whichever direction the user needs, and then converts the result back to the chosen unit.
Formulas
The diagonal from the two sides:
Rearranged to solve for the length:
Rearranged to solve for the width:
The area and perimeter:
Worked examples
Example 1: diagonal from length and width
A rectangle is 3 cm long and 4 cm wide. The diagonal is:
This is the classic 3-4-5 right triangle. The area is and the perimeter is .
Example 2: a larger 6-8-10 rectangle
For a rectangle 6 cm by 8 cm:
Example 3: length from diagonal and width
A rectangle has a diagonal of 5 cm and a width of 4 cm. The length is:
Example 4: width from diagonal and length
A rectangle has a diagonal of 10 cm and a length of 6 cm. The width is:
Practical uses
- Construction and carpentry — checking that a frame, wall, or floor is square by comparing the two diagonals, which must be equal.
- Screens and displays — televisions and monitors are sized by their diagonal, computed from the width and height of the panel.
- Furniture and moving — confirming that a tabletop or mattress will fit through a doorway or around a corner.
- Design and layout — finding the longest straight run across a rectangular sheet of material before cutting.
- Geometry practice — the calculation is a direct application of the Pythagorean theorem, closely related to the diagonal of a square.
Notes
- The length and width must both be zero or positive for the result to be meaningful.
- When solving for a side from the diagonal, the diagonal must be at least as long as the known side; otherwise no real rectangle exists and the result is left blank.
- A rectangle whose length equals its width is a square, and its diagonal can also be found with the square diagonal calculator.
- Switching a unit selector reconverts the result automatically, so the length and the diagonal can be reported in different units if needed. For curved shapes, see the circle area calculator.