Right Triangle Calculator (Pythagorean Theorem)
Enter any two values, at least one of them a side, to find the missing sides, both angles, the area and the perimeter of a right triangle.
How to use the right triangle calculator
Enter any two of: leg a, leg b, hypotenuse c, or angle A (the angle opposite leg a). At least one must be a side. Leave the others blank. The calculator returns every side and angle, the area, perimeter and the height from the right angle to the hypotenuse.
The Pythagorean theorem
In a right triangle, a² + b² = c², where c is the hypotenuse (the longest side, opposite the right angle).
- Find the hypotenuse: c = √(a² + b²). Legs 3 and 4: c = √(9 + 16) = 5.
- Find a leg: a = √(c² − b²). Hypotenuse 13, leg 5: a = √(169 − 25) = 12.
Using angles (SOH CAH TOA)
| Ratio | Formula | Use it to find |
|---|---|---|
| Sine | sin A = opposite ÷ hypotenuse | a = c × sin A |
| Cosine | cos A = adjacent ÷ hypotenuse | b = c × cos A |
| Tangent | tan A = opposite ÷ adjacent | a = b × tan A |
The two acute angles always add up to 90°.
Common right triangles
| Type | Sides | Angles |
|---|---|---|
| 3-4-5 | 3, 4, 5 (and 6-8-10, 9-12-15…) | 36.87°, 53.13° |
| 5-12-13 | 5, 12, 13 | 22.62°, 67.38° |
| 8-15-17 | 8, 15, 17 | 28.07°, 61.93° |
| 45-45-90 | 1, 1, √2 | 45°, 45° |
| 30-60-90 | 1, √3, 2 | 30°, 60° |
Real-world uses
- Squaring a foundation or deck: measure 3 ft along one side and 4 ft along the other; the diagonal should be exactly 5 ft (or 6-8-10 for larger layouts).
- Ladder reach: a 20 ft ladder with its base 5 ft from the wall reaches √(400 − 25) = 19.4 ft up.
- Screen size: a TV 48 in wide and 27 in tall has a diagonal of √(2,304 + 729) = 55.1 in.
- Stairs and ramps: rise and run are the legs; the stringer is the hypotenuse. See the stair calculator.
Frequently asked questions
How do I find the hypotenuse?
Square both legs, add them and take the square root. Legs 6 and 8: √(36 + 64) = 10.
How do I find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse and take the square root.
Can I solve a right triangle with just two angles?
No. Angles alone set the shape but not the size, so you need at least one side.
What is a Pythagorean triple?
Three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17.