Leg a, Leg b
Waiting for input
How this calculator works
In a right triangle the square of the hypotenuse equals the sum of the squares of the two legs. Enter the legs in any unit; the hypotenuse and perimeter come out in the same unit and the area in that unit squared. The calculator also gives the two acute angles.
Formula
- c = √(a² + b²)
- Area = a × b / 2
- Perimeter = a + b + c
- Angle opposite a = arctan(a / b)
Worked example
Legs of 3 and 4
- Leg a
- 3
- Leg b
- 4
Resultc = 5
Hypotenuse of a right triangle with legs 3 and 4.
Frequently asked questions
What is the Pythagorean theorem?
For a right triangle with legs a and b and hypotenuse c, a² + b² = c².
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.
Does this work for triangles without a right angle?
No. For other triangles use the law of cosines: c² = a² + b² − 2ab × cos(C).
More math calculators
Results are estimates based on the values you enter and the published method shown above. They do not replace professional medical, financial or legal advice. Method reviewed October 7, 2026. About this site