The Pythagorean theorem is the cornerstone of right-triangle geometry: a² + b² = c², where a and b are the two legs (the sides meeting at the right angle) and c is the hypotenuse (the longest side, opposite the right angle). Rearranged, it finds any missing side — the hypotenuse as c = √(a² + b²), or a leg as b = √(c² − a²). This calculator does both, and throws in the triangle's area, perimeter and acute angles.
Reviewed: June 20, 2026 · Author: Naveen P N, Founder — AI Calculator · Verified against: the Pythagorean theorem and right-triangle trig, recomputed in code.
The formula, both ways
If you know both legs, square them, add, and take the square root for the hypotenuse. If you know a leg and the hypotenuse, subtract the squares the other way and take the root for the missing leg — but the hypotenuse must be the larger of the two, or the triangle can't exist. With all three sides known, the area is half the product of the legs and the acute angles come from the arctangent of the leg ratio.
Worked example — legs 3 and 4
Scenario: a right triangle with legs a = 3 and b = 4.
The famous 3-4-5 triangle: legs 3 and 4 give a hypotenuse of exactly 5, with area 6, perimeter 12, and acute angles of 36.87° and 53.13° (which sum to 90°, as they must). Working backward in leg mode, a leg of 5 with a hypotenuse of 13 gives the other leg as √(169 − 25) = 12 — the 5-12-13 triple. Any multiple of a triple works too, like 6-8-10.
Frequently Asked Questions
a² + b² = c² for a right triangle. Legs a, b; hypotenuse c (longest side).
c = √(a² + b²). Legs 5, 12 → √169 = 13.
b = √(c² − a²). a = 5, c = 13 → √144 = 12. Needs c > a.
Whole-number sides: 3-4-5, 5-12-13, 8-15-17, 7-24-25 (and multiples).
Area (½·a·b), perimeter (a+b+c), and the two acute angles.