Reviewed and updated: August 2026
Calculate the diagonal to square any layout using the 3-4-5 method. Find missing sides, hypotenuse, slope angle, and verify square corners instantly.
Enter length and width to get the diagonal. Both diagonals of a rectangle should be equal for a perfectly square layout.
Enter any two sides to find the third. Leave the unknown side blank.
Scale the 3-4-5 triangle to any unit size for squaring on site.
Three tools in one: the Diagonal tab calculates the corner-to-corner measurement for squaring any rectangular layout; the Find Missing Side tab solves any right triangle when you know two sides; and the 3-4-5 tab scales the classic squaring method to any unit size for on-site layout work. All results include feet-inches output for direct tape measure use, so you can go straight from the calculator to the job site without converting decimal feet yourself.
The most common use of right-angle math in construction is squaring a layout: verifying that corners are exactly 90°. Two methods work reliably on any scale. The diagonal method: measure both diagonals corner to corner; if they're equal, the rectangle is square. The 3-4-5 method: at each corner, measure 3 units along one wall and 4 units along the adjacent wall; the diagonal between those marks should be exactly 5 units for a perfect 90° corner.
| Unit Size | Side A (3 units) | Side B (4 units) | Diagonal (5 units) | Typical Use |
|---|---|---|---|---|
| 1 ft | 3'-0" | 4'-0" | 5'-0" | Small framing, interior walls |
| 2 ft | 6'-0" | 8'-0" | 10'-0" | Deck layout, shed footprint |
| 3 ft | 9'-0" | 12'-0" | 15'-0" | Standard house layout |
| 4 ft | 12'-0" | 16'-0" | 20'-0" | Large building footprint |
| 5 ft | 15'-0" | 20'-0" | 25'-0" | Large site layout |
3-4-5 is the most famous right-triangle ratio, but it's not the only whole-number combination that produces a perfect right angle. These alternatives are useful when your layout dimensions happen to fit them more naturally:
| Triple | Scaled Example | When It's Useful |
|---|---|---|
| 3-4-5 | 6-8-10, 9-12-15, 12-16-20 | The standard; works for any layout |
| 5-12-13 | 10-24-26, 15-36-39 | Long, narrow triangles; steep roof checks |
| 8-15-17 | 16-30-34 | Less common; occasionally matches existing dimensions |
| 7-24-25 | 14-48-50 | Rare; useful for very elongated layouts |
In practice, 3-4-5 (or a scaled multiple like 6-8-10) covers nearly every job site situation, since it's easy to remember and easy to scale to a comfortable measuring distance. The other triples are worth knowing exist, but you'll rarely need them over the standard 3-4-5 method.
| Application | What You're Solving | Method |
|---|---|---|
| Squaring a deck or foundation | Diagonal measurement | Both diagonals must be equal |
| Verifying a corner is 90° | 3-4-5 check | Scale to comfortable measuring distance |
| Ramp or stair run | Hypotenuse from rise and run | Find missing side |
| Fence post diagonal | Diagonal of gate opening | Diagonal tab |
| Roof valley rafter length | Hypotenuse of plan triangle | Find missing side |
| Drainage slope check | Rise from run and slope angle | Find missing side |
How precise your squaring needs to be depends heavily on what you're building. A tolerance that's perfectly fine for a fence is unacceptable for cabinetry:
| Trade / Application | Acceptable Tolerance | Why |
|---|---|---|
| Fence posts, sheds | 1/4" to 1/2" | Low visual impact; structure has natural give |
| Deck framing | 1/8" to 1/4" | Decking boards can absorb minor variance |
| Foundation and framing | 1/8" | Errors compound through every subsequent trade |
| Tile and flooring layout | 1/16" | Grout lines and seams make errors highly visible |
| Cabinetry and finish carpentry | 1/32" or tighter | Reveals and gaps are inspected at close range |
Foundation squareness deserves special attention even though its own visual tolerance is relatively forgiving, because every trade that follows (framing, drywall, flooring, cabinetry) builds on that reference. A foundation that's off by 1/2" can force every subsequent trade to fight the error or make visible compromises throughout the entire structure.
These are the most frequent errors when applying right-angle math to a real layout, and each one is easy to avoid once you know to watch for it:
Planning a related project? See our square footage calculator and rafter calculator for roof valley applications.