Pythagorean theorem calculator: find a, b or c

Enter two sides of a right triangle to find the third, with steps, exact radicals and a labelled diagram. Runs on your device.

How it works

  1. Type two sides and leave the third box empty
  2. Read the missing side with the steps shown
  3. Check the exact radical form, area, angles and the diagram

How the Pythagorean theorem finds the missing side

The Pythagorean theorem says that in a right triangle the squares of the two legs add up to the square of the hypotenuse, a² + b² = c², so any two sides give the third. The page opens with a = 3 and b = 4 and leaves c empty, so c is the side it solves: c² = 3² + 4² = 9 + 16 = 25, and c = √25 = 5. Leave exactly one box empty and that is the side the page finds. The legs a and b are the two sides that meet at the right angle, and the hypotenuse c is the long side across from it. The working box repeats each line with your own numbers.

Finding a leg when you know the hypotenuse

To find a leg, subtract: a² = c² − b². With c = 13 and b = 12, a² = 169 − 144 = 25 and a = 5. The hypotenuse is always the longest side, so if c is not longer than the leg you typed, the page shows a message under the c box and no result, because no right triangle has those sides. Sides must be more than 0 and at most 1,000,000,000. Decimals work, for example legs of 1.5 and 2 give a hypotenuse of 2.5. Use the same unit for every side; the answer comes out in that unit.

Exact radical form

When the sides are whole numbers and the answer is not, the page also shows the exact value. With a = 5 and b = 5, c² = 50, and 50 = 25 × 2 contains the square 25, so c = √50 = 5√2, which is about 7.0711. The page takes the largest square factor out of the number under the root. Exact forms are shown for whole-number sides only, up to the size a computer stores without rounding. Decimal places are your choice from 0 to 10, and decimals are rounded only when shown.

Checking a triangle, and what else you get

Fill in all three boxes and the page checks instead of solving: 5, 12 and 13 pass because 25 + 144 = 169, while 5, 6 and 7 do not because 25 + 36 = 61 and not 49. Whole-number sets that pass, such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25, are called Pythagorean triples, and the page says when you have one. For a solved triangle you also get the area, a × b ÷ 2, the perimeter, and the two acute angles from A = tan⁻¹(a ÷ b). The page works for right triangles only; for any other triangle use the triangle calculator, which uses the laws of sines and cosines.

Frequently asked questions

How do I find the hypotenuse of a right triangle?

Square both legs, add them and take the square root: c = √(a² + b²). For legs of 6 and 8, c² = 36 + 64 = 100, so the hypotenuse is 10. Type a and b and leave c empty.

How do I find a missing leg?

Subtract the squares: a = √(c² − b²). With a hypotenuse of 17 and a leg of 15, a² = 289 − 225 = 64, so the other leg is 8. Type b and c and leave a empty. The hypotenuse must be the longer number.

What is √50 in simplest radical form?

5√2. The number 50 is 25 × 2, and 25 is the square of 5, so √50 = 5√2, about 7.0711. Enter two legs of 5 and 5 and the page shows this exact form beside the decimal.

How do I check whether three sides make a right triangle?

Fill in all three boxes. The page tests a² + b² = c² with c as the hypotenuse. For 7, 24 and 25 it finds 49 + 576 = 625 and says yes. For 5, 6 and 7 it finds 61 against 49 and says no.

Why does the calculator say the hypotenuse must be longer?

The hypotenuse is the longest side of a right triangle, because c² = a² + b² is bigger than either square alone. If you type c = 4 and b = 5, no triangle exists, so the page asks for a longer c instead of showing a result.

Are my numbers stored or sent anywhere?

No. The numbers are processed in your browser and are not uploaded. They are not stored on your device either, and reloading the page puts the 3 and 4 example back.