Pythagorean Theorem

Find the length of any side of a right triangle given the other two sides, or check whether a triangle is a right triangle.

a2+b2=c2a^2 + b^2 = c^2

Solve a problem with Pythagorean Theorem

Type the problem. The solver will use Pythagorean Theorem where Pythagorean Theorem is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Pythagorean Theorem takes
aa
bb
cc
Pythagorean Theorem
SymbolMeaning
aaThe length of one leg (a side that forms the right angle) of a right triangle, measured in the same units as the other sides.
bbThe length of the other leg (a side that forms the right angle) of a right triangle, measured in the same units as sides aa and cc.
ccThe length of the hypotenuse (the side opposite the right angle, always the longest side) of a right triangle, measured in the same units as the other sides.

When to use it

Use this when you have a right triangle and know two side lengths, or when you need to verify that a triangle is a right triangle.

Level

Usually taught in: Geometry · Appears on: SAT, ACT

Worked examples

1. Find the hypotenuse of a right triangle with legs 3 and 4

Problem

A right triangle has legs of length 3 and 4. Find the length of the hypotenuse.
  1. a2+b2=c2a^2 + b^2 = c^2

    Write the Pythagorean Theorem with a=3a = 3 and b=4b = 4.

  2. 32+42=c23^2 + 4^2 = c^2

    Substitute the known values for the two legs.

  3. 9+16=c29 + 16 = c^2

    Calculate the squares: 32=93^2 = 9 and 42=164^2 = 16.

  4. 25=c225 = c^2

    Add: 9+16=259 + 16 = 25.

  5. c=5c = 5

    Take the square root of both sides; 25=5\sqrt{25} = 5.

Answer: c=5c = 5

This is the famous 3-4-5 Pythagorean triple. We substituted the leg lengths into the formula and solved for the hypotenuse by taking the square root. The hypotenuse is always the longest side of a right triangle.

2. Find a missing leg when you know the hypotenuse and one leg

Problem

A right triangle has a hypotenuse of 13 and one leg of length 5. Find the length of the other leg.
  1. a2+b2=c2a^2 + b^2 = c^2

    Start with the Pythagorean Theorem, where a=5a = 5, c=13c = 13, and bb is unknown.

  2. 52+b2=1325^2 + b^2 = 13^2

    Substitute the known leg and hypotenuse.

  3. 25+b2=16925 + b^2 = 169

    Calculate: 52=255^2 = 25 and 132=16913^2 = 169.

  4. b2=144b^2 = 144

    Subtract 25 from both sides: 16925=144169 - 25 = 144.

  5. b=12b = 12

    Take the square root: 144=12\sqrt{144} = 12.

Answer: b=12b = 12

This demonstrates the 5-12-13 Pythagorean triple. When finding a missing leg, rearrange the formula to isolate the unknown, then solve. We subtract the known leg squared from the hypotenuse squared, then take the square root.

3. Real-world problem: find the diagonal of a display at a bake sale

Problem

At the school bake sale, Sarah arranges cookies in a right triangle display with one leg measuring 8 feet and the other leg measuring 6 feet. She wants to place a ribbon along the hypotenuse (the longest edge). How long should the ribbon be?
  1. a2+b2=c2a^2 + b^2 = c^2

    Use the Pythagorean Theorem with the two legs: a=8a = 8 feet and b=6b = 6 feet.

  2. 82+62=c28^2 + 6^2 = c^2

    Substitute the leg measurements into the formula.

  3. 64+36=c264 + 36 = c^2

    Calculate: 82=648^2 = 64 and 62=366^2 = 36.

  4. 100=c2100 = c^2

    Add: 64+36=10064 + 36 = 100.

  5. c=10c = 10

    Take the square root of both sides: 100=10\sqrt{100} = 10 feet.

Answer: c=10 feetc = 10 \text{ feet}

In real situations, we use the Pythagorean Theorem to find distances that are hard to measure directly. The ribbon should be 10 feet long. This forms the 6-8-10 triple, which is twice the 3-4-5 triple.

Common mistakes

Where Pythagorean Theorem usually goes wrong
Answer came out wrong
A student gets c2=34c^2 = 34 and writes c=34c = 34 instead of c=34c = \sqrt{34}.
Always take the square root of both sides when cc is still squared. If c2=34c^2 = 34, then c=345.83c = \sqrt{34} \approx 5.83.
A student writes 32+52=723^2 + 5^2 = 7^2 and treats a triangle with sides 3, 5, and 7 as a right triangle.
Check first: does 32+52=9+25=343^2 + 5^2 = 9 + 25 = 34 equal 72=497^2 = 49? No, so the triangle is not a right triangle, or the given sides are incorrect.
A student uses the Pythagorean Theorem on every triangle, even when it is not a right triangle.
First verify that the triangle has a right angle (90°), or test the given sides with the formula. If a2+b2c2a^2 + b^2 \ne c^2 (where cc is the longest side), the triangle is not a right triangle and the theorem does not apply.
The mistakeWhy it is wrongThe fix
A student gets c2=34c^2 = 34 and writes c=34c = 34 instead of c=34c = \sqrt{34}.They forget the crucial step of taking the square root to solve for cc; they leave the answer as c2c^2 instead.Always take the square root of both sides when cc is still squared. If c2=34c^2 = 34, then c=345.83c = \sqrt{34} \approx 5.83.
A student writes 32+52=723^2 + 5^2 = 7^2 and treats a triangle with sides 3, 5, and 7 as a right triangle.The sides do not satisfy the Pythagorean Theorem, so this is not a right triangle, but the student assumes it is without checking.Check first: does 32+52=9+25=343^2 + 5^2 = 9 + 25 = 34 equal 72=497^2 = 49? No, so the triangle is not a right triangle, or the given sides are incorrect.
A student uses the Pythagorean Theorem on every triangle, even when it is not a right triangle.The Pythagorean Theorem applies only to right triangles; using it on other triangles gives wrong results.First verify that the triangle has a right angle (90°), or test the given sides with the formula. If a2+b2c2a^2 + b^2 \ne c^2 (where cc is the longest side), the triangle is not a right triangle and the theorem does not apply.

Tips and when to use something else

  • Always identify which side is the hypotenuse (opposite the right angle); it is the only side that can be cc in the formula.
  • Remember that aa and bb are the two legs (the sides that form the right angle), not any two sides of the triangle.
  • If you need to find the sides of a triangle that does NOT have a right angle, don't use the Pythagorean Theorem—use Heron's Formula or trigonometry instead.
  • You can use this theorem to verify whether a triangle is a right triangle by checking if the sides satisfy a2+b2=c2a^2 + b^2 = c^2.

Frequently asked questions

How do I know which side is the hypotenuse?
The hypotenuse is always the longest side of a right triangle, and it is opposite the right angle (the 90° angle). The right angle is often marked with a small square in the corner. The other two sides, which form the right angle, are the legs.
Do I always have to get a whole number as my answer?
No. Many right triangles have irrational side lengths. For example, a right triangle with legs of 1 and 1 has a hypotenuse of 21.41\sqrt{2} \approx 1.41. It is fine to leave the answer as a square root, or to round to a decimal if the problem asks for it.
Can I use the Pythagorean Theorem to check if a triangle is a right triangle?
Yes. If the sides satisfy a2+b2=c2a^2 + b^2 = c^2 (where cc is the longest side), then the triangle is a right triangle. If the equation is not true, the triangle is not a right triangle.
What if I get a negative number under the square root?
This means no real triangle can have those side lengths. The given sides violate the triangle inequality or don't match the Pythagorean Theorem. Check your arithmetic and make sure you have the correct side lengths for a right triangle.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18