Right Triangle Calculator (Pythagorean theorem)

Solve a right triangle from any two values — legs, hypotenuse or an acute angle — with Pythagoras and trig. Sides, angles, area, and a diagram.

The right angle is at C. Enter any two values, including at least one side — the two legs, a leg and the hypotenuse, or a side and an acute angle.

Solving a right triangle

A right triangle has one 90° corner, and that single constraint means justtwo more measurements pin it down completely (as long as one is a side — angles alone fix the shape, not the size). This calculator uses the Pythagorean theorem for the sides and the basic trig ratios for the angles, and draws the result to scale.

Pythagorean theorem: a² + b² = c²

sin A = a/c  ·  cos A = b/c  ·  tan A = a/b

The three ways in

With the two legs, the hypotenuse is √(a² + b²) and the angles come from their ratio. With a leg and the hypotenuse, the other leg is √(c² − a²). With a side and an acute angle, the trig ratios give the rest — and because the two acute angles always add to 90°, knowing one gives the other for free.

Worked example: the 3-4-5

Enter legs a = 3 and b = 4. The hypotenuse is √(9 + 16) = √25 = 5 — the famous 3-4-5 triangle. The angles are tan⁻¹(3/4) = 36.87° and its complement 53.13°, and the area is ½ × 3 × 4 = 6. Clear a leg and enter the hypotenuse 5 with leg 3 instead to see it work backwards to b = 4.

Need a non-right triangle?

If your triangle doesn't have a 90° corner, use the generaltriangle solver, which takes any three measurements and applies the law of sines and cosines.

Exact arithmetic, approximate measurements

Pythagoras is exact, and irrational results such as √2 are shown rounded for display only. In practice the limit is measurement: a hypotenuse calculated from two sides measured to the nearest millimetre is itself only good to about a millimetre, and the extra digits are arithmetic rather than information. Where the triangle describes something physical — a rafter, a brace, a diagonal — allow for the fact that the real thing has thickness and the corner is not a mathematical point.