πAI Math Solver

Calculators

Pythagorean Theorem Calculator

A pythagorean theorem calculator for right triangles: enter any two sides and get the third — the hypotenuse or a missing leg — with the theorem explained.

Fill both legs to get the hypotenuse; fill the hypotenuse and one leg to get the other leg.

Type or handwrite the full problem — the AI will solve it and explain every step

How to use this pythagorean theorem calculator

Enter two sides, click Calculate. This pythagorean theorem calculator finds the missing side of a right triangle instantly, right on the page.

  • Leg a — one leg of the right triangle, such as 3 in the calculator's default
  • Leg b — the other leg, such as 4
  • Hypotenuse c (optional) — leave this box blank to solve for the hypotenuse; fill it together with one leg, and the calculator solves for the other leg

With the defaults a=3a = 3 and b=4b = 4, the pythagorean theorem calculator returns c=5c = 5. The blank box is the unknown: leave c empty and it solves the hypotenuse; fill c alongside one leg and it solves the remaining leg.

This page is more than a static pythagorean theorem calculator — it is also an AI tutor you can ask questions:

  • Ask in plain words. “The legs of a right triangle are 5 and 12 — how long is the hypotenuse?” The AI reads it and solves it step by step.
  • Take a photo of your homework. No typing: the AI reads the triangle and shows every step.
  • Ask about the ideas, not just the number. “Why does the hypotenuse have to be the longest side?” The AI explains — and you can check every number against the pythagorean theorem calculator on this page, so nothing is guessed.
  • Work backwards, then keep asking. Give the hypotenuse and one leg; ask for the other. Follow-ups are welcome, so ask “why?” as often as you need: the pythagorean theorem calculator page keeps teaching.

What the theorem says

The pythagorean theorem is a rule about right triangles — triangles with one 90° angle:

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

SymbolMeaning
aa, bbthe two legs (the sides that form the right angle)
ccthe hypotenuse (the side opposite the right angle)

In words: the squares of the two legs add up to the square of the hypotenuse. The picture shows the classic 3-4-5 right triangle the pythagorean theorem calculator uses as its default: the legs 3 and 4 meet at the right angle, and the hypotenuse 5 stretches from the top of one leg to the far end of the other.

The theorem quietly insists on two things:

  • It holds only for right triangles. No 90° angle, no a2+b2=c2a^2+b^2=c^2.
  • cc is always the hypotenuse — the longest side, the one opposite the right angle. The pythagorean theorem calculator labels its boxes the same way, so the longest side never lands in a leg box by accident.
leg b = 4leg a = 3c = 590°

a right triangle with legs 3 and 4 meeting at the right angle, and hypotenuse 5 opposite it

Example 1 - find the hypotenuse

A right triangle has legs a=3a = 3 and b=4b = 4. Find the hypotenuse.

  1. Square both legs: 32=93^2 = 9 and 42=164^2 = 16.
  2. Add: 9+16=259 + 16 = 25.
  3. Take the square root: c=25=5c = \sqrt{25} = 5.

The hypotenuse is 5 — the default triangle of the pythagorean theorem calculator on this page, and the most famous Pythagorean triple in whole numbers. Picture why the root is needed: 9 and 16 are the areas of squares built on the legs, and 25 is the area of the square on the hypotenuse. The side itself is the square root of that area.

Sanity check before moving on: the hypotenuse must be the longest side, and 5>4>35 > 4 > 3 holds. If your c ever comes out shorter than a leg, the sides went into the wrong boxes — re-read which side sits opposite the right angle.

Solving for any side

The same equation solves for whichever side is missing — only the algebra moves.

  • Missing the hypotenuse? Add, then root: c=a2+b2c = \sqrt{a^2 + b^2}.
  • Missing a leg? Subtract, then root: a=c2−b2a = \sqrt{c^2 - b^2} and b=c2−a2b = \sqrt{c^2 - a^2}.

Worked: a right triangle has hypotenuse c=13c = 13 and leg a=5a = 5. Find leg bb.

  1. Square what you know: 132=16913^2 = 169 and 52=255^2 = 25.
  2. Subtract: 169−25=144169 - 25 = 144.
  3. Root: b=144=12b = \sqrt{144} = 12.

