Stairs & Framing

3-4-5 Calculator & Right Triangle (Diagonal) Calculator

Free right angle calculator. Find a diagonal or missing side from two legs, check a rectangle for square and scale the 3-4-5 triangle in feet and inches.

Free online tool

Right triangle & 3-4-5 calculator

Find a diagonal from two perpendicular sides, or a missing side from the diagonal. Use it to check a rectangle for square.

Try an example

Diagonal

20′ 0″ (240 in)

Sides
Side A 12′ 0″, side B 16′ 0″
Angles
36.87° opposite side A and 53.13° opposite side B, plus the 90° corner
3-4-5 check
These sides form a 3-4-5 triangle scaled by 4 ft (48 in per unit).

c = √(144² + 192²) = 240 in

Use matching measurement points for both sides, such as the same face or centerline. The result assumes a true 90° corner. To square a layout, mark equal distances from the corner on both lines and adjust until the diagonal matches the result. Compare both diagonals of a rectangle and re-check the side lengths.

Free online tool

Square check: are the diagonals equal?

Measure both diagonals of a rectangular layout and see whether it is square, how far out it is and which way to shift it.

Result

Out of square

Expected diagonal
20′ 0″ (240 in) for a perfect rectangle
Diagonal errors
Diagonal 1 is 0.25 in long; diagonal 2 is 0.25 in short
Difference
Diagonal 1 is longer by 0.5 in (tolerance 0.125 in)
What to do
A skew of about 0.417 in along the length, or 0.313 in along the width, produces this difference. Shift the frame in that direction and measure both diagonals again.

Expected diagonal = √(57,600) = 240 in.

Measure from the same points on every corner and keep the tape straight. Equal diagonals prove a square layout only when opposite sides are also equal, so check the side lengths too. The skew figures are small-angle estimates of how far a corner has slid; measure again after every adjustment.

A right angle calculator applies the Pythagorean theorem to find a missing leg or diagonal. The classic 3-4-5 method works at any scale, making it practical for deck, wall, and foundation layout.

A useful starting workflow

Establish a straight baseline, mark proportional distances on both legs, then adjust until the diagonal matches. For a rectangle, compare the two full diagonals and confirm the side dimensions.

Find a diagonal or scale the 3-4-5 method

For perpendicular sides a and b, the diagonal is √(a² + b²). A 12 ft × 16 ft rectangle has a 20 ft diagonal. For a larger 3-4-5 layout, multiply every side by the same number: ×10 gives 30 ft, 40 ft and 50 ft. Use the calculator for dimensions that are not whole multiples.

A correct diagonal assumes the sides meet at 90°. To check an existing layout, measure both diagonals and the side lengths, then use the square-check form below. Equal diagonals alone do not establish that all four corners are square.

The same triangle appears in stairs and roofs. A stair stringer is the diagonal of the total rise and the total run, and the stair rise and run chart lists that line for total rises from 12 to 120 in. A rafter is the diagonal of the rise and the run of the roof, which the roof pitch factor chart tabulates as the slope factor.

3-4-5 triangle multiples

Any multiple of 3-4-5 is a right triangle. Longer legs make a small marking error easier to see.

3-4-5 multiples
ScaleSide ASide BDiagonal
1×3 ft4 ft5 ft
2×6 ft8 ft10 ft
3×9 ft12 ft15 ft
4×12 ft16 ft20 ft
5×15 ft20 ft25 ft
6×18 ft24 ft30 ft

Other whole-number triples that make a right angle: 5-12-13, 8-15-17 and 7-24-25.

Diagonals for common rectangles

If both diagonals of a rectangle equal these values and the sides are correct, the corners are square.

Diagonal of a square rectangle
RectangleDiagonal
10 ft × 12 ft15′ 7 7/16″
12 ft × 16 ft20′ 0″
12 ft × 24 ft26′ 10″
16 ft × 24 ft28′ 10 1/8″
20 ft × 30 ft36′ 0 11/16″
24 ft × 36 ft43′ 3 3/16″

Cross-corner measurement: check a layout for square

Measure both diagonals of the rectangle from the same points on each corner. If the diagonals are equal and the opposite sides are equal, the layout is square. The square check above compares your measurements with the expected diagonal.

A rectangle with both diagonals drawn from opposite corners. If the rectangle is square, the two diagonals are equal.LengthWidthDiagonal 1Diagonal 2Equal diagonals and equal opposite sides: square
Reading a square check for a 12 ft × 16 ft layout
MeasurementsResult at a 1/8 in tolerance
12′ × 16′ layout, diagonals 20′ 0″ and 20′ 0″Square within 1/8 in
Diagonals 20′ 0 1/4″ and 19′ 11 3/4″Out of square by 0.50 in
Diagonals 20′ 1″ and 20′ 1″Diagonals match; check the sides

Squaring large building layouts with 3-4-5 multiples

The 3-4-5 triangle method is based on the Pythagorean theorem (3² + 4² = 5² = 25). While a 3-4-5 ft triangle works for squaring a small bathroom stud bay, it is far too small for foundation layout or deck framing: a tiny 1/16″ measuring error across 3 feet magnifies into an unacceptable 1-inch out-of-square deviation across a 40-foot wall. Always scale the 3-4-5 ratio to the largest practical dimension: 6-8-10 ft, 9-12-15 ft, 12-16-20 ft, or 30-40-50 ft.

Why equal diagonals require matching opposite sides

Checking cross-corner diagonals is a quick way to verify that a building layout is square. However, equal diagonals alone do not prove a rectangle is square: an isosceles trapezoid also has identical diagonal lengths! To confirm true 90-degree corners, you must first verify that opposite wall lengths are exactly equal (Wall A = Wall C and Wall B = Wall D). Once side lengths match, equal corner-to-corner diagonal measurements prove perfect 90° square geometry.

Entering perpendicular legs in Construction Pro

In the Construction Pro app and web tool, select whether you want to calculate the diagonal from two known legs or find a missing side length from a known diagonal. Enter dimensions directly in feet, inches, and fractions (such as 15′ 6-3/8″) without manual decimal conversions.

Input mistakes to check

Using imprecise reference marks; checking only one diagonal; assuming square geometry can compensate for incorrect side lengths.

Frequently asked questions

How do you use the 3-4-5 method to square a corner?

Mark 3 ft along one line and 4 ft along the other from the corner. Adjust one line until the distance between the marks is exactly 5 ft. Use 6-8-10 or 9-12-15 for a longer, more forgiving check.

How do I find the diagonal of a rectangle?

Use the Pythagorean theorem, c = √(a² + b²). A 12 ft by 16 ft rectangle has a 20 ft diagonal. Equal diagonals confirm a square corner only if the opposite sides are also equal.

Can I find a missing side if I know the diagonal?

Yes. Choose "a missing side" in the calculator. The missing side is √(diagonal² − known side²), so the diagonal must be longer than the known side.

What units does the calculator accept?

Feet, inches and fractions such as 12' 6 3/8" or plain numbers, which are read as inches. Use the same units for both sides.

Why do my diagonals not match?

The shape is not square or the measurement points differ. Measure from the same face or centerline on every corner, keep the tape straight and check that opposite sides match before adjusting.

How these guides are prepared · Calculations and table values come from the same code as the free tools and are checked by automated tests and against the formulas in the Construction Pro app. Code references are for orientation: confirm requirements with your jurisdiction and your project documents. Found an error? Tell the developer.
Take the next job with you

Keep the calculation with the project.

Use feet-inch fractions, specialty trade tools and saved job calculations in Construction Pro for iPhone and iPad. Free download with in-app Pro options.

View on the App Store ↗

Keep working

Browse all guides