Almost every layout problem on a job site — rafter lengths, stair stringers, diagonal braces, ramp lengths, squaring corners — is a right triangle in disguise. Enter any two sides and leave the unknown one at zero. The calculator returns the missing side, both acute angles, the area and the perimeter.
The Pythagorean theorem
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Rearranged, a missing leg is a = √(c² − b²). The angles come from trigonometry: angle A = arctan(a ÷ b), and angle B = 90° − A.
Worked example: a diagonal brace
A gate frame is 4 ft wide and 6 ft tall. Its brace runs corner to corner, so c = √(4² + 6²) = √52 ≈ 7.211 ft, or about 7' 2-9/16". The brace meets the bottom rail at arctan(6 ÷ 4) ≈ 56.3°, which is the angle to set on your miter saw (as 33.7° from square on most saws).
Where builders use it
- Rafters: run and rise are the legs; the rafter is the hypotenuse. See the rafter calculator.
- Stairs: total rise and total run give the stringer length. See the stair calculator.
- Squaring: two wall lengths give the diagonal for a square corner. See the 3-4-5 calculator.
- Ramps: rise and horizontal length give the ramp surface length and slope angle.
Watch: how it is done
Video by The Organic Chemistry Tutor on YouTube. More in our video library.
Frequently asked questions
Which side is the hypotenuse?
The hypotenuse is always the longest side and is opposite the 90° angle. In a stair it is the stringer; in a roof it is the rafter.
Can I enter feet and inches?
Enter decimal feet (for example 6.5 for 6' 6"). Results show both decimal feet and feet-inches to the nearest 1/16".
What are common whole-number right triangles?
3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29 are the Pythagorean triples builders use most. Any multiple of these also works.
Results are planning estimates. For structural work, confirm requirements with your local building authority and a qualified professional. See our disclaimer.