So 5-12-13 is another Pythagorean triple, and this subtraction route is exactly what the optional c box drives: fill 13 and 5 in the pythagorean theorem calculator, leave b blank, and the b row returns 12. Whatever side is unknown — name it, isolate its square, take the root. Notice that both leg routes subtract: the hypotenuse's square is the largest of the three, so c2−a2c^2 - a^2 stays positive and the root stays real. That is the arithmetic behind the pythagorean theorem calculator's guard message when c is not the longest side.

Pythagorean triples and the converse

Some whole-number triples satisfy a2+b2=c2a^2+b^2=c^2 exactly. The three worth memorizing:

  • 3-4-5 — 9+16=259 + 16 = 25
  • 5-12-13 — 25+144=16925 + 144 = 169
  • 8-15-17 — 64+225=28964 + 225 = 289

Multiples of a triple are triples too: double 3-4-5 for 6-8-10, because 36+64=10036 + 64 = 100; triple it for 9-12-15. The pythagorean theorem calculator confirms any of them in one click.

The converse runs the theorem backwards: if the squares of the two shorter sides add up to the square of the longest side, the triangle is a right triangle. Builders square corners with it — measure 3 ft along one edge, 4 ft along the other, and adjust until the diagonal reads exactly 5 ft. The corner is then a true 90°, guaranteed by the same equation the pythagorean theorem calculator checks.

Common pythagorean theorem calculator mistakes

  1. Using it on a triangle with no right angle. No 90° angle, no theorem — an acute or obtuse triangle needs the law of cosines instead.
  2. Putting the hypotenuse in a leg box. cc must be the longest side. Enter it as a leg and the subtraction under the root goes negative — the pythagorean theorem calculator answers that c must be the longest side.
  3. Forgetting the square root. After 9+16=259 + 16 = 25, the answer is 25=5\sqrt{25} = 5, not 25. Reporting the square as the side is the classic slip on any pythagorean theorem calculator check.

The cure for all three is the same: mark the right angle first, label the two sides that form it aa and bb, label the side opposite it cc, then type the numbers.

Problem 1

A right triangle has legs 6 and 8. How long is the hypotenuse? Check your answer with the pythagorean theorem calculator above.

⏱ 00:00
Page 1
Problem 2

A right triangle has hypotenuse 25 and one leg 7. Find the other leg. Check your answer with the pythagorean theorem calculator above.

⏱ 00:00
Page 1

Frequently asked questions

1

What is the Pythagorean theorem?

The rule for right triangles: the squares of the two legs add up to the square of the hypotenuse, a² + b² = c². With legs 3 and 4, the hypotenuse is 5 because 9 + 16 = 25. The pythagorean theorem calculator above applies it to any right triangle.

2

When can I use the Pythagorean theorem?

Only when the triangle has a right angle (90°) — that is the one condition. If no right angle is marked or given, the pythagorean theorem calculator does not apply; reach for the law of cosines instead.

3

How do I find a missing leg?

Square the hypotenuse, subtract the square of the known leg, take the root: b = √(c² − a²). For c = 13 and a = 5, b = √144 = 12. Fill the c box and one leg box in the pythagorean theorem calculator and it does the subtraction for you.

4

Does the Pythagorean theorem work for any triangle?

No — right triangles only. The 90° angle is what makes a² + b² = c² true. On other triangles the two shorter squares never add up exactly to the longest one, which is why the pythagorean theorem calculator asks for the sides of a right triangle.

5

What is a Pythagorean triple?

Three whole numbers that fit a² + b² = c² exactly: 3-4-5, 5-12-13, 8-15-17, and every multiple, like 6-8-10. The pythagorean theorem calculator returns whole-number answers on exactly these triangles.

6

How can I check if a triangle is right-angled?

Use the converse: square the two shorter sides and add. If the total equals the square of the longest side, the triangle is right-angled. For 7, 24, 25: 49 + 576 = 625, a right triangle — and the pythagorean theorem calculator confirms it with √625 = 25.

Related practice