Pythagorean Theorem Calculator

Solve right triangles using a²+b²=c².

Select which side to find, enter two known lengths.

What This Calculator Does

Any right triangle ties its three sides together through a fixed relationship, which means knowing any two of them is enough to find the third. This calculator solves that relationship for you — give it the two sides you know, tell it which side you're missing, and it returns the length of that missing side.

How to Use It

Start with the "Which side to find?" dropdown: Hypotenuse, Leg (a), or Leg (b). What the two number fields mean depends on that choice — when solving for the hypotenuse, both fields are the two legs; when solving for a leg, one field is the other known leg and the other field is the hypotenuse itself (the on-page labels spell out which is which for the option you've selected). Both fields are always required, since there's no way to solve the equation with only one known side.

The Formula

The Pythagorean theorem states a² + b² = c², where a and b are the two legs of a right triangle and c is the hypotenuse — always the longest side, opposite the right angle. Solving for the hypotenuse is a direct application: c = √(a² + b²). Solving for a missing leg instead just rearranges the same equation: a = √(c² − b²), or b = √(a² − c²) depending on which leg you're chasing. Because a leg can never be longer than the hypotenuse in a real right triangle, the calculator rejects any input where the hypotenuse you've entered isn't actually greater than the known leg — that combination can't describe a real triangle.

A Worked Example

The classic case: legs of 3 and 4. c = √(3² + 4²) = √(9 + 16) = √25 = 5 — the well-known 3-4-5 triangle, and every multiple of it (6-8-10, 9-12-15) scales the same way. Run the same triangle in reverse to see the leg-solving modes at work: given a leg of 3 and a hypotenuse of 5, the missing leg is √(5² − 3²) = √(25 − 9) = √16 = 4. And given a leg of 4 and the same hypotenuse of 5, the missing leg is √(5² − 4²) = √(25 − 16) = √9 = 3 — each one recovering exactly the side left out of the original triangle.

How to Solve It Manually

For the hypotenuse: square both legs, add the squares together, then take the square root of that sum (3² + 4² = 9 + 16 = 25, and √25 = 5). For a missing leg, do the same thing in reverse — square the hypotenuse and the known leg, subtract the leg's square from the hypotenuse's square, then take the square root of what's left (5² − 3² = 25 − 9 = 16, and √16 = 4). The only thing to keep straight is which number gets subtracted from which: the hypotenuse's square always comes first, since it's always the largest of the three squared values.

FAQ

How do I find the hypotenuse?
Enter the two leg lengths a and b. The calculator computes c = √(a² + b²).
Can I find a missing leg instead of the hypotenuse?
Yes — use the "Which side to find?" dropdown to choose the hypotenuse or either leg, then enter the two known side lengths. Both number fields are always required; the dropdown determines what they represent.