Pythagorean Theorem Calculator
Enter two sides of a right triangle to find the hypotenuse or a missing leg using a² + b² = c² — both the exact simplified radical (like 2√2) and the decimal answer, plus the perimeter, area, and whether the three sides form a Pythagorean triple. Covers the geometry unit taught in grade 8/9 math across Canadian provinces: legs of 3 and 4 give a hypotenuse of exactly 5.
5
Hypotenuse (exact and decimal)
Legs: 3, 4 · Hypotenuse: 5
Perimeter: 12 · Area: 6 · Pythagorean triple? Yes
Show the steps
a² + b² = c², where c is always the hypotenuse (the longest side, opposite the right angle). How we calculate →
The right-triangle rule: a² + b² = c²
In any right triangle, the two shorter sides (the "legs") and the longest side (the "hypotenuse," always opposite the right angle) follow one fixed relationship: a² + b² = c². For legs 3 and 4: 3² + 4² = 9 + 16 = 25, and √25 = 5 — the hypotenuse.
The theorem only works for the hypotenuse squared equal to the SUM of the two legs squared — never subtract, and never assume which side is the hypotenuse without checking: it's always the longest of the three sides.
When the answer isn't a whole number: exact vs. decimal
Not every right triangle has whole-number sides. Legs of 1 and 1 give a hypotenuse of √(1² + 1²) = √2 — an irrational number that never terminates as a decimal (1.414214...). The exact answer is √2; the decimal answer (1.414214) is a rounded approximation useful for measuring in the real world.
When the number under the root does simplify — like √8 = 2√2, or √50 = 5√2 — this calculator pulls out the largest perfect-square factor automatically, the same technique used to simplify any square root.
Pythagorean triples: whole-number right triangles
A Pythagorean triple is a set of three positive whole numbers that satisfy a² + b² = c² exactly, with no rounding. 3-4-5 is the smallest and most famous: 9 + 16 = 25 = 5². Others include 5-12-13, 6-8-10 (just 3-4-5 doubled), 7-24-25, and 8-15-17.
Checking 2-3-4 the same way: 2² + 3² = 4 + 9 = 13, but 4² = 16 — 13 ≠ 16, so 2-3-4 is not a right triangle at all, let alone a Pythagorean triple. A quick a²+b² vs c² comparison instantly tells you which case you're in.
Finding a missing leg (not just the hypotenuse)
The same relationship rearranges to solve for either leg when the hypotenuse and one leg are already known: b = √(c² − a²). For a hypotenuse of 10 and a known leg of 6: b = √(10² − 6²) = √(100 − 36) = √64 = 8 — another instance of the 3-4-5 triple, scaled by 2.
A common mistake here is subtracting in the wrong order (a² − c² instead of c² − a²), which produces a negative number under the root — a sign that the hypotenuse and known leg were swapped, since the hypotenuse must always be the largest of the three sides.
Frequently asked questions
What is the Pythagorean theorem formula?
a² + b² = c², where a and b are the two legs of a right triangle and c is the hypotenuse (the side opposite the right angle, always the longest of the three). It only applies to right triangles.
How do you find the hypotenuse of a right triangle?
Square both legs, add the results, then take the square root: c = √(a² + b²). For legs 3 and 4: c = √(9 + 16) = √25 = 5.
How do you find a missing leg instead of the hypotenuse?
Rearrange the formula to isolate the unknown leg: b = √(c² − a²), subtracting the known leg squared from the hypotenuse squared before taking the square root. The hypotenuse must be the larger of the two known values.
What is a Pythagorean triple?
A set of three positive whole numbers that satisfy a² + b² = c² with no rounding — like 3-4-5, 5-12-13, 6-8-10, 7-24-25, and 8-15-17. Any multiple of a triple (like 6-8-10, which is 3-4-5 doubled) is also a valid triple.
How do I know which side is the hypotenuse?
The hypotenuse is always the longest side and is always opposite the right angle — it's the side you're solving for whenever you're given both legs, and the larger of the two known values whenever you're solving for a leg.
What if the hypotenuse comes out as an irrational number?
That's normal — most right triangles with whole-number legs do NOT have a whole-number hypotenuse. Legs of 1 and 1, for example, give a hypotenuse of √2 ≈ 1.414214, which never terminates as a decimal. The exact form (the simplified radical) is the precise answer; the decimal is a rounded approximation.
Can the Pythagorean theorem be used for non-right triangles?
No — a² + b² = c² only holds for right triangles. For any other triangle, the related but more general Law of Cosines is needed instead (c² = a² + b² − 2ab·cos(C)), which reduces to the Pythagorean theorem exactly when angle C is 90°.
Researched & verified by the Calcuris Data & Research Team. How we build and check our tools →