Pythagorean Theorem Calculator
Enter the two legs of a right triangle to find the hypotenuse.
c = square root of a squared + b squared.
Enter the two legs of a right triangle to find the hypotenuse.
c = square root of a squared + b squared.
The hypotenuse is the side opposite the right angle and is always the longest side.
| Leg a | Leg b | Hypotenuse c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 1 | 1 | 1.414 |
| 10 | 24 | 26 |
| Hypotenuse c | Known leg a | Missing leg b |
|---|---|---|
| 5 | 3 | 4 |
| 13 | 5 | 12 |
| 10 | 6 | 8 |
| 2 | 1 | 1.732 |
If c is not larger than the known leg, the triangle is impossible.
Triples where all three sides are integers include 3-4-5, 5-12-13, 8-15-17 and any multiple, e.g. 6-8-10. A common use is checking a corner is square: measure 3 units and 4 units along the sides and the diagonal should read 5 (for 90 cm and 120 cm, 150 cm).
The theorem holds in flat (Euclidean) geometry for right triangles only. For other triangles use the law of cosines.
The form above runs in your browser with the same arithmetic described on this page; nothing you type is sent to a server. Results are rounded for display only, so a long decimal may differ from the last digit of a hand calculation. Empty, zero or non-numeric inputs return a message instead of a result, and division by zero is never evaluated.
Use the tool to check your own working rather than to replace it: write the formula, substitute your numbers, and compare. If the two disagree, look first at units, the order of the inputs and whether a percentage was entered as 5 or as 0.05.
The tables on this page are generated by script from the formulas shown, not typed by hand, and are rebuilt whenever the page is reviewed. The reviewed date above is the date those numbers were last recomputed.
Typical input errors are worth a second look before you rely on a result: a comma used as a decimal separator, a value typed in the wrong unit, or two inputs swapped. If a result looks implausible, test the tool with a case you can do in your head, such as round numbers, and confirm it matches before trying your real figures.
Educational tool. Found an error? Tell us.