Pythagorean Theorem Calculator
Enter any two sides of a right triangle to solve for the third, plus the area, perimeter, and both acute angles.
Solve for
The two legs meet at the right angle. Enter positive numbers; decimals are fine.
Results
Everything is calculated in your browser. Nothing is uploaded.
How to use the Pythagorean theorem to find a side
Pick what to solve for
Choose the hypotenuse when you know both legs, or a leg when you know one leg and the hypotenuse.
Enter the two known sides
Type the two lengths you have using any positive numbers, including decimals.
Read the missing side
The third side, area, perimeter, and both acute angles appear as you type, with no button to press.
Copy the solution
Click the copy button to put the full worked answer on your clipboard.
Why use this tool
Hypotenuse from two legs
Enter both legs and get the hypotenuse from a squared plus b squared equals c squared, so legs of 3 and 4 return 5.
Missing leg from a leg and the hypotenuse
Switch modes to find the other leg by subtracting under the square root, so a leg of 3 and a hypotenuse of 5 return 4.
Area, perimeter, and both angles
Every solution also returns the area, the perimeter, and the two acute angles in degrees, which always add up to 90.
Shows the working
The result card spells out the exact equation used, so you can see how the missing side was found and check it by hand.
Guards the impossible cases
A leg that is equal to or longer than the hypotenuse, along with zero, negatives, and blanks, is caught with a clear message.
Runs entirely in your browser
Every calculation happens on your device. Nothing you type is uploaded.
About this tool
The Pythagorean theorem says that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs, written a squared plus b squared equals c squared. The hypotenuse is the longest side, sitting opposite the 90 degree corner, and the two legs meet at that corner. Give this calculator any two of the three sides and it returns the third: enter both legs to find the hypotenuse as the square root of the sum of their squares, or enter one leg and the hypotenuse to find the other leg as the square root of the difference. The classic 3, 4, 5 triangle works either way.
Along with the missing side you get the area, which is half of leg a times leg b, the perimeter, which is all three sides added together, and both acute angles in degrees. The two acute angles always add up to 90, so together with the fixed right angle the triangle totals 180. Every value updates the moment you type, there is no button to press, and nothing you enter leaves your device.
Sides must be positive numbers, and when solving for a leg the hypotenuse has to be longer than the leg you already know, since no right triangle can have a leg as long as its hypotenuse. Zero, blanks, negatives, and impossible combinations are caught with a short message instead of a broken result. For the area from a base and height, or angles from base and height, try the triangle calculator, and to work a bare square root on its own see the square root calculator.
Frequently asked questions
- How do I find the hypotenuse with the Pythagorean theorem?
- Choose the hypotenuse mode and enter both legs. The calculator squares each leg, adds them, and takes the square root, so legs of 3 and 4 give a hypotenuse of 5. It also returns the area, perimeter, and both acute angles.
- How do I find a missing leg?
- Choose the leg mode and enter one leg together with the hypotenuse. The other leg is the square root of the hypotenuse squared minus the known leg squared, so a leg of 3 and a hypotenuse of 5 give 4.
- What numbers can I enter?
- Any positive numbers, including decimals. When solving for a leg the hypotenuse must be longer than the known leg. Zero, blank fields, negatives, and impossible sides are rejected with a short message rather than a wrong answer.
- Does this only work for right triangles?
- Yes. The Pythagorean theorem holds only for triangles with a 90 degree angle. For the area from a base and height, which works for any triangle, use the triangle calculator.
- Is my data uploaded anywhere?
- No. Everything runs in your browser; nothing is sent to a server.
Related tools
Triangle Calculator
Enter two legs of a right triangle for the hypotenuse, area, perimeter, and angles, or a base and height for the area.
Square Root Calculator
Enter a number to get its square root, cube root, an optional nth root, and its square, plus whether it is a perfect square.
Scientific Calculator
Type a full expression with trigonometry, logarithms, powers, roots, and factorials, and see the result update live as you go.
401(k) Calculator
Project your 401(k) balance at retirement from your contributions, employer match, and expected return, year by year.
Amortization Schedule Calculator
Build a full payment-by-payment schedule for any fixed-rate loan, with the payoff date and the interest you save by paying extra.
APY Calculator
Turn a nominal rate and compounding frequency into the true annual percentage yield, project a balance, or reverse solve the rate.