Right Triangle Calculator

Solve a right triangle from two independent side, acute-angle or altitude measurements, including ambiguous solutions.

Use the same length unit for every side. The legs a and b meet at the square (90°) corner; the hypotenuse c is the longest side. A is opposite a; B is opposite b. Two angles do not determine the triangle size.

Hypotenuse c

5

  • Leg a3
  • Leg b4
  • Angle A36.86989765°
  • Angle B53.13010235°
  • Altitude to c2.4
  • Area (square units)6
  • Perimeter12
  • Inradius1
  • Circumradius2.5
abcAB

How this was calculated

  1. The Pythagorean theorem says a² + b² = c² in a right triangle (a triangle with one square, 90° corner). c is the hypotenuse, the longest side, across from the square corner. Square each leg (multiply it by itself), add them, then take the square root.c = √(a² + b²)Put in your numbers: c = √(3² + 4²) = √(9 + 16) = √25Answer: c = 5
  2. Tangent (tan) of angle A = the side opposite ÷ the side next to it. atan works backwards from that number to the angle.A = atan(a ÷ b)Put in your numbers: A = atan(3 ÷ 4)Answer: A = 36.86989765°
  3. The two small angles of a right triangle always add up to 90°, because all three angles make 180°.B = 90° − APut in your numbers: B = 90° − 36.86989765°Answer: B = 53.13010235°
  4. A right triangle is half of a rectangle with sides a and b, so multiply the legs and halve.Area = ab ÷ 2Put in your numbers: Area = 3 × 4 ÷ 2Answer: Area = 6 square units
  5. The altitude is the height from the square corner to the hypotenuse. The area is also c × h ÷ 2, so h = ab ÷ c.h = ab ÷ cPut in your numbers: h = 3 × 4 ÷ 5Answer: h = 2.4
  6. The perimeter (P) is the distance all the way around: add the three sides.P = a + b + cPut in your numbers: P = 3 + 4 + 5Answer: P = 12
  7. The inradius is the radius of the biggest circle that fits inside the triangle.Inradius r = (a + b − c) ÷ 2Put in your numbers: r = (3 + 4 − 5) ÷ 2Answer: r = 1
  8. The circumradius is the radius of the circle that passes through all three corners.Circumradius R = c ÷ 2Put in your numbers: R = 5 ÷ 2Answer: R = 2.5The hypotenuse is a diameter of the circumscribed circle (Thales' theorem).
  9. Quick check: a² + b² = c²; sin(A) = a/c; A + B = 90°.

Right triangles in simple words

A right triangle has one square (90°) corner. The two sides that meet there are the legs, a and b. The longest side, across from the square corner, is the hypotenuse, c. The other two angles, A and B, always add up to 90°.

If you know two sides, the Pythagorean theorem (a² + b² = c²) gives the third. If you know a side and an angle, sine, cosine and tangent do the job. For angle A, sine = opposite side ÷ hypotenuse, cosine = next-to side ÷ hypotenuse, and tangent = opposite ÷ next-to side.

Example: legs 3 and 4. The hypotenuse is √(3² + 4²) = √25 = 5. The area is 3 × 4 ÷ 2 = 6, and angle A is about 36.87°, so angle B is 90° − 36.87° = 53.13°.

Formula and method

Let a and b be legs, c the hypotenuse, A the angle opposite a and h the altitude to c. Use a²+b²=c², sin(A)=a/c, cos(A)=b/c and h=ab/c. One side with an acute angle fixes the scale and shape.

Worked example

Legs 3 and 4 give hypotenuse 5 and altitude 12/5 = 2.4. With only c = 5 and h = 2.4, either (a,b) = (3,4) or (4,3) works; the calculator displays both assignments.

Inputs and limitations

Two angles alone cannot determine side lengths. Acute angles must be strictly between 0° and 90°. An altitude to the hypotenuse cannot exceed c/2. The figure labels the sides and angles but is not drawn to scale.

Worked steps, exact radicals and circles

Each solution shows the formulas with your numbers substituted, for example c = √(3² + 4²) = √(9 + 16) = √25 = 5. When whole-number sides give a non-square result, the exact simplified radical appears too, such as legs 2 and 4 giving c = √20 = 2√5.

The inradius of a right triangle is r = (a + b − c) ÷ 2 and the circumradius is R = c ÷ 2, because the hypotenuse is a diameter of the circumscribed circle. A 3-4-5 triangle has r = 1 and R = 2.5.

Frequently asked questions

What are the inradius and circumradius of a right triangle?

The inradius is (a + b − c) ÷ 2 and the circumradius is half the hypotenuse. For legs 5 and 12 with hypotenuse 13, r = 2 and R = 6.5.

References

Last updated . Results are estimates for informational purposes only.