Pythagorean Theorem Calculator
Enter two legs to get the hypotenuse, or the hypotenuse and one leg to get the other leg. All three lengths share the unit you pick.
How it works
In a right triangle the legs a and b and the hypotenuse c satisfy a² + b² = c². Solving for c is √(a²+b²). Solving for a missing leg is √(c²−a²), which is only defined when c is strictly longer than that leg.
This page does not compute angles or area — the right-triangle calculator does.
Formula
a² + b² = c² c = √(a² + b²) b = √(c² − a²)
Worked examples
Find the hypotenuse
legs 3 and 4 → 5
Find a leg
hypotenuse 5, other leg 3 → 4
Useful notes
- Only right triangles. An obtuse 3-4-6 is not a Pythagorean triple.
FAQ
- What is the Pythagorean theorem?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: a² + b² = c².
- Why was my missing-leg calculation rejected?
The hypotenuse must be longer than the known leg. If they are equal, the other leg would be 0, which is not a triangle.
- Does this give the angles too?
No. Use the right-triangle calculator when you also want angles, area and perimeter.
Related tools
Right Triangle
From two legs, or a leg and the hypotenuse, get the third side, both acute angles, area and perimeter.
Triangle Calculator
Find a triangle’s area, perimeter and angles from three sides, or the area from base and height or SAS.
Distance Calculator
Find the straight-line distance between two points in a plane or in 3-D space.
Slope Calculator
Find the slope of a line from two points or from rise and run, plus the angle from the positive x-axis.
Area Calculator
Find the area of a square, rectangle, triangle, circle, trapezoid, parallelogram or ellipse.
See all Geometry tools.