The formulas behind a right-angled triangle
A right-angled triangle has one angle of exactly 90°, so only five measurements are left to find: the two legs a and b that form the right angle, the hypotenuse c opposite it, and the two acute angles A (opposite a) and B (opposite b). Any two of the five fix the triangle, provided at least one is a side. Three relationships do the work.
Pythagoras: c² = a² + b²
Angles: A + B = 90°
sin A = a ÷ c cos A = b ÷ c tan A = a ÷ b
The three ratios are the “SOH CAH TOA” of school trigonometry: sine is opposite over hypotenuse, cosine is adjacent over hypotenuse and tangent is opposite over adjacent. Once the sides are known, everything else is arithmetic:
Area = ½ × a × b Perimeter = a + b + c
Altitude to the hypotenuse: h = a × b ÷ c
Inradius: r = (a + b − c) ÷ 2 Circumradius: R = c ÷ 2
The altitude h is the shortest distance from the right-angle corner to the hypotenuse. It comes from writing the area twice, once as ½ab and once as ½ch. The circumradius is half the hypotenuse because a right angle always sits on a circle whose diameter is the hypotenuse, a result credited to Thales.
Worked example: one leg and one angle
A roof truss has a horizontal leg b = 12 and the angle A between that leg and the rafter is 35°. Find everything else.
- Other angle. B = 90° − 35° = 55°.
- Opposite leg. tan A = a ÷ b, so a = 12 × tan 35° = 12 × 0.7002 = 8.4025.
- Hypotenuse. cos A = b ÷ c, so c = 12 ÷ cos 35° = 12 ÷ 0.8192 = 14.6493.
- Area and perimeter. ½ × 8.4025 × 12 = 50.4149, and 8.4025 + 12 + 14.6493 = 35.0518.
- Altitude. h = 8.4025 × 12 ÷ 14.6493 = 6.8829.
- Radii. r = (8.4025 + 12 − 14.6493) ÷ 2 = 2.8766 and R = 14.6493 ÷ 2 = 7.3246.
A quick check: the hypotenuse must be the longest side, and the larger acute angle (55°) must face the longer leg (12). Both hold.
Special right triangles
Three families turn up so often that they are worth knowing by sight, and the calculator flags them.
- Whole-number triples. Sides of 3, 4 and 5 make a right angle, and so does any multiple, such as the 6, 8 and 10 that load with this page. The 5-12-13 triangle is another: its altitude is 60 ÷ 13 = 4.6154, its inradius is exactly 2 and its circumradius is 6.5.
- 45-45-90. Half a square cut along the diagonal. The legs are equal and the hypotenuse is a leg times √2, about 1.4142.
- 30-60-90. Half an equilateral triangle. The hypotenuse is twice the short leg and the long leg is the short leg times √3, about 1.7321.
Using it on real jobs
Most practical problems are a right triangle in disguise. A ladder set up at the usual “4 up, 1 out” ratio makes an angle of tan⁻¹(4) = 75.96° with the ground. A ramp with a gradient of 1 in 14 rises at tan⁻¹(1 ÷ 14) = 4.09°; to climb 0.5 m it needs 7 m of run, and the sloping surface is √(7² + 0.5²) = 7.018 m long, barely more than the run.
The mistakes that cause wrong answers are nearly always the same three. First, entering the hypotenuse as a leg: the hypotenuse is always opposite the right angle and always the longest side, so a “hypotenuse” shorter than a leg cannot exist. Second, pairing an angle with the wrong leg: angle A faces leg a, and swapping them swaps sine and cosine. Third, working in the wrong angle mode. A calculator set to radians reads 35 as 35 radians, not 35°, and returns nonsense without complaint.
If your triangle has no right angle, use the triangle calculator, which handles any three sides or angles.