How to use the Right Triangle Calculator
- Enter two of the three sides: legs a and b, or the hypotenuse c (the longest side, opposite the right angle).
- Leave the side you want to find empty.
- Read the missing side, the angles, the area and the perimeter.
How it works
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². Given both legs, take the square root of a² + b². Given a leg and the hypotenuse, the missing leg is the square root of c² − a².
The angles come from trigonometry. Angle A, opposite side a, is the inverse sine of a ÷ c, and angle B is 90° minus A. The area is half the product of the two legs.
Formula
a² + b² = c² c = √(a² + b²) a = √(c² − b²) A = sin⁻¹(a ÷ c) B = 90° − A Area = a × b ÷ 2
Example
Legs of 5 and 12 give a hypotenuse of √(25 + 144) = √169 = 13. The angles are about 22.62° and 67.38°, the area is 30 and the perimeter is 30.
Pythagorean triples
These whole-number right triangles are handy for checking that a corner is square, for example measuring 3 ft and 4 ft from a corner and checking the diagonal is 5 ft.
| a | b | c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 20 | 21 | 29 |
| 6 | 8 | 10 |
| 9 | 12 | 15 |
Frequently asked questions
What is the Pythagorean theorem?
In any right triangle, a² + b² = c², where c is the hypotenuse, the side opposite the right angle.
How do I find the hypotenuse?
Square both legs, add them and take the square root. For legs 6 and 8: 36 + 64 = 100, and √100 = 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. With c = 10 and a = 6: 100 − 36 = 64, so b = 8.
Does it work for triangles without a right angle?
No. For other triangles use the law of cosines: c² = a² + b² − 2ab·cos C.
Last reviewed December 3, 2026. Spotted an error? Tell us.
Add this calculator to your website
Free for blogs, schools and businesses. Copy the code and paste it into your page (in WordPress, use a Custom HTML block). Please keep the credit link.