Craftsman Toolbox free tools

Right triangle calculator

Pick which two values you know. Side a is the rise (vertical), side b the run (horizontal), c the sloping side and the angle is measured at the bottom between b and c.

...

How it works

Pythagoras: c² = a² + b², so c = √(a² + b²), a = √(c² - b²) and b = √(c² - a²).

With an angle: a = c x sin(angle), b = c x cos(angle), a = b x tan(angle). The angle itself is atan(a / b).

The 3-4-5 rule is a quick check for a square corner: measure 3 m along one side, 4 m along the other, and the diagonal must be exactly 5 m.

Results are estimates for planning. Check product data sheets, local building rules and an engineer's calculations where required.

Frequently asked questions

How do I find the rafter length?

Use half the span as the run (b) and the roof pitch as the angle. The hypotenuse c is the rafter length to the wall line, before overhang and plumb cuts.

How do I check that a corner is square?

Measure a and b along the two sides and compare the diagonal with c from this calculator. Any difference means the corner is out of square.

More tools in everyday helpers

All tools (64) →