Right triangle calculator

Type any two of the rise, the run, the hypotenuse and the angle, in feet and inches or meters. Or check a corner is square with the 3-4-5 rule.

a² + b² = c², worked to the 1/16 inch, the way rafters, stairs, braces and layouts are measured.

The triangle

Rise (a) The upright side.
Run (b) The level side.
Hypotenuse (c) The sloping side, opposite the right angle.
Angle at the run (A) Between the run and the hypotenuse.
First side from the corner
Second side from the corner
Free for your own website, with no account and no ads.

Put the right triangle calculator on your website

Paste this code into an HTML or embed block on any page. Your visitors use the calculator right there, the same as here: free, no sign-up, no ads, and nothing they type is sent anywhere.

Preview it

It fits any width from a phone up to 640 px and grows to the calculator's height. The line under it links to this page, so your visitors can see where it comes from. Every calculator you can embed

Free calculator by Billsmith

Hypotenuse
Angle A
See the working

Right triangles, worked out

The formula

Pythagoras: rise² + run² = hypotenuse². So hypotenuse = √(a² + b²), and a missing leg = √(c² − b²). With an angle: rise = run × tan A, hypotenuse = rise ÷ sin A.

A worked example

A rafter with a 6 ft rise over a 12 ft run: √(36 + 144) = √180 = 13.416 ft, or 13 ft 5 in. The angle is the inverse tangent of 6 ÷ 12 = 26.57°, the pitch of a 6 in 12 roof.

Square a corner: 3-4-5

Mark 3 ft along one line and 4 ft along the other: if the marks are exactly 5 ft apart, the corner is square. Any multiple works, such as 6-8-10 or 9-12-15, so use the biggest that fits. For a rectangle, both diagonals also measure the same.

Whole number triangles

Right triangles with whole number sides and their angle
Rise and runHypotenuseAngle A
3 and 4536.87°
6 and 81036.87°
5 and 121322.62°
8 and 151728.07°
7 and 242516.26°

Roof pitches

Roof pitch to the rafter length per foot of run and the angle
PitchHypotenuse per 12 inAngle
3 in 1212.37 in14.04°
4 in 1212.65 in18.43°
6 in 1213.42 in26.57°
8 in 1214.42 in33.69°
12 in 1216.97 in45°

Questions

How do I find the hypotenuse of a right triangle?

Square the two legs, add them and take the square root: √(a² + b²). With legs of 6 and 8 the hypotenuse is √100 = 10.

How do I find a missing side of a right triangle?

Square the hypotenuse, take away the square of the known leg and take the square root: √(c² − a²). With a hypotenuse of 13 and a leg of 5, the other leg is √144 = 12.

How do I find the angle of a right triangle?

Divide the rise by the run and take the inverse tangent. A 6 ft rise over a 12 ft run is tan⁻¹(0.5) = 26.57 degrees.

What is the 3-4-5 rule in construction?

A triangle with sides of 3, 4 and 5 always has a right angle, so measuring 3 and 4 along two lines and getting 5 between the marks proves the corner is square. Multiples like 6-8-10 work the same way.

What is the area of a right triangle?

Half the rise times the run: a triangle with legs of 6 and 8 has an area of 6 × 8 ÷ 2 = 24.