Pythagorean Theorem Calculator
Enter any 2 of the 3 right-triangle sides and instantly solve for the third using a² + b² = c². Includes an SVG diagram, area, perimeter, and a Pythagorean triple check.
5
Hypotenuse c
6
Area
12
Perimeter
Solve: a² + b² = c²
Enter any 2 values. Leave the missing side blank — it will be calculated. c is always the hypotenuse (longest side).
Famous Triples (click to load)
Right Triangle Diagram
✓ 3-4-5 — a classic primitive Pythagorean triple.
Hypotenuse c
5 cm
a² + b² = c² → 3² + 4² = 5²
3 cm
Leg a
4 cm
Leg b
5 cm
Hypotenuse c
6 cm²
Area
12 cm
Perimeter
The Pythagorean Theorem: a² + b² = c²
Named for the ancient Greek mathematician Pythagoras (though the relationship was known to earlier Babylonian and Indian mathematicians too), the theorem states that in any right triangle — one containing a 90° angle — the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides, called the legs. Squaring a length just means multiplying it by itself, so a 3-unit leg contributes 3 × 3 = 9 to the total, a 4-unit leg contributes 16, and their sum, 25, is exactly the square of the 5-unit hypotenuse.
One simple way to picture why this holds: draw a square directly on each of the three sides of a right triangle. The theorem says the area of the square sitting on the hypotenuse always exactly equals the combined area of the two smaller squares sitting on the legs — no matter how the triangle is stretched or rotated, as long as that 90° corner stays put. This calculator applies the theorem in reverse too: give it any two sides, and it rearranges the formula to solve for whichever one you left blank.
The Three Forms of the Formula
Solve for hypotenuse: c = √(a² + b²)Solve for a leg (given b, c): a = √(c² − b²)Solve for a leg (given a, c): b = √(c² − a²)Area = (a × b) / 2 · Perimeter = a + b + cCommon Pythagorean triples: a handful of whole-number side combinations come up constantly — 3-4-5, 5-12-13, 8-15-17, 7-24-25, 20-21-29, and 9-40-41 are the classics. Multiplying every side of a triple by the same whole number always produces another valid triple (6-8-10 and 9-12-15 are both just the 3-4-5 triple scaled up), which is why this calculator flags scaled matches too, not only the base pattern.
🏗️
Squaring a Frame
Builders mark 3 and 4 units along two edges of a foundation or wall frame — if the diagonal measures exactly 5, the corner is a true right angle.
📺
Screen Diagonals
A TV or monitor's advertised size is the hypotenuse of its width and height — exactly what this calculator solves for when you enter those two legs.
🗺️
Straight-Line Distance
Travel 3 blocks east and 4 blocks north, and you're 5 blocks away as the crow flies — the same math our distance calculator uses on a coordinate grid.
🔺
Non-Right Triangles
This formula only applies to right triangles. For any other triangle, the Law of Cosines on our triangle calculator is the general-purpose version.
— FAQ