Diagonal calculator
A 24 ft by 16 ft layout is square when both diagonals measure 28 ft 10-1/8 in. Enter the length and width in feet, inches, and fractions, and this gives the diagonal to the nearest 1/16 in, the largest 3-4-5 triangle that fits inside the layout, and, if you enter the two diagonals you measured, how far out of square it is. Built for squaring a foundation, a slab form, a deck frame, or a wall.
Working out a slope, a pitch, or a stair angle instead? Rise over run calculator
Updated
Enter each side the way your tape reads it: 24 ft, 16 ft 3-1/2 in, or 195-1/2. The diagonal rounds to the nearest 1/16 in.
Check a layout (optional)
Pull both diagonals on the frame or the strings and enter them to see how far out of square it is.
- Diagonal
- 28 ft 10-1/8 in
- Diagonal in inches
- 346-1/8 in
- Largest 3-4-5 that fits
- 15 ft and 20 ft, then 25 ft between the marks
How the math works
The diagonal of a rectangle is the long side of a right triangle, so it follows the Pythagorean theorem: diagonal = √(length² + width²). Once opposite sides measure the same, the layout is square when both diagonals equal that number.
A 3-4-5 triangle is the same rule in whole numbers: 3² + 4² = 5². Mark 3 ft along one side and 4 ft along the other, and the corner is square when the marks are 5 ft apart. Any multiple works: 6-8-10, 9-12-15, 12-16-20. The bigger the triangle, the smaller a tape-reading error is as an angle.
The calculator keeps each side as an exact count of sixty-fourths of an inch, computes the diagonal with integer math, rounds it once to the nearest sixty-fourth, and reads it to the nearest 1/16 in. That is the same rounding the CutOnce app's right-angle solver uses.
A worked example: a 24 ft by 16 ft slab form
Forms for a 24 x 16 garage slab, set on batter boards with string lines.
| Target diagonal | 28 ft 10-1/8 in | √(24² + 16²) ft |
| In inches | 346-1/8 in | rounded to 1/16 in |
| Largest 3-4-5 | 15 ft and 20 ft, 25 ft apart | 5 × (3-4-5) ft |
| Square when | 28 ft 10-1/8 in and 28 ft 10-1/8 in | both diagonals read the target |
Set the first corner with the 15-20-25 triangle, then run the other strings and pull both full diagonals. The 3-4-5 squares one corner; with the sides at length, the diagonals check all four.
Fixing an out-of-square layout
Say the diagonals of the same layout read 28 ft 10-5/8 in and 28 ft 9-5/8 in. They differ by 1 in, and each is 1/2 in off the target, one long and one short. Push the corner at the end of the long diagonal toward the inside, a little at a time, until both diagonals read 28 ft 10-1/8 in. Moving a corner changes both diagonals at once, so measure both after every move.
If both diagonals read long, or both short, racking will not fix it: a side is off, or opposite sides do not match. Re-measure the four sides first.
3-4-5 multiples
Use the largest triangle that fits inside the layout. On a 24 x 16 slab, 15-20-25 fits and 18-24-30 does not, because the short side is only 16 ft.
| Multiple | Short side | Long side | Diagonal |
|---|---|---|---|
| × 1 | 3 ft | 4 ft | 5 ft |
| × 2 | 6 ft | 8 ft | 10 ft |
| × 3 | 9 ft | 12 ft | 15 ft |
| × 4 | 12 ft | 16 ft | 20 ft |
| × 5 | 15 ft | 20 ft | 25 ft |
Diagonal chart for common sizes
Target diagonals for common deck, shed, garage, and room sizes, to the nearest 1/16 in.
| Size (ft) | Diagonal |
|---|---|
| 8 x 8 | 11 ft 3-3/4 in |
| 10 x 10 | 14 ft 1-11/16 in |
| 10 x 12 | 15 ft 7-7/16 in |
| 12 x 12 | 16 ft 11-5/8 in |
| 12 x 16 | 20 ft |
| 16 x 16 | 22 ft 7-9/16 in |
| 16 x 20 | 25 ft 7-3/8 in |
| 20 x 20 | 28 ft 3-7/16 in |
| 20 x 24 | 31 ft 2-7/8 in |
| 24 x 24 | 33 ft 11-5/16 in |
| 24 x 30 | 38 ft 5-1/16 in |
| 30 x 40 | 50 ft |
What the app adds
This page takes two sides in feet, inches, and fractions. The app's right-angle solver also takes metric sides, solves from any two of the rise, run, diagonal, and pitch, draws the triangle with its dimensions, and rounds to your tape's resolution down to 1/64 in.
Common questions
- How do I square a foundation with the diagonals?
- Set the four corners to the right length and width, and check that opposite sides measure the same. Then measure corner to corner both ways: when the two diagonals are equal, the layout is square. For a 24 ft by 16 ft foundation, both should read 28 ft 10-1/8 in.
- What is the diagonal of a 12 x 16 rectangle?
- Exactly 20 ft, because 12-16-20 is the 3-4-5 triangle times four. A 10 x 12 is 15 ft 7-7/16 in and a 12 x 12 is 16 ft 11-5/8 in.
- How does the 3-4-5 rule work?
- Three squared plus four squared is 25, which is five squared, so a triangle with sides 3, 4, and 5 has a right angle between the 3 and the 4. Measure 3 ft one way and 4 ft the other from the corner; it is square when the marks are 5 ft apart. Scale it up for a bigger layout.
- Is it better to use 3-4-5 or to measure the diagonals?
- Use both. A 3-4-5 squares one corner. Once opposite sides measure the same, equal diagonals prove all four corners are square, which a single triangle cannot.
- How close do the diagonals need to be?
- The residential code sets no single number for it. Hold the tolerance the plans, the engineer, or the next trade calls for: framing, a slab form, and cabinet work each allow a different amount. The calculator shows the difference to the nearest 1/64 in so you can compare it against that tolerance.
Square it before you pour
CutOnce solves right triangles like this page, in imperial or metric, with no signal needed on the jobsite.
Free to download, with a 7-day trial of everything. This page gives the diagonal; the app keeps the layout with the job.
See also
