Rectangle Diagonal Calculator

Get a rectangle's diagonal in one step

How it is calculated

The diagonal of a rectangle is the hypotenuse of a right triangle whose legs are the width and the height, so the Pythagorean theorem gives d = √(w² + h²). Here w is the width and h the height, both in the same length unit, and the diagonal comes out in that unit as well. Both values must be above zero. The result is rounded to two decimals. Both diagonals of a rectangle have the same length, and the same formula works for a square, where it reduces to w × √2.

Worked example

A screen is 48 inches wide and 27 inches high. Square each side: 48² = 2304 and 27² = 729. Add them to get 3033, then take the square root. The diagonal is 55.07 inches. This is how screen sizes are quoted: a 16:9 panel of about 55 inches measures roughly 48 by 27 inches.

Try this example →

Common mistakes

  • Adding the sides instead of using the formula. 48 + 27 = 75 is far above the true diagonal.
  • Mixing units, for example width in centimetres and height in inches.
  • Entering a perimeter, an area or a screen's pixel count where a length is needed.
  • Using this for a parallelogram or a tilted box. The simple formula is only valid when the corners are right angles.
  • Forgetting to square-root the final sum and quoting 3033 as the diagonal.

About this calculator

This calculator uses the Pythagorean theorem, d = √(w² + h²), treating a rectangle's diagonal as the hypotenuse of the right triangle formed by its width and height. Because a rectangle's two diagonals are always equal in length, this single calculation gives you both.

Carpenters and framers use it to "square" a rectangular layout — a frame or foundation is truly square only if its two diagonals measure exactly the same — while designers, screen manufacturers and packagers use the same formula to compute display sizes, box dimensions and cut-to-fit panels from just a width and height.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    A handy shop-floor use is checking that a frame, deck or foundation is square. Measure the two corner-to-corner distances; they match only when the corners are right angles. For a 3 by 4 layout the diagonal should read 5, and the same idea scales to any size in any unit as long as width and height share it. Which shapes or objects do you most often need to check this way?

Popular calculators

All Calculators