Pythagorean Theorem Calculator
Enter the two sides you know of a right triangle to find the third.
Need the full working for a harder problem? Try the trigonometry step-by-step solver.
The formula
In a right triangle, a² + b² = c², where c is the hypotenuse.
Worked example
A screen is 48 inches wide and 27 inches high. What is its diagonal size?
- Square the sides: 48² = 2,304 and 27² = 729
- Add: 2,304 + 729 = 3,033
- Take the square root: √3,033 = 55.07
It is a 55-inch screen.
How it works
The theorem
In a right triangle, a² + b² = c², where c is the hypotenuse, the side opposite the right angle.
Finding the hypotenuse
Square both legs, add them, and take the square root.
Finding a leg
Square the hypotenuse, subtract the square of the known leg, and take the square root.
Good to know
- The theorem holds only for right triangles. For any other triangle use the law of cosines.
- The hypotenuse is always the longest side, so a leg can never be longer than it.
- Both sides must be in the same unit.
Common questions
Does it work for any triangle?
No, only right triangles. For other triangles use the law of cosines, which the triangle calculator applies for you.
What is a Pythagorean triple?
Three whole numbers that fit the theorem, such as 3, 4, 5 or 5, 12, 13.
How is this used to check a corner is square?
Measure 3 units along one side and 4 along the other. If the diagonal between those marks is exactly 5, the corner is a right angle. Builders scale it up to 6-8-10 or 9-12-15.
How do I find the distance between two points?
Treat the horizontal and vertical gaps as the legs. Between (1, 2) and (4, 6) the gaps are 3 and 4, so the distance is 5. The slope calculator does this too.
Can I test whether a triangle is right-angled?
Yes. If the square of the longest side equals the sum of the squares of the other two, it is. Sides 5, 12 and 13 pass: 25 + 144 = 169.