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. It lets you find any side from the other two, which is why it turns up in geometry homework, carpentry, navigation and screen-size calculations. This calculator solves for the hypotenuse or a leg and shows the substituted equation, the exact radical answer and its decimal value.
How it works
Choose which side to find: the hypotenuse c, the longest side opposite the right angle, or one of the legs a and b. Then enter the two sides you know, in the same unit.
For the hypotenuse the calculator adds the squares of the legs, . For a leg it subtracts, for example . It then takes the square root and, when the result is not a whole number, simplifies the radical by taking out square factors, so becomes . The decimal value, both acute angles, the area and the perimeter are shown as well.
Example
Legs of 4 and 6 give . Since , the hypotenuse is .
To find a leg, a ladder 10 m long with its foot 4 m from the wall reaches a height of m.
Assumptions and limits
The theorem holds only for right triangles. Both sides must be positive and in the same unit, and the hypotenuse must be longer than each leg. The exact radical form is given when the squared result has a manageable size (up to about after clearing fractions); otherwise only the decimal is shown. For angles from a side and an angle, use a trigonometry tool.
Frequently asked questions
How do you find the hypotenuse?
Square both legs, add them and take the square root: . Legs of 3 and 4 give .
How do you find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse, then take the square root: . With and , .
What is a Pythagorean triple?
Three whole numbers that fit the theorem exactly, such as 3, 4, 5; 5, 12, 13; 8, 15, 17 and 7, 24, 25. Any multiple of a triple, such as 6, 8, 10, is also a triple.
What does the simplified radical form mean?
It writes a square root with the largest possible whole number outside the root. Because , . Teachers often ask for this exact form instead of a rounded decimal.
Does the Pythagorean theorem work for other triangles?
No. For a triangle without a right angle use the law of cosines, , which reduces to the Pythagorean theorem when C is 90 degrees.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
solve_for | what to calculate: hypotenuse, leg_a, leg_b; give the other 2 values | default hypotenuse |
leg_aLeg a | fraction or decimal: 3/4, 1 1/2 or 0.75 | give 2 of leg_a, leg_b, hypotenuse |
leg_bLeg b | fraction or decimal: 3/4, 1 1/2 or 0.75 | give 2 of leg_a, leg_b, hypotenuse |
hypotenuseHypotenuse c | fraction or decimal: 3/4, 1 1/2 or 0.75 | give 2 of leg_a, leg_b, hypotenuse |
Examples
?leg_a=5&leg_b=12?leg_a=8&hypotenuse=17?solve_for=leg_a&leg_b=1.5&hypotenuse=2.5
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="pythagorean_theorem_calculator"]