Pythagorean Theorem Calculator

Enter any two sides of a right triangle — the third side, the area, the perimeter and both angles are worked out instantly.

For a right triangle, a² + b² = c²: pre-filled below, legs of 3 and 4 give a hypotenuse of exactly 5 — change any two sides and watch it solve. When the answer is not whole, the calculator shows the exact √ form too.
a b c

Fill in any two sides — or all three, to check whether a triangle is right-angled. Any unit works (cm, inches, metres) as long as all sides use the same one.

The Pythagoras Equation, Rearranged Three Ways

One equation, three questions. The theorem is a single relationship — a² + b² = c² — and each side has its own rearranged form, which is all a Pythagoras equation solver ever computes:

  • Finding the hypotenuse: c = √(a² + b²) — the two legs are squared, added, and square-rooted.
  • Finding leg a: a = √(c² − b²) — the known leg's square is subtracted from the hypotenuse's square first.
  • Finding leg b: b = √(c² − a²) — the same subtraction with the legs swapped.

The subtraction forms are why the hypotenuse has to be the longest side: c² − b² must be positive for a real leg to exist. They are also why the calculator can show exact answers — when the number under the root is not a perfect square, the exact answer is the root itself, like √65, with the decimal as an approximation.

Worked Examples (Computed by This Page's Own Method)

Leg aLeg bHypotenuse cAreaPerimeter
345612
512133030
68102424
129155436
815176040
111.41420.53.4142

The bold value in each row is the solved side. The first row is the classic 3-4-5 triangle: 3² + 4² = 9 + 16 = 25 = 5², its area is (3 × 4) ÷ 2 = 6, and its two smaller angles are 36.87° (opposite leg a) and 53.13° (opposite leg b) — the calculator reports angles for every triangle, not just this one. The fourth row runs the theorem backwards: with the hypotenuse 15 and leg b = 9, leg a = √(225 − 81) = √144 = 12. The last row shows the exact-answer rule: legs of 1 and 1 give c = √2 ≈ 1.4142, not a rounded-off guess.

Where the Theorem Earns Its Keep

The everyday use is any diagonal across a rectangle: the screen size of a TV or monitor (a "55-inch" TV is 55 inches corner to corner), the ladder length needed to reach a height from a safe distance out, the straight-line distance across a rectangular plot, and the carpenter's 3-4-5 check for a true right angle. In each case the two legs are the easy measurements and the hypotenuse is the one you cannot stretch a tape along — which is exactly the direction the equation solves.

Pythagorean Theorem — Facts at a Glance

  • a² + b² = c² holds only for right triangles, and the converse holds too: if the equation balances, the triangle is right-angled.
  • The hypotenuse is always the longest side and always sits opposite the 90° angle.
  • The legs double as base and height, so the area is (a × b) ÷ 2 with no extra information needed.
  • The two smaller angles are arctan ratios of the legs — for 3-4-5 they are 36.87° and 53.13° — and always add to exactly 90°.
  • Whole-number solutions (triples) include 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29; every multiple of a triple is another triple.

Frequently Asked Questions

What is the Pythagorean theorem formula?

a² + b² = c², where a and b are the two legs of a right triangle — the sides that meet at the right angle — and c is the hypotenuse, the side opposite the right angle and always the longest of the three. The formula says the square built on the hypotenuse has exactly the area of the two squares on the legs combined, and it works in both directions: if a² + b² = c² holds for a triangle's sides, the triangle is right-angled.

How do I find the hypotenuse of a right triangle?

Square both legs, add the squares, and take the square root: c = √(a² + b²). For legs of 3 and 4 that is c = √(9 + 16) = √25 = 5. The calculator above does exactly this when you fill in a and b and leave c empty — and when the answer is not a whole number it shows the exact form as well, for example c = √65 ≈ 8.0623 for legs of 4 and 7.

How do I find a missing leg when I know the hypotenuse?

Rearrange the formula: a = √(c² − b²). Subtract the known leg's square from the hypotenuse's square, then take the square root — with c = 13 and b = 12, a = √(169 − 144) = √25 = 5. The hypotenuse must be the longer of the two numbers you enter; if it is not, the subtraction would go negative, which is the calculator's signal that the two values cannot belong to the same right triangle.

Does the Pythagorean theorem work for every triangle?

No — only right triangles. For a triangle without a 90° angle the relationship becomes the law of cosines, c² = a² + b² − 2ab·cos(C), which reduces to Pythagoras exactly when the angle C is 90° and the cosine term vanishes. The theorem also runs in reverse as a test: enter all three sides above and the calculator checks whether a² + b² = c² holds — if it does, the triangle is right-angled; if it does not, it is not.

What is a Pythagorean triple?

A set of three whole numbers that satisfies a² + b² = c² — a right triangle whose sides are all integers. The classic examples are 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29, and any multiple of a triple is another one (6-8-10 is 3-4-5 doubled). Triples are why so many textbook and carpentry problems come out in whole numbers: the 3-4-5 ratio is still used on building sites to check that a corner is square.