Pythagorean Theorem Calculator
Fill in any two sides of a right triangle — the two legs, or one leg and the hypotenuse — and this tool solves for the missing side using a² + b² = c².
📌 Enter Two Sides
📊 Result
Disclaimer: This tool performs standard mathematical calculations for educational and reference purposes. Always double-check results independently for graded coursework, exams, or safety-critical applications.
Understanding the Pythagorean Theorem
The Pythagorean theorem describes a fixed relationship between the three sides of any right triangle — a triangle containing one 90° angle. It states that 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.
The Formula
a² + b² = c², where a and b are the two legs and c is the hypotenuse. Rearranged, this gives three versions depending on which side is missing: c = √(a² + b²), a = √(c² − b²), or b = √(c² − a²).
Worked Example
A right triangle has legs of 3 units and 4 units. Find the hypotenuse.
- Step 1: a² + b² = 3² + 4² = 9 + 16 = 25
- Step 2: c = √25 = 5 units
Because 3, 4, and 5 are all whole numbers, this is a well-known Pythagorean triple. Any multiple of it — 6-8-10, 9-12-15, and so on — also forms a valid right triangle with whole-number sides.
Second Worked Example: Finding a Leg
A ladder 13 ft long leans against a wall with its foot 5 ft from the base. How high does it reach? Put 13 in the Hypotenuse box and 5 in Leg b, and leave Leg a empty.
- a² = c² − b² = 169 − 25 = 144.
- a = √144 = 12 ft. The tool prints 12.0000 for leg a, because it always shows four decimals.
Not every answer is clean. With a hypotenuse of 10 and a leg of 7, the missing side is √(100 − 49) = √51 = 7.1414. And for a screen 48 in wide and 27 in tall, the diagonal is √(48² + 27²) = √3,033 = 55.0727 in. The 3-4-5 “Bonus” note appears only when the three sides are a multiple of 3-4-5, so 5-12-13 does not trigger it even though it is also a valid right triangle.
Common Mistakes
- Leaving all three fields filled. The tool needs exactly two sides. The default has leg a and leg b filled, so clear one before typing a hypotenuse, or you will see the “Fill in any two sides” message instead of a result.
- Putting the longest side in a leg box. The hypotenuse is opposite the right angle and is always the longest. If c is not longer than the leg you give, the tool reports that this is not a valid right triangle.
- Mixing units. Entering one side in feet and the other in inches gives a meaningless answer. Convert everything to the same unit first.
- Applying it to any triangle. The relationship only holds when one angle is exactly 90 degrees.
- Rounding too early. If you will use the result in another calculation, copy the four-decimal value rather than the rounded figure from memory.
Where You Would Use This
- Working out the length of a ladder, ramp or brace needed to reach a given height at a given distance.
- Checking that a frame, patio or foundation is square by comparing the diagonal with the expected value.
- Finding the diagonal of a television, monitor or table from its width and height.
- Solving homework problems and checking your own working on right-triangle questions.