How do I solve my right triangle?
Enter any two of the three sides and angle α, and get the rest of the right triangle.
- Hypotenuse c
- 5
A right triangle with legs 3 and 4 has a hypotenuse of 5 and angles of 36.869898° and 53.130102°.
- Leg a
- 3
- Leg b
- 4
- Angle α
- 36.869898°
- Angle β
- 53.130102°
- Area
- 6
- Perimeter
- 12
- Height to the hypotenuse
- 2.4
Hypotenuse c: 5. A right triangle with legs 3 and 4 has a hypotenuse of 5 and angles of 36.869898° and 53.130102°.
What does the triangle look like?
How to calculate
Solves a right triangle from any two sides, or a side and an angle: all three sides, both acute angles, the area, the perimeter, and the height.
Example with the default inputs (Leg a 3, Leg b 4): A right triangle with legs 3 and 4 has a hypotenuse of 5 and angles of 36.869898° and 53.130102°.
Method: a² + b² = c², sin α = a ÷ c, cos α = b ÷ c, tan α = a ÷ b, and β = 90° − α.
- The angle between legs a and b is 90°; α is opposite a and β is opposite b.
- Enter two of a, b, c and α. To start from β, enter it as α and swap the names of the legs.
- Sides are more than 0, in one unit; α is more than 0° and less than 90°. A third value must fit the first two.
Worked examples
Each example is checked against the calculator on every build.
- Leg a 3, Leg b 4 gives Hypotenuse c 5, Angle α 36.869898°, Angle β 53.130102°, Area 6, Perimeter 12, Height to the hypotenuse 2.4.Source: hand calculation in content.mdx: c = √(9 + 16) = 5; α = atan(3/4); Python 3: math.atan2(3, 4) = 0.6435011087932844, math.pi/2 - math.atan2(3, 4) = 0.9272952180016122
- Hypotenuse c 10, Angle α 30° gives Leg a 5, Leg b 8.660254, Angle β 60°, Area 21.650635.Source: hand calculation in content.mdx: a = 10 × sin 30° = 5, b = 10 × cos 30° = 5√3; Python 3: 10*math.sin(math.pi/6) = 4.999999999999999, 10*math.cos(math.pi/6) = 8.660254037844387, math.pi/2 - math.pi/6 = 1.0471975511965979, a*b/2 = 21.650635094610966
- Leg b 12, Hypotenuse c 13 gives Leg a 5, Angle α 22.619865°, Perimeter 30, Height to the hypotenuse 4.615385.Source: hand calculation in content.mdx: a = √(169 − 144) = 5; Python 3: math.atan2(5, 12) = 0.3947911196997615, 5*12/13 = 4.615384615384615
- Leg a 7, Angle α 45° gives Leg b 7, Hypotenuse c 9.899495, Angle β 45°, Area 24.5.Source: hand calculation in content.mdx: β = 90° − 45° = 45°, so b = a = 7 and c = 7√2; Python 3: 7/math.sin(math.pi/4) = 9.899494936611665, 7/math.tan(math.pi/4) = 7.000000000000001
- Leg a 3, Leg b 4, Hypotenuse c 5 gives Hypotenuse c 5, Area 6.Source: hand calculation in content.mdx: 9 + 16 = 25, so all three sides fit
How it works
The triangle has a right angle (90°) between legs a and b. The hypotenuse c is opposite the right angle. Angle α is opposite leg a, and angle β is opposite leg b. Four equations link a, b, c and α:
- a² + b² = c² (the Pythagorean theorem)
- sin α = a ÷ c
- cos α = b ÷ c
- tan α = a ÷ b
Fill in any two of a, b, c and α, and the calculator finds the rest:
- a and b: c = √(a² + b²).
- a and c: b = √((c − a)(c + a)), the same as √(c² − a²) with less rounding error.
- b and c: a = √((c − b)(c + b)).
- a and α: b = a ÷ tan α and c = a ÷ sin α.
- b and α: a = b × tan α and c = b ÷ cos α.
- c and α: a = c × sin α and b = c × cos α.
When α is not given, it is found from the two legs as the angle whose tangent is a ÷ b (α = atan2(a, b), which is accurate for every shape of triangle). Angles are worked out in radians and shown in degrees unless you pick rad.
If you fill in more than two values, the calculator solves from the first two in the order a, b, c, α, and the others must match the result (to 9 significant figures), or it asks you to clear one.
Once the sides are known it also shows:
- Angle β = 90° − α, because the three angles of a triangle add up to 180°
- Area = a × b ÷ 2
- Perimeter = a + b + c
- Height to the hypotenuse = a × b ÷ c, the distance from the right angle to side c
Assumptions
- Sides are more than 0, all in the same unit. Angle α is more than 0° and less than 90°.
- A leg must be shorter than the hypotenuse. If the values you enter do not fit one right triangle (for example, three sides that do not satisfy a² + b² = c²), the calculator says so.
- An angle alone gives no answer: it fixes the shape but not the size.
Worked examples by hand
Legs 3 and 4. c = √(9 + 16) = 5. tan α = 3 ÷ 4, so α = 36.87° (0.6435 radians) and β = 90° − 36.87° = 53.13°. The area is 3 × 4 ÷ 2 = 6, the perimeter 3 + 4 + 5 = 12, and the height to the hypotenuse 12 ÷ 5 = 2.4.
Hypotenuse 10 and α = 30°. a = 10 × sin 30° = 10 × 0.5 = 5, and b = 10 × cos 30° = 10 × 0.8660254 = 8.660254. β = 90° − 30° = 60°. The area is 5 × 8.660254 ÷ 2 = 21.650635.
Leg b = 12 and hypotenuse 13. a = √(169 − 144) = √25 = 5. tan α = 5 ÷ 12, so α = 22.62° (0.3948 radians) and β = 67.38°. The perimeter is 5 + 12 + 13 = 30, and the height 5 × 12 ÷ 13 = 4.615385.
Leg a = 7 and α = 45°. β = 90° − 45° = 45°, so the triangle is isosceles: b = 7 ÷ tan 45° = 7, and c = 7 ÷ sin 45° = 7√2 = 9.899495. The area is 7 × 7 ÷ 2 = 24.5.
Legs 3 and 4 with hypotenuse 5. The first two values, 3 and 4, give c = 5, which matches the 5 you typed, so the answer stands: area 6.
Other questions people ask
How do I solve a right triangle?
You need two values besides the right angle, and at least one must be a side. With two sides, use a² + b² = c² for the third side and a sine, cosine or tangent for an angle. With a side and an angle, use sine, cosine or tangent for the other sides. The two acute angles always add up to 90°, so one gives the other.
What does SOH CAH TOA mean?
It is a way to remember the three ratios for an acute angle of a right triangle: Sine = Opposite ÷ Hypotenuse, Cosine = Adjacent ÷ Hypotenuse, Tangent = Opposite ÷ Adjacent. For angle α here, the opposite side is a, the adjacent side is b, and the hypotenuse is c.
Why can I not solve a triangle from its angles alone?
Angles fix the shape of a right triangle but not its size. A triangle with angles 30° and 60° can have a hypotenuse of 1, 10 or 1,000. That is why the calculator asks for one angle, α, and needs at least one side with it.
I know angle β. How do I enter it?
Enter it as α and swap the names of the legs: the leg opposite your angle is a, and the other leg is b. Or enter 90° − β as α, since the two acute angles always add up to 90°.
How do I find the area of a right triangle?
Multiply the two legs and halve the result: area = a × b ÷ 2. With legs 3 and 4, the area is 6. The legs are the base and the height, because they meet at a right angle.
What is the height to the hypotenuse?
The shortest distance from the right angle to the hypotenuse. It equals a × b ÷ c, because the area can be written both as a × b ÷ 2 and as c × height ÷ 2. For legs 3 and 4 and hypotenuse 5, the height is 12 ÷ 5 = 2.4.
Can I type the angle in radians?
Yes. Pick rad next to the angle box. 90° is π/2 radians, about 1.5708, so an acute angle must be between 0 and about 1.5708 radians. Angle β is always shown in degrees.