Right triangles on site
Most setting-out jobs come down to one right-angle triangle. The run is the horizontal side, the rise is the vertical side, and the diagonal (hypotenuse) joins them. Pythagoras links the three sides, and the base angle θ links them to the slope.
a = √(c² − b²) · b = √(c² − a²)
tan θ = b ÷ a · sin θ = b ÷ c · cos θ = a ÷ c
Area = ½ × a × b
Worked example: the 3-4-5 rule
To set out a right angle with a tape, mark 4 m along one line and 3 m along the other. When the diagonal between the two marks reads exactly 5 m, the corner is square, because √(4² + 3²) = 5. For bigger corners, use multiples: 6-8-10 or 9-12-15.
Worked example: a roof rafter
A roof spans 6 m wall to ridge (the run) at a pitch of 30°. The rise is 6 × tan 30° = 3.46 m. The rafter length before any overhang is 6 ÷ cos 30° = 6.93 m.
Any triangle from three sides
Surveyors often measure a plot as triangles. With all three sides known, the cosine rule gives each angle and Heron's formula gives the area:
s = (a + b + c) ÷ 2
Area = √(s(s − a)(s − b)(s − c))
Checking a slab or room is square
A rectangle is square when its two diagonals are equal. Their target length is √(length² + width²). If the diagonals differ, the frame is a parallelogram and needs adjusting. Most site specifications allow only a few millimetres of difference on setting out. Check your project tolerances.
| Common use | Sides | Angle |
|---|---|---|
| Setting out a right angle | 3 – 4 – 5 | 36.87° / 53.13° |
| Larger setting-out triangle | 6 – 8 – 10 | 36.87° / 53.13° |
| Ladder at the safe 1 in 4 angle | 1 out, 4 up | 75.96° |
| Accessible ramp (1:12) | 12 run, 1 rise | 4.76° |
| Roof at 30° pitch | 1 run, 0.577 rise | 30° |
Frequently asked questions
How do I find the diagonal of a right triangle?
Square the two shorter sides, add them, and take the square root: c = √(a² + b²). For a 4 m run and a 3 m rise, c = √(16 + 9) = 5 m.
How do I find the angle from the rise and run?
Divide the rise by the run and take the inverse tangent: θ = arctan(b ÷ a). A rise of 1 m over a run of 2 m gives arctan(0.5) = 26.57°.
What is the 3-4-5 rule?
A triangle with sides 3, 4 and 5 always has a right angle between the 3 and 4 sides. Builders use it with a tape to set out square corners without a total station.
How do I check a foundation is square?
Measure both diagonals. They should be equal and match √(length² + width²). Enter the length, width and both measured diagonals in the square-check option to see the difference.
Written and checked by Ahmad Azhar, Construction Engineer with more than 20 years on high-rise, mall, villa and airport projects. Last reviewed November 2026.
Add this calculator to your website
Running a blog, a supplier site or a course page? You can show this calculator on your own page for free. Copy the code and paste it into an HTML block. It works in WordPress, Wix, Squarespace and plain HTML.