Right Triangle Calculator
This right triangle calculator finds the missing sides and angles from two known values, using a² + b² = c² and the trig ratios. Legs of 3 and 4 give a hypotenuse of 5 and angles of 36.87° and 53.13°.
Sources: OpenStax Prealgebra 2e Updated
How It Works
A right triangle has one 90-degree angle (angle C) and two acute angles (A and B) that sum to 90 degrees. Using the Pythagorean theorem (a² + b² = c²) and trigonometric functions, this calculator can determine all unknown values from any two known measurements.
Formulas Used:
- Pythagorean Theorem: a² + b² = c²
- Sine: sin(A) = a/c, sin(B) = b/c
- Cosine: cos(A) = b/c, cos(B) = a/c
- Tangent: tan(A) = a/b, tan(B) = b/a
- Angle Sum: A + B = 90°
Calculator
Enter any two values to calculate the rest:
Right triangle formulas
Label the legs a and b, the hypotenuse c (the side opposite the right angle) and the angles opposite a and b as A and B.
| To find | Use |
|---|---|
| Hypotenuse | c = √(a² + b²) |
| A leg | a = √(c² − b²) |
| Angle A | tan A = a ÷ b, sin A = a ÷ c, cos A = b ÷ c |
| Angle B | B = 90° − A |
| Area | a × b ÷ 2 |
The first two rows are the Pythagorean theorem. The angle rows are the right triangle trig ratios, remembered as SOHCAHTOA.
How to solve a right triangle with legs 3 and 4
- Hypotenuse: c = √(3² + 4²) = √(9 + 16) = √25 = 5.
- Angle A: tan A = 3 ÷ 4 = 0.75, so A = arctan(0.75) = 36.87°.
- Angle B: 90° − 36.87° = 53.13°.
- Area: 3 × 4 ÷ 2 = 6. Perimeter: 3 + 4 + 5 = 12.
The 3-4-5 triangle is the smallest right triangle with whole-number sides. The same theorem gives the straight-line distance between two points on a grid, which is what the distance between two points calculator works out.
Solving from one side and one angle
With side a and angle A, the calculator uses c = a ÷ sin A and b = a ÷ tan A. For a = 5 and A = 30°: c = 5 ÷ 0.5 = 10 and b = 5 ÷ 0.57735 = 8.6603.
If the hypotenuse is not a whole number, its exact form is a square root such as √50 = 5√2, which the square root calculator simplifies.
Pythagorean triples
| a | b | c | Smallest angle |
|---|---|---|---|
| 3 | 4 | 5 | 36.87° |
| 5 | 12 | 13 | 22.62° |
| 8 | 15 | 17 | 28.07° |
| 7 | 24 | 25 | 16.26° |
What the calculator checks
It needs at least two values, including one side. It rejects a hypotenuse shorter than a leg, such as c = 3 with a = 5, and two angles that do not add up to 90°.
For a triangle without a right angle, use the triangle calculator, which applies the law of sines and the law of cosines.
Questions about right triangles
How do you find the hypotenuse of a right triangle?
Square the two legs, add them and take the square root: c = √(a² + b²). With legs 5 and 12, c = √(25 + 144) = √169 = 13.
How do you find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse and take the root: a = √(c² − b²). With c = 13 and b = 12, a = √(169 − 144) = 5.
What does SOHCAHTOA mean?
It is a memory aid for the trig ratios: Sine = Opposite ÷ Hypotenuse, Cosine = Adjacent ÷ Hypotenuse, Tangent = Opposite ÷ Adjacent.
Can I solve a right triangle from two angles?
No. Two angles fix the shape but not the size: many triangles of different sizes share them. You need at least one side length.
Sources
- OpenStax Prealgebra 2e, 9.3 Use Properties of Angles, Triangles, and the Pythagorean Theorem — the Pythagorean theorem a² + b² = c² (checked October 16, 2026)
- OpenStax Algebra and Trigonometry 2e, 7.2 Right Triangle Trigonometry — sine, cosine and tangent as ratios of the sides (checked October 16, 2026)