Free Construction Tool

Right Angle Calculator – Square-Up, 3-4-5 & Diagonal

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.

ft
ft

Enter any two sides to find the third. Leave the unknown side blank.

ft
ft
ft

Scale the 3-4-5 triangle to any unit size for squaring on site.

ft
💡 Mark 3 units on one wall, 4 units on the adjacent wall. The diagonal between those marks should be exactly 5 units. If not, adjust until it is: that corner is perfectly 90°.
YOUR RESULTS

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.

Squaring Up Layouts on the Job Site

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.

THE 3-4-5 METHOD 4 units 3 units 5 units Mark 4 units along one wall and 3 units along the adjacent wall. If the diagonal between those two marks measures exactly 5 units, the corner is square.

3-4-5 Scale Reference

Unit SizeSide A (3 units)Side B (4 units)Diagonal (5 units)Typical Use
1 ft3'-0"4'-0"5'-0"Small framing, interior walls
2 ft6'-0"8'-0"10'-0"Deck layout, shed footprint
3 ft9'-0"12'-0"15'-0"Standard house layout
4 ft12'-0"16'-0"20'-0"Large building footprint
5 ft15'-0"20'-0"25'-0"Large site layout

Other Useful Pythagorean Triples

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:

TripleScaled ExampleWhen It's Useful
3-4-56-8-10, 9-12-15, 12-16-20The standard; works for any layout
5-12-1310-24-26, 15-36-39Long, narrow triangles; steep roof checks
8-15-1716-30-34Less common; occasionally matches existing dimensions
7-24-2514-48-50Rare; 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.

Right Angle Applications in Construction

ApplicationWhat You're SolvingMethod
Squaring a deck or foundationDiagonal measurementBoth diagonals must be equal
Verifying a corner is 90°3-4-5 checkScale to comfortable measuring distance
Ramp or stair runHypotenuse from rise and runFind missing side
Fence post diagonalDiagonal of gate openingDiagonal tab
Roof valley rafter lengthHypotenuse of plan triangleFind missing side
Drainage slope checkRise from run and slope angleFind missing side

Squareness Tolerance by Trade

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 / ApplicationAcceptable ToleranceWhy
Fence posts, sheds1/4" to 1/2"Low visual impact; structure has natural give
Deck framing1/8" to 1/4"Decking boards can absorb minor variance
Foundation and framing1/8"Errors compound through every subsequent trade
Tile and flooring layout1/16"Grout lines and seams make errors highly visible
Cabinetry and finish carpentry1/32" or tighterReveals 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.

Common Right Angle Mistakes

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:

Layout tip: For large site layouts (foundations, driveways, fences), use the 6-8-10 or 9-12-15 scaled version of the 3-4-5 rule: the larger the triangle, the smaller the angular error from tape measure imprecision. For critical work like foundation layout, verify squareness with both the diagonal method AND the 3-4-5 method at each corner. Two independent checks eliminate the possibility of a systematic error in one method.

Planning a related project? See our square footage calculator and rafter calculator for roof valley applications.

Frequently Asked Questions
How do I square up a building layout? ▾
Measure both diagonals of your layout corner to corner. If equal, the layout is square. If not, shift one corner until both diagonals match: they should be within 1/8" of each other for a precise layout. For extra confirmation, use the 3-4-5 method at each corner: mark 3 ft along one side and 4 ft along the adjacent side; the diagonal should be exactly 5 ft. Both methods together give you high confidence in a square layout before you set forms or posts.
What is the 3-4-5 rule in construction? ▾
The 3-4-5 rule is a simple application of the Pythagorean theorem: a right triangle with legs of 3 and 4 always has a hypotenuse of exactly 5. To verify a 90° corner on site, mark 3 units along one wall and 4 units along the adjacent wall: the diagonal between those marks should be exactly 5 units. Scale up to 6-8-10 for medium layouts or 9-12-15 for large sites. The larger the scale, the more accurate the check.
How do I find the diagonal of a rectangle? ▾
Use the Pythagorean theorem: diagonal = √(length² + width²). For a 12×10 ft deck: √(144 + 100) = √244 = 15.62 ft = 15' 7 7/16". Measure and set both diagonals to this exact length: the deck layout is then confirmed square. The Diagonal tab of this calculator gives you the result in both decimal feet and feet-inches format for direct tape measure use.
Can I use this to calculate a ramp or slope length? ▾
Yes: a ramp or slope forms a right triangle with the horizontal run (A), vertical rise (B), and the actual ramp surface length as the hypotenuse (C). Enter the run and rise in the Find Missing Side tab, leave C blank, and the calculator returns the ramp surface length. For example, a ramp with 10 ft horizontal run and 1.5 ft rise: hypotenuse = √(100 + 2.25) = 10.11 ft = 10' 1 5/16".
How accurate does my diagonal measurement need to be? ▾
For most residential construction, both diagonals should match within 1/8 inch for a layout to be considered square. For a 20×16 ft foundation, the diagonal is about 25.6 ft: a 1/8" error across 25.6 ft is a very small angular deviation, acceptable for wood framing. For tile, cabinetry, or any work where alignment is visible, try to get within 1/16". For large site layouts, even 1/4" tolerance is acceptable since framing and finishes have their own tolerances.