The 3-4-5 rule is the fastest way to lay out a true right angle with nothing but a tape measure. Mark 3 units along one line, 4 units along the other, and adjust the corner until the diagonal between the marks reads exactly 5. Because 3² + 4² = 5², the only triangle that closes at those three lengths is a right triangle. This calculator does the same thing for any pair of sides, so you can use the longest legs your site allows and get a more accurate corner.
How to use this calculator
- Enter the length you can measure along each line from the corner. Longer is better: an error of 1/8" over 12 ft matters far less than the same error over 3 ft.
- Read the diagonal for a true 90°. Hook the tape on one mark and swing it to the other; move the free line until the tape reads that number.
- If you have already set the lines, type the diagonal you actually measured. The tool reports the real corner angle, whether the corner is open or closed, and how far the far end of side B needs to move.
The formula
For legs a and b, the diagonal is c = √(a² + b²). To check an existing corner, the law of cosines gives the real angle: θ = arccos((a² + b² − d²) ÷ 2ab), where d is the measured diagonal. A diagonal longer than c means the angle is greater than 90° (open); shorter means it is under 90° (closed).
Worked example
You are setting out a 12 ft × 16 ft shed pad. Those sides are exactly 4 × (3, 4), so the diagonal should be 4 × 5 = 20 ft. You measure 20' 1/2". Plugging that into the checker gives an angle of about 90.25°: the corner is open, and the far end of the 16 ft line needs to swing in roughly 13/16" toward the 12 ft line.
| Multiple | Side A | Side B | Diagonal | Good for |
|---|---|---|---|---|
| ×1 | 3 | 4 | 5 | Cabinet bases, tile layout lines |
| ×2 | 6 | 8 | 10 | Wall plates, small decks |
| ×3 | 9 | 12 | 15 | Patios, garage slabs |
| ×4 | 12 | 16 | 20 | House footings, large decks |
| ×5 | 15 | 20 | 25 | Building corners, site layout |
Field tips
- Hook the tape on a nail or screw at the mark, not on a pencil line — a 1/16" slip at each end doubles the error.
- Keep the tape level and taut. A tape that sags over a 20 ft diagonal reads long.
- After squaring one corner, confirm the whole rectangle by comparing the two diagonals with the diagonal check calculator.
- Metric works the same way: 0.6 m / 0.8 m / 1.0 m or 3 m / 4 m / 5 m.
Watch: how it is done
Video by tecmath on YouTube. More in our video library.
Frequently asked questions
Why does the 3-4-5 rule work?
Because 3² + 4² = 9 + 16 = 25 = 5². By the converse of the Pythagorean theorem, any triangle whose sides satisfy a² + b² = c² has a right angle opposite the longest side.
Can I use other numbers than 3, 4 and 5?
Yes. Any multiple works (6-8-10, 9-12-15), and so do other Pythagorean triples such as 5-12-13 or 8-15-17. You can also use any two lengths and compute the diagonal with this calculator.
How accurate is the 3-4-5 method?
It is as accurate as your measurements. Using the longest practical multiple reduces error: a 1/8" mistake on a 5 ft diagonal is about 0.2°, while on a 25 ft diagonal it is about 0.05°.
Does it work in metric?
Yes. The ratio is unitless, so 3 m, 4 m and 5 m (or 300, 400 and 500 mm) give the same right angle.
Results are planning estimates. For structural work, confirm requirements with your local building authority and a qualified professional. See our disclaimer.