How to Square a Foundation, Deck or Frame: 3-4-5 and Diagonals

Check Square Calculator (Diagonals and 3-4-5)The diagonal of a rectangle, the 3-4-5 triangle, and whether a frame is square.
Open calculator

Part of the project planners: Planning and building a deck and Planning a shed, pergola, garage slab or coop.

A rectangle is square when its two diagonals are equal. A 16 × 12 ft frame needs two diagonals of 20 ft 0 in. For a corner on its own, use the 3-4-5 rule. Both checks work for foundations, decks, sheds, slabs and walls, and the check square calculator gives the diagonal for your size.

Check with the diagonals

  1. Set out the sides of the frame, and make the opposite sides equal.
  2. Measure from one corner to the opposite corner, and write down the length. Hook the tape on a nail, or have a helper hold it at the same spot each time.
  3. Measure the other diagonal the same way.
  4. If the two are equal, the frame is square. If they are not, move the corners and measure again.

Diagonals for common sizes

The diagonal a square frame of this size must have, from √(length² + width²):

SizeDiagonal (feet)Diagonal (ft and in)
8 × 8 ft11.314 ft11 ft 3 3/4 in
10 × 10 ft14.142 ft14 ft 1 11/16 in
10 × 12 ft15.620 ft15 ft 7 7/16 in
12 × 12 ft16.971 ft16 ft 11 5/8 in
12 × 16 ft20.000 ft20 ft 0 in
16 × 20 ft25.612 ft25 ft 7 3/8 in
20 × 24 ft31.241 ft31 ft 2 7/8 in
24 × 30 ft38.419 ft38 ft 5 in
30 × 40 ft50.000 ft50 ft 0 in

The 3-4-5 method

From the corner, measure 3 units along one side and 4 along the other. If the distance between the two marks is exactly 5 units, the corner is square. This works because 3² + 4² = 5². Bigger triangles are more exact, so use the largest one that fits:

TriangleWhat to mark
3-4-53 ft along one side, 4 ft along the other, and 5 ft between the marks
6-8-106 ft along one side, 8 ft along the other, and 10 ft between the marks
9-12-159 ft along one side, 12 ft along the other, and 15 ft between the marks
12-16-2012 ft along one side, 16 ft along the other, and 20 ft between the marks

Worked example: fixing a frame that is out

A 16 × 12 ft deck frame should have diagonals of 20 ft 0 in. You measure 20.02 ft and 19.98 ft: that is 0.48 inches difference, out of square by 0.48 in: adjust and measure again. Move each corner of the longer diagonal inward by about 0.24 inch, or push the other pair outward, and measure again until they match within the tolerance.

Tips

  • Measure on the same level, such as the top of the frame or string lines. A sloping tape adds error.
  • Check the sides are the right length before you trust the diagonals: equal diagonals alone do not prove a frame is square, since a trapezoid can have them too, so also check that opposite sides are equal.
  • Set up batter boards and string lines for a foundation, and square the strings, not the stakes.
  • Recheck as you build, since forms and frames move while you work.

See also the deck materials calculator and our deck materials list.

Frequently asked questions

How do you check if a rectangle is square?

Measure both diagonals from corner to corner. If they are equal, and opposite sides are equal, it is square. A 16 × 12 ft frame has diagonals of 20 ft 0 in.

What is the 3-4-5 rule?

A triangle with sides of 3, 4 and 5 units has a right angle between the 3 and the 4. Mark 3 ft along one side and 4 ft along the other from the corner, and the distance between the marks must be 5 ft. Multiples like 6-8-10 and 9-12-15 are more accurate.

How accurate does a deck or foundation need to be?

Within about 1/4 inch on the diagonals for a deck or frame, and 1/2 inch for a large foundation. Finish work needs 1/8 inch.

How do I fix a layout that is out of square?

Find the longer diagonal and move its two corners inward (or the other corners outward) by about half the difference, then measure again. If the diagonals differ by 0.48 inches, move each corner about 0.24 inch.

What is the diagonal of a 12x12 square?

16 ft 11 5/8 in, which is 16.971 feet: the side times 1.414.

Feet and Inches CalculatorAdd, subtract, multiply and divide lengths in feet, inches and fractions.
Open calculator
Deck Materials CalculatorDeck boards, joists, screws, footings and stain for a deck.
Open calculator
Check Square Calculator (Diagonals and 3-4-5)The diagonal of a rectangle, the 3-4-5 triangle, and whether a frame is square.
Open calculator

More guides

Tools & materials for this project

As an Amazon Associate we earn from qualifying purchases. These links do not change what you pay.

Estimates only. Quantities depend on your materials, site and supplier. Confirm important numbers before you order, and follow local building codes for anything structural.