12 × 16 ft footing or deck
Show the working
√(12² + 16²) = √400 = 20 ft. Pull both diagonals. A measured 20 ft 1 in is 1 in long, which is outside a ⅛ in tolerance, so the layout needs to be pushed square before it is built on.
This squaring calculator uses the 3-4-5 method and the corner-to-corner diagonal to tell you if your foundation, slab or deck frame is square — type two sides, get the diagonal you need to hit. The 345 triangle is the Pythagorean theorem with easy numbers, so you can scale it from a small corner check to a whole foundation. It works as a foundation square calculator, a diagonal calculator and a quick 3-4-5 squaring tool. The same diagonal math turns up in the rafter length calculator, the stair calculator stringer layout and the diagonal of every deck frame.
Measure both diagonals. When each reads 20 feet, the corners are square.
Pull both diagonals. They should match each other and this number.
Enter a measured diagonal to check your layout.
Wondering how to square a building? Type two sides and get the diagonal that proves the corner square. This squaring calculator doubles as a diagonal calculator for any rectangle, and scales 3-4-5 up to 6-8-10 or 9-12-15 for the longest check your foundation or deck allows. A footing ½ in out at the corner is a problem you meet again at every wall, floor and roof above it.
Quick answer A 12 × 16 ft rectangle is square when both diagonals measure 20 ft. For a quick corner check, mark 3 ft along one side and 4 ft along the other: the line between the marks reads 5 ft when the corner is a right angle. Any multiple works too: 6-8-10, 9-12-15 or 12-16-20.
A rectangle's diagonal is fixed by its two sides. Lay out the length and the width, and if the corner-to-corner distance matches the calculated diagonal, the corners are right angles. The 3-4-5 check is the same theorem with sides picked to make the arithmetic easy: 3² + 4² = 5². Multiply all three by one number and it still holds, which is why the 345 square method and the 3 4 5 square rule scale from a quick corner check to a whole foundation.
The practical test is a diagonal measured against a tolerance, which is what a foundation square calculator checks. Pull both diagonals. They should match each other, and match the calculated value, to within the tolerance you set. The default is ⅛ in (3 mm) and you can change it.
Staking the four corners, pulling both diagonals and moving a corner stake until the readings agree is the whole method. Crews call the corner check the 3 4 5 triangle or the 345 triangle. This page also works as a diagonal of a rectangle calculator, so the arithmetic holds for any sides, not just 3 and 4.
One 3-4-5 check squares only one corner. It cannot catch a layout that has drifted into a parallelogram, which is why the diagonals get pulled as well. The step-by-step list below puts the two checks together.
Once the corners are square, lay out the patio with the paver calculator, the steps with the stair calculator or the rafters with the roof pitch calculator.
a, b = the two sides, c = the diagonal, k = the base unit.
diagonal = √( side A² + side B² ) square when measured diagonal ≈ calculated diagonal 3-4-5: if the base unit is k, the sides are 3k, 4k and 5k because (3k)² + (4k)² = (5k)²
√(12² + 16²) = √400 = 20 ft. Pull both diagonals. A measured 20 ft 1 in is 1 in long, which is outside a ⅛ in tolerance, so the layout needs to be pushed square before it is built on.
A base unit of 4 ft gives 12, 16 and 20 ft, the same triangle as the 12 × 16 layout. A base of 3 ft gives 9, 12 and 15 ft. Use the longest one you can mark without leaving the walls, because a small tape error matters less over a long check.
Mark 3.6 m along one side and 4.8 m along the other. The distance between the marks should be 6 m. The theorem does not care about the unit, so the same ratio works in millimeters, meters, feet or inches.
The calculator gives you the diagonal. These steps are the check on the ground, and they work for a foundation, a slab or a deck as well as a building, with nothing but a tape and string.
The diagonal is the square root of the two sides squared and added, which is the whole sum behind a diagonal calculator. The first table gives it for common layouts, from a deck to a building, and it is the number that proves a rectangle square. The second is for a square, where the diagonal is just the side times 1.4142.
| Rectangle | Diagonal |
|---|---|
| 10 × 10 ft | 14′ 1 11/16″ |
| 10 × 12 ft | 15′ 7 7/16″ |
| 12 × 12 ft | 16′ 11 5/8″ |
| 12 × 16 ft | 20′ |
| 16 × 20 ft | 25′ 7 3/8″ |
| 20 × 24 ft | 31′ 2 7/8″ |
| 24 × 24 ft | 33′ 11 5/16″ |
| 24 × 32 ft | 40′ |
| 28 × 40 ft | 48′ 9 15/16″ |
| 30 × 40 ft | 50′ |
| Side | Diagonal |
|---|---|
| 4 ft | 5′ 7 7/8″ |
| 6 ft | 8′ 5 13/16″ |
| 8 ft | 11′ 3 3/4″ |
| 10 ft | 14′ 1 11/16″ |
| 12 ft | 16′ 11 5/8″ |
| 16 ft | 22′ 7 1/2″ |
| 20 ft | 28′ 3 7/16″ |
A 3-4-5 triangle calculator only has to multiply. The 345 triangle scales up to 6-8-10, 9-12-15 and beyond, and every multiple is still a right triangle. Go as big as the layout allows: the same tape error that hides on a 5 ft check shows up plainly on a 20 ft one.
| Base unit | Sides (3k · 4k · 5k) |
|---|---|
| 1 ft | 3′ · 4′ · 5′ |
| 2 ft | 6′ · 8′ · 10′ |
| 3 ft | 9′ · 12′ · 15′ |
| 4 ft | 12′ · 16′ · 20′ |
| 5 ft | 15′ · 20′ · 25′ |
| 10 ft | 30′ · 40′ · 50′ |
A layout that is out of square carries its error into every wall, floor and roof above it. These are the ways it happens.
A single 3-4-5 check squares one corner. It cannot catch a layout that has drifted into a parallelogram, which is why both diagonals get pulled.
Measure to the same face all the way round. A form board measured on its inside in one place and its outside in another beats a perfect formula.
A long tape sags in the middle, which makes the reading too long. Support it or pull it tight, and use the same tension each time.
A small tape error is a bigger angle over a short check. Use the longest multiple that fits: 12-16-20 beats 3-4-5.
Every move changes both diagonals. Pull both again after each adjustment.
Decide the tolerance before you measure. The default here is ⅛ in, and a long diagonal may allow a little more.
Run through this when you lay out a foundation, a deck or a patio.
The words behind the 3-4-5 rule.
Squaring a layout is geometry, not a code section. Foundations still have to land on the dimensions in the drawings, and a deck ledger has to be square to the house if the joists are to run parallel to it.
Check both diagonals of a rectangle. Equal diagonals plus equal opposite sides is the practical field test, because a single 3-4-5 check squares only one corner. Tape sag, a crown in a batter board, and measuring to the wrong face of a form board will beat a perfect formula, so measure to the same face all the way round.
Section numbers refer to IRC 2021 section numbers; England Approved Document K. Local amendments are common, so confirm with your building authority.
Hover a question to read the answer. Click to keep it open.Tap a question to open it.
From the corner, measure 3 units along one side and 4 units along the other. The straight line between those marks is 5 units when the corner is square. Any multiple works: 6-8-10, 9-12-15 or 12-16-20. Go longer for accuracy, because a small tape error is a smaller angle over a longer check.
Yes. If the base unit is k, the sides are 3k, 4k and 5k in any unit, because the theorem does not depend on it. Pick the longest multiple that still fits on the two walls you can reach: a 12-16-20 check beats a 3-4-5 check with a short tape. Switch the header to metric and the ratio is 3 m, 4 m, 5 m, or any other base unit you type.
It is a 3-4-5 triangle with every side doubled, so 6² + 8² = 10² still holds. A 6-8-10 triangle gives a longer check, so a small tape error matters less.
Yes. Any two sides of a right triangle fix the third, and the diagonal math on this page is the same Pythagorean sum. Type two legs and the calculator returns the hypotenuse — useful for laying out stairs, rafters, or any right-angle corner that doesn't fit the 3-4-5 multiples.
Yes. Set the two legs of the corner you want and read the hypotenuse off the result line. If the distance you measure on site matches that figure, the corner is a true right angle — the same check a framing square gives, but at any scale the tape reaches.
A 3-4-5 triangle is a right triangle with sides of 3, 4 and 5 units. It works because 3² + 4² = 5² (9 + 16 = 25), which is the Pythagorean theorem — and any triangle whose sides follow that pattern has a perfect 90° corner. Carpenters use it because the numbers are easy to remember and easy to lay out with a tape measure. Used as a 345 triangle calculator, this tool finds the third side from any two you type, so it works for 6-8-10, 9-12-15 or any other right-triangle check your layout needs.
On a small layout (3-4-5 feet), an inch off is a lot — fix it. On a 30-40-50 layout for a foundation, an inch is about the tolerance most crews work to. The general rule: keep the error under 1 in 1,000 of the longest side. A 50-foot side can tolerate about ½ inch; a 100-foot side, about an inch. Anything more and your corners are not square.
The 3-4-5 method needs only a tape. Mark 3 feet along one side from the corner and 4 feet along the other. Measure between the marks: it should read exactly 5 feet. If it does not, move the second mark until it does. For a bigger, more accurate layout use 6-8-10 or 9-12-15, then check that both diagonals of the finished rectangle match.
Use the house wall as one side. Mark 3 feet along the wall from the corner and 4 feet out along the deck edge, and the line between the marks should read 5 feet. Use 6, 8 and 10 feet for a more accurate check. Adjust the edge until it does, then pull both diagonals of the finished frame.
Stake the four corners and pull both diagonals. Move a corner stake until both readings match the calculated diagonal within your tolerance, then check again. Measure to the same face all the way round, and finish with a 3-4-5 or 6-8-10 check at one corner.
Pull both diagonals of the frame and compare them with the calculated value. If they differ, push the long corners in until they match, since a deck ledger has to be square to the house for the joists to run parallel to it.
Pick one corner as your reference. Measure 3 feet down one wall line and mark it, then 4 feet down the other and mark it. The distance between the two marks should be exactly 5 feet — if it is, the corner is square. If not, swing one wall in or out until it is. For a big building, scale up: 6-8-10 or 30-40-50 keeps the same 3-4-5 ratio.
Type the length and the width of the foundation, and the calculator gives you the diagonal — the corner-to-corner distance you need to hit for the corners to be square. Set your form boards to the length and width, then adjust the angles until both diagonals match the calculated number. If both diagonals read the same, the foundation is square.
20 feet exactly. 12-16-20 is a 3-4-5 triangle scaled by 4. If your measured diagonal is 20 feet, the layout is square to within the accuracy of the tape.
Square each side, add the two results and take the square root: the diagonal is √(a² + b²). For a 12 by 16 ft rectangle that is √(144 + 256) = √400 = 20 ft. Type the two sides into the calculator and it returns the diagonal in feet and inches or in meters.
Multiply the side by √2, about 1.4142. A 10 ft square has a diagonal of 14′ 1 11/16″. It is the same formula with both sides equal, so enter the same number for both sides in the calculator.
The default tolerance here is ⅛ inch (3 mm). Tape sag grows with distance, so many crews allow a little more on a long diagonal than a short one. Type in the tolerance you can live with and compare it with the diagonal you measured. Check both diagonals: two matching diagonals confirm all four corners at once, while a parallelogram can have equal opposite sides and still not be square.