Every Single CalculatorOne place for every calculator
÷Everyday math

Diagonal calculator

Enter the two sides of a rectangle to get the corner-to-corner measurement. When both diagonals match this number, the layout is square.

Example: The deck frame is nailed together and you need to rack it square before the joists go in. Enter the sides to know what both diagonals should read.

Your numbers

Measure the sides along the outside edge of the forms, framing or string lines.

ft
in
ft
in
  • Diagonal0
  • In inches0
  • In decimal feet0
  • Area0

How the diagonal is worked out

The two sides and the diagonal of a rectangle make a right triangle, so the diagonal comes from the Pythagorean theorem.

Diagonal = √(length² + width²)

A worked example

A deck frame 16 feet by 12 feet has a diagonal of exactly 20 feet. Measure from one corner to the opposite corner, then across the other two. If both read 20 feet, the frame is square. If one is longer, push that long corner in until they match.

The 3-4-5 method

You can check a single corner without measuring the whole layout. Measure 3 feet along one side and 4 feet along the other. If the distance between those two marks is 5 feet, the corner is square. For more accuracy on a big layout, use a larger multiple such as 6-8-10 or 9-12-15.

Good to know

  • Matching diagonals prove the corners are square only if the opposite sides are also equal. Check the side lengths first.
  • On a large slab, a quarter inch difference between diagonals is usually acceptable. On cabinets and door frames, aim for a sixteenth.
  • Use the same tape for both diagonals, and pull it tight and level.

Common questions

Does this work for a square?

Yes. A square is a rectangle with equal sides. Its diagonal is the side multiplied by 1.414.

Can I use it for a TV or a sheet of plywood?

Yes. It works for any rectangle. A 4 by 8 foot sheet has a diagonal of 8 feet 11 5/16 inches.

How we know this calculator is right

Before this calculator went on the site, 6 answers were worked out separately from its code, by hand or straight from the formula above. Each time this page loads, your own browser runs the calculator on those same numbers and compares. Turn on JavaScript to see the comparison.

See every check
Numbers usedResultWorked out separatelyThis calculator

What this proves: the calculator does the arithmetic of the formula shown, correctly. What it cannot prove: your measurements, or figures such as coverage per bag, waste and spacing, which are typical starting values you can change. Go by the product label and your local code.

Used by: framers and carpenters, cabinetmakers and woodworkers, concrete contractors, masons, flooring installers, tile setters, glaziers, deck and fence builders, welders and fabricators.