Pythagorean Theorem Calculator
Find the missing side of a right triangle from any two sides using the Pythagorean theorem — runs 100% in your browser with no upload.
🔒 Calculated in your browser — nothing is uploaded.
What this Pythagorean theorem calculator does
Enter any two sides of a right triangle and this tool instantly computes the third. The two shorter sides that meet at the right angle are the legs a and b, and the longest side opposite the right angle is the hypotenuse c. Leave the side you want to find blank, type the other two, and the answer updates live as you type. It works whether you are missing a leg or the hypotenuse.
How the calculation works
The tool applies the Pythagorean theorem a² + b² = c². To find the hypotenuse it computes c = √(a² + b²). To find a missing leg it rearranges the formula to a = √(c² − b²). Because the hypotenuse is always the longest side of a right triangle, the calculator requires c to be larger than either leg; if you enter a hypotenuse that is shorter than a given leg, no real triangle exists and the tool tells you so instead of returning a wrong answer.
Frequently asked questions
Which side is the hypotenuse?
The hypotenuse c is the side opposite the right angle and is always the longest side of a right triangle. Sides a and b are the two legs that form the right angle.
Does it give the angles too?
Yes. Along with the missing side, the result shows the two acute angles in degrees — angle A (opposite leg a) and angle B (opposite leg b), which always add up to 90°. For a 3-4-5 triangle they are about 36.87° and 53.13°.
Is anything I type uploaded to a server?
No. Every calculation runs locally in your browser with JavaScript. The side lengths you enter are never sent, stored, or logged anywhere.
Why do I sometimes get 'no right triangle' instead of an answer?
That appears when the numbers cannot form a real right triangle — for example if the hypotenuse c you entered is shorter than or equal to a leg, or if a length is zero or negative. Use positive lengths and keep c as the longest side.