Pythagorean Theorem Calculator

Finds the hypotenuse, a missing leg, or whether three sides form a right triangle, and keeps every step exact. Legs of 1.5 and 2.5 give √34/2, not 2.915476; legs of 2.5 and 6 give 6.5, not √42.25. Takes fractions, mixed numbers, and radicals; shows the triangle to scale; and tells you when your three whole numbers are a Pythagorean triple and which one.

Pythagorean theorem

a² + b² = c², worked in exact arithmetic. Decimals and fractions come back as exact answers, not as rounded ones wearing an exact label.

Whole numbers, decimals, fractions like 3/4, mixed numbers like 1 1/2, and radicals like 2√5 or 2sqrt5.

Why exact matters here

A decimal is a fraction1.5 is 3/2 and 0.1 is 1/10. There is nothing approximate about them, so there is no reason for the answer to be approximate either. Legs of 1.5 and 3.6 give a hypotenuse of exactly 3.9, and legs of 0.1 and 0.2 give exactly √5/10.
An unsimplified radical is not an answerWriting √42.25 instead of 6.5, or √0.25 instead of 0.5, is arithmetically true and mathematically unfinished. A radical sign around a perfect square should come off, whether or not the number under it is a whole number.
Rounding is not exactness0.707107 is not the exact value of anything. The exact answer for two legs of 0.5 is √2/2, and it stays that whatever precision you ask for.
Most of these answers are irrationalPick two whole-number legs at random and the hypotenuse is almost always irrational. That is why the radical form is worth keeping: it is the only way to write the answer down without losing something.

Sides may be any number of the form (fraction) × √(whole number). That family is closed under this calculation — squaring such a number gives a fraction, and the square root of a fraction is another number of the same form — so the answer can always be given exactly.

Angles are exact only where the triangle is one of the two that have exact angles: the 45-45-90, and the 30-60-90 whose legs are in the ratio 1 to √3. Everywhere else the angle is irrational in degrees and is given to the precision shown.