Skip to content
thecalculatorstudio

Right Triangle Calculator: Sides, Angles, Area

Choose what you know about the right triangle and enter it. You will see every side and angle, the area and perimeter, the altitude to the hypotenuse, and the inradius and circumradius.

Last reviewed

Leg a is opposite angle A, and leg b is opposite angle B. The hypotenuse c is opposite the right angle.

Hypotenuse c

5

a = 3, b = 4 · A = 36.8698976458°, B = 53.1301023542°

Leg a
3
Leg b
4
Hypotenuse c
5
Angle A
36.8698976458°
Angle B
53.1301023542°
Area
6
Perimeter
12
Altitude to c
2.4
Inradius
1
Circumradius
2.5

a² + b² = c². The two acute angles add up to 90°. The inradius is (a + b − c) ÷ 2 and the circumradius is half the hypotenuse.

The two rules that solve every right triangle

A right triangle has one 90° angle. The two sides next to it are the legs, a and b, and the side opposite it, the longest, is the hypotenuse, c. The angle opposite leg a is A and the angle opposite leg b is B. Two rules are all you need.

1. Pythagoras. a² + b² = c². The squares on the two legs add up to the square on the hypotenuse. The theorem is among the best known in mathematics.

2. Trigonometry. For the angle A:

  • sin A = a ÷ c (opposite over hypotenuse)
  • cos A = b ÷ c (adjacent over hypotenuse)
  • tan A = a ÷ b (opposite over adjacent)

and the two acute angles add up to 90°, because the three angles of any triangle add up to 180°.

What you can start from

Any two measurements fix a right triangle (other than the two acute angles alone, which give its shape but not its size). The page offers four starting points.

You know How it is solved
Both legs a, b c = √(a² + b²), then A = atan(a ÷ b)
A leg and the hypotenuse a, c b = √(c² − a²), then A = asin(a ÷ c)
A leg and the angle opposite it, a and A b = a ÷ tan A, c = a ÷ sin A
The hypotenuse and an angle, c and A a = c × sin A, b = c × cos A

Worked examples

3, 4 and 5. Legs 3 and 4: c = √(9 + 16) = 5. Angle A = atan(3 ÷ 4) = 36.8698976458°, so B = 53.1301023542°. Area = 3 × 4 ÷ 2 = 6, perimeter 12, altitude to the hypotenuse = 3 × 4 ÷ 5 = 2.4, inradius (3 + 4 − 5) ÷ 2 = 1, circumradius 5 ÷ 2 = 2.5.

A leg and the hypotenuse. a = 7, c = 25: b = √(625 − 49) = √576 = 24, and A = asin(7 ÷ 25) = 16.2602047083°.

A leg and an angle. a = 10, A = 30°: b = 10 ÷ tan 30° = 17.3205080757 and c = 10 ÷ sin 30° = 20.

The hypotenuse and an angle. c = 10, A = 45°: both legs are 10 × sin 45° = 7.07106781187. With A = 30°, a = 5 and b = 8.66025403784.

Pythagorean triples

Some right triangles have whole-number sides. The most common are:

a b c
3 4 5
5 12 13
8 15 17
7 24 25
20 21 29

Any multiple of a triple is another: 6, 8, 10 and 9, 12, 15 are 3-4-5 scaled. Builders use 3-4-5 to check a square corner, measuring 3 along one side and 4 along the other and checking that the diagonal is 5.

The other figures the page gives

  • Area = ab ÷ 2, half the product of the legs.
  • Perimeter = a + b + c.
  • Altitude to the hypotenuse h = ab ÷ c, the height of the triangle if the hypotenuse is its base. It is shorter than either leg.
  • Inradius r = (a + b − c) ÷ 2, the radius of the largest circle that fits inside.
  • Circumradius R = c ÷ 2, because the hypotenuse of a right triangle is a diameter of the circle through its three corners.

Units

Sides use whatever unit you enter, and area uses the same unit squared. Angles are always in degrees. The page does not mix units: if one side is in feet and the other in inches, convert first with the length converter.

Common mistakes

  • Using the Pythagorean theorem on a triangle with no right angle. It holds only when one angle is 90°.
  • Adding the legs instead of squaring. 3 + 4 is not 5. The squares add: 9 + 16 = 25.
  • Putting a leg as the hypotenuse. The hypotenuse is always the longest side.
  • Mixing up opposite and adjacent. Opposite is across from the angle, adjacent is next to it.
  • A calculator in radians. If you compute an angle on another calculator, check degrees against radians. This page uses degrees.

How it is calculated

The known values are read as exact decimals. Two legs give the hypotenuse by square root. A leg and the hypotenuse give the other leg by square root of the difference of squares. An angle and a side use sine, cosine and tangent, with the angle converted to radians using π to 50 digits. The angle A is always recovered as atan(a ÷ b) in degrees, B is 90° minus A, and the area, perimeter, altitude, inradius and circumradius follow from the sides. Everything is shown to 12 significant digits.

Frequently asked questions

What is the Pythagorean theorem?

In a right triangle the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². With legs 3 and 4, c² = 9 + 16 = 25, so c = 5.

How do I find the hypotenuse?

Square the two legs, add them and take the square root: c = √(a² + b²). Legs 5 and 12 give √169 = 13.

How do I find a missing leg?

Subtract the square of the known leg from the square of the hypotenuse and take the root: b = √(c² − a²). With a = 7 and c = 25, b = √(625 − 49) = √576 = 24.

How do I find an angle in a right triangle?

Use the inverse tangent of the opposite leg over the adjacent one. In a 3-4-5 triangle the angle opposite the 3 side is atan(3 ÷ 4) = 36.87°. The other acute angle is 90° minus that, 53.13°.

Why must the hypotenuse be longer than either leg?

It is the longest side, opposite the largest angle (90°). If c were no longer than a leg, a² + b² = c² could not hold with b greater than zero, so the page stops with a message.

What are the inradius and circumradius?

The inradius is the radius of the circle that fits inside the triangle, (a + b − c) ÷ 2. The circumradius is the radius of the circle through all three corners, which in a right triangle is half the hypotenuse.

Related calculators

Sources