Right Triangle Calculator

Solve any right triangle from any two known values: two sides, or one side and one acute angle. Returns all sides, both angles, area and perimeter.

How this works

A right triangle has one 90° angle. The two sides meeting at that angle are the legs (a and b); the side opposite the right angle is the hypotenuse (c) and is always the longest. Given any two of those values — two legs, leg-and-hypotenuse, or one acute angle plus one side — you can solve for everything else using the Pythagorean theorem and basic trigonometry.

The key relationships are: a² + b² = c² (Pythagoras); sin(A) = opposite/hypotenuse = b/c; cos(A) = adjacent/hypotenuse = a/c; tan(A) = opposite/adjacent = b/a. The mnemonic SOH-CAH-TOA covers all three trig ratios. Once one acute angle is known, the other equals 90° minus it (the three angles sum to 180°). Area is just (1/2) × a × b — half the rectangle the two legs would form.

Real-world right-triangle problems show up everywhere. Roof pitches, ramp slopes, ladder placement, distance from a fixed observer, surveying with theodolites, navigation by line of sight — all collapse to "I have these two known values, what are the others?". This calculator handles both the Pythagorean case (sides only) and the trig case (angle plus side) so you don't need to remember which formula belongs where.

The formula

Pythagoras: a² + b² = c² SOH-CAH-TOA: sin(A) = opposite / hypotenuse = b / c cos(A) = adjacent / hypotenuse = a / c tan(A) = opposite / adjacent = b / a A + B = 90° Area = (1/2) × a × b Perimeter = a + b + c

a is the leg adjacent to angle A. b is the leg opposite angle A. c is the hypotenuse (opposite the 90° angle). Angles A and B are the two acute angles, summing to 90°. Inverse trig functions (asin, acos, atan) recover angles from side ratios.

Example calculation

  • Given a = 3, b = 4. Find c, angles, area.
  • c = √(9+16) = 5. tan(A) = 4/3 → A = 53.13°. B = 36.87°. Area = (1/2)(3)(4) = 6.

Frequently asked questions

Why does the calculator need exactly two values?

A right triangle has 5 unknowns (3 sides, 2 acute angles) and 3 known constraints (one 90° angle, Pythagoras, A + B = 90°). That leaves 2 degrees of freedom — fix two values and everything else is determined. With one value given, the triangle is unconstrained (infinite shapes work); with three or more, you risk over-specification (the inputs may not be consistent).

How do I find the height of a tree using a right triangle?

Stand a known distance from the tree (the adjacent side, a). Measure the angle of elevation to the top — use a smartphone clinometer app or a protractor with a plumb line. Plug into tan(angle) = height / distance, so height = distance × tan(angle). Add your eye height for total tree height. Same trick works for buildings, towers, cliffs — anything tall enough to be hard to measure directly.

Related calculators