Free browser-based calculators.Back home
%Compound Calculator

Pythagorean Theorem Calculator

Enter the two legs of a right triangle to find the hypotenuse.

ResultHypotenuse: 5

c = square root of a squared + b squared.

Short answer: For a right triangle, c = square root of (a squared + b squared). Legs 3 and 4 give a hypotenuse of 5; a missing leg is the square root of (c squared - a squared).

Finding the hypotenuse

The hypotenuse is the side opposite the right angle and is always the longest side.

Leg aLeg bHypotenuse c
345
51213
81517
111.414
102426

Finding a missing leg

Hypotenuse cKnown leg aMissing leg b
534
13512
1068
211.732

If c is not larger than the known leg, the triangle is impossible.

Whole-number triples

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).

Limits

The theorem holds in flat (Euclidean) geometry for right triangles only. For other triangles use the law of cosines.

How this calculator works

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.

Sources

Related tools

Educational tool. Found an error? Tell us.