Pythagorean theorem calculator
Find the hypotenuse from two legs (3 and 4 give 5) or a missing leg from the hypotenuse and the other leg.
- Runs in your browser
- No upload
- Instant result
Assumptions & formula
Formula and assumptions
c=√(A²+B²); b=√(B²−A²)
Results
Enter values and press Calculate to see the result here.
How to use this calculator
- Set inputs and units
Choose hypotenuse or missing-leg mode. In leg mode, a is the known leg and b is the hypotenuse.
- Calculate
Check this worked example: a=3,b=4 → hypotenuse5; leg mode a=3,b=5 → missing leg4
- Results
Check that the squared lengths satisfy a²+b²=c². The result uses the same length unit as the inputs.
Questions and limits
Can any triangle use this rule?
Only a right triangle can. An oblique triangle needs the sine or cosine rule, which uses angles, or the triangle calculator.
Which input errors should I correct?
Both lengths you enter must be positive. When you solve for a leg, the hypotenuse must be longer than the known leg.
What does this calculation leave out?
No angle measurement, and no automatic check that your physical corner is square.