MaximCalculator Free, fun & accurate calculators
📐 Platinum math layout
🌙Dark Mode

Pythagorean Theorem Calculator

Enter any two sides of a right triangle to instantly solve the missing side using a² + b² = c². Includes a step-by-step breakdown and a “right triangle check” mode. Perfect for school, DIY, sports fields, screens, and distance shortcuts.

Instantly solve for a, b, or c
🧾Step-by-step math shown
Right-triangle checker (3 sides)
📱Clean results for screenshots & sharing

Enter the triangle sides

Leave exactly one field blank to solve for it. Use consistent units (cm, m, in, ft). The hypotenuse c is the longest side (opposite the 90° angle).

a
b
c
📏
Your result will appear here
Enter any two sides and tap “Calculate” to solve the third.
Tip: If you enter all three sides, we’ll check whether it’s a right triangle.
Quick sanity: in a right triangle, c must be the longest side.
ShortMediumLongest (c)

Educational tool only. Always verify measurements for real-world cutting/building.

🧠 Formula breakdown

How the Pythagorean Theorem works

For a right triangle, the legs a and b form the 90° angle, and the hypotenuse c is the side across from it (and it’s always the longest side). The relationship is:

  • a² + b² = c²
  • If solving for c: c = √(a² + b²)
  • If solving for a leg: a = √(c² − b²) or b = √(c² − a²)
Fast examples
  • 3–4–5: 3² + 4² = 9 + 16 = 25 = 5²
  • 5–12–13: 5² + 12² = 25 + 144 = 169 = 13²
  • 8–15–17: 8² + 15² = 64 + 225 = 289 = 17²
❓ FAQ

Frequently Asked Questions

  • Which side is the hypotenuse?

    The hypotenuse is the longest side and sits opposite the 90° angle. In the formula, it’s c.

  • Can I use this on any triangle?

    No — the Pythagorean Theorem only applies to right triangles. For other triangles, use trigonometry or a triangle solver.

  • Why do I get an error when solving for a leg?

    If c ≤ known leg, then c² − leg² is zero or negative, which can’t form a real right triangle.

  • Do I need a unit?

    No. Units are optional for display. Just keep all sides in the same unit.

📝 Full explanation

The Pythagorean Theorem (explained in plain English)

The Pythagorean Theorem is the fastest way to find a missing side of a right triangle (a triangle with one 90° angle). If you know any two sides, you can compute the third — as long as you correctly identify which side is the hypotenuse (the longest side, opposite the 90° angle) and which sides are the legs (the two shorter sides that form the right angle).

The theorem says: a² + b² = c² where a and b are the legs and c is the hypotenuse. It works because the areas of squares built on the legs add up exactly to the area of the square built on the hypotenuse. That’s the “why” behind the formula — it’s an area relationship, not a random trick.

What this calculator does

This page lets you solve the Pythagorean Theorem in the most useful real-world way: you can leave exactly one side blank and we’ll solve for it. It supports three common scenarios:

  • Find the hypotenuse: You know both legs (a and b) and want c.
  • Find a leg: You know the hypotenuse (c) and the other leg, and want the missing leg.
  • Check if a triangle is right: Enter all three sides and we’ll tell you whether a²+b² ≈ c².

For best accuracy, use consistent units (all centimeters, all meters, all inches, etc.). The calculator doesn’t care which unit you choose; the formula works the same. If you enter mixed units, the math will still run — but the answer won’t make physical sense.

Formula breakdown (with steps)

1) Solving for the hypotenuse (c)

If you know the legs a and b, then:

  • Square each leg: a² and b²
  • Add them: a² + b²
  • Take the square root: c = √(a² + b²)

Example: a = 3, b = 4

  • a² = 3² = 9
  • b² = 4² = 16
  • a² + b² = 9 + 16 = 25
  • c = √25 = 5

That’s the famous 3–4–5 triangle. It shows up everywhere: carpentry, sports fields, and even quick sanity checks in geometry problems.

2) Solving for a missing leg (a or b)

If you know the hypotenuse c and one leg, you rearrange the theorem:

  • a² = c² − b² (or b² = c² − a²)
  • a = √(c² − b²)

This only works if the hypotenuse is truly the largest side. If c is not larger than the known leg, then c² − b² becomes zero or negative, and a real triangle with those lengths cannot exist.

Example: c = 13, b = 5

  • c² = 13² = 169
  • b² = 5² = 25
  • c² − b² = 169 − 25 = 144
  • a = √144 = 12

This is another classic: 5–12–13.

How the calculator decides what to compute

You can type values for a, b, and c. The calculator uses a simple rule:

  • If exactly one field is blank, it solves for the blank one.
  • If none are blank, it treats it as a “right-triangle check” (and also identifies the largest side as c).
  • If two or more are blank, it asks you to enter at least two sides.

When checking a triangle, we first sort the three sides and treat the largest as the hypotenuse candidate. Then we compare a² + b² to c². Because decimals can introduce tiny rounding differences, we use a small tolerance — meaning we consider the triangle right if the values are “close enough.”

Real-world uses (why this goes viral)

People remember the Pythagorean Theorem because it’s instantly useful:

  • DIY & construction: checking whether corners are square (the 3–4–5 method).
  • Distance & navigation: straight-line distance on a grid (same idea as the distance formula).
  • Sports: diagonal distances on fields/courts, “how far is the corner kick,” etc.
  • Design & screens: diagonal screen size from width and height.
  • Travel/packing: will this couch fit in the elevator? (diagonal clearance).

If you want a fun “shareable” challenge: pick a room in your house, measure the width and length, compute the diagonal with this tool, then check it with a tape measure. It’s surprisingly satisfying when it matches.

Common mistakes (and how to avoid them)

  • Mixing up c: c must be the longest side, opposite the 90° angle.
  • Using it on non-right triangles: the theorem only applies to right triangles.
  • Rounding too early: keep more decimals during the steps, round at the end.
  • Unit mismatch: don’t combine inches and centimeters in the same triangle.

FAQs

  • Does the Pythagorean Theorem work for any triangle?

    No. It only works for right triangles. For non-right triangles, use laws of sines/cosines instead.

  • What if my triangle sides are decimals?

    That’s fine. The formula still works. Small rounding differences are normal, especially when checking if a triangle is right.

  • What are Pythagorean triples?

    They’re sets of whole numbers that satisfy a² + b² = c², like 3–4–5, 5–12–13, and 8–15–17.

  • How do builders “square” a corner with 3–4–5?

    Measure 3 units along one side and 4 along the other; the diagonal between those points should be 5 if the corner is 90°.

  • Is this the same as the distance formula?

    Yes — the 2D distance formula √((x₂−x₁)² + (y₂−y₁)²) comes directly from the Pythagorean Theorem.

  • What if c² − a² is negative?

    Then the numbers can’t form a real right triangle with that hypotenuse. Double-check which side is c (largest).

Mini examples you can try right now

  • Find c: a = 6, b = 8 → c = 10
  • Find a: c = 25, b = 7 → a = 24
  • Check right triangle: 9, 12, 15 → right triangle (scaled 3–4–5)

If you’re sharing this tool, include the triangle you used (like “I got 10!”) — it invites friends to try their own measurements and compare results.

Why the theorem is true (quick intuition)

One way to “feel” the theorem is to imagine building a square on each side of the triangle. The legs create two smaller squares, and the hypotenuse creates a larger square. The surprising fact is that for a right triangle, the area of the large square is exactly the sum of the two smaller ones. If you’ve ever seen a puzzle where you rearrange triangles to make a square and it magically preserves area, that’s the Pythagorean Theorem in disguise.

A more practical intuition: a right triangle is basically a “diagonal shortcut.” If you walk a units east and b units north, the straight-line shortcut from start to finish is c. The theorem tells you the shortcut length without having to measure it. That’s why it shows up in maps, video games, architecture, and physics.

Scaling trick (the fastest mental math version)

The most viral part of the Pythagorean Theorem is that a few triangles repeat everywhere. If you memorize one triple, you automatically know dozens, because you can scale them. For example, 3–4–5 becomes:

  • 6–8–10 (multiply by 2)
  • 9–12–15 (multiply by 3)
  • 12–16–20 (multiply by 4)

That’s why contractors love it: it’s fast, it’s reliable, and it doesn’t require a calculator in the moment. You can still use this calculator to confirm your scaling or to handle messy real measurements like 117.3 cm and 84.9 cm.

Diagonal of a rectangle (same math, different story)

If you’ve ever wondered “what’s the diagonal of a TV/monitor” or “will this box fit through that doorway,” you’re using the Pythagorean Theorem. A rectangle’s diagonal forms a right triangle with the width and height:

Diagonal = √(width² + height²)

So if a door is 80 inches tall and 36 inches wide, the diagonal opening is √(80² + 36²) ≈ 87.7 inches. That’s the maximum straight-line clearance (ignoring thickness). This is also exactly how screen diagonals relate to aspect ratios.

3D bonus: space diagonal of a box

Want an extra flex? In 3D, the diagonal across a rectangular box (length L, width W, height H) is:

Space diagonal = √(L² + W² + H²)

It’s just the Pythagorean Theorem applied twice: first find the floor diagonal, then use that and the height. If you’re moving furniture, this explains why something fits flat but not when you tilt it (or vice versa).

Accuracy, rounding, and “close enough” checks

In real life, measurements are noisy: tape measures bend, walls aren’t perfectly straight, and you might round to the nearest 1/8 inch. When you check if a triangle is right, don’t expect a² + b² to match c² perfectly. A tiny mismatch is normal. That’s why the calculator uses a tolerance — it treats the triangle as right when the difference is very small relative to the size of the numbers.

If you need precision work (metal, cabinetry, CNC), keep more decimals and do fewer intermediate rounds. If you’re doing home DIY, rounding to 2–3 decimals is usually plenty.

More FAQs

  • Who was Pythagoras?

    Pythagoras was an ancient Greek philosopher. The theorem is named after him, but versions of the relationship were known in earlier civilizations too. Today, the name “Pythagorean Theorem” is just the standard label for this right-triangle rule.

  • Can I use this for coordinates (x, y points)?

    Yes. The distance between two points is a right-triangle problem: horizontal change and vertical change are the legs, and the direct distance is the hypotenuse. That’s the distance formula, which is Pythagorean Theorem with coordinate differences.

  • What if I only know angles?

    Then you need trigonometry (sine/cosine/tangent) or a triangle solver. The Pythagorean Theorem requires at least two side lengths.

  • Why does the calculator ask for “one blank field”?

    Because the theorem has three variables (a, b, c). If you know any two, you can solve the third. If you know fewer than two, there are infinitely many triangles that could match.

  • What if I enter a, b, c but c isn’t the biggest?

    For the “check” mode, the calculator automatically treats the largest side as the hypotenuse candidate. If you’re solving for a leg, make sure the value you put in c is actually the longest side.

🔥 Shareable challenge

Try the “3–4–5” squareness test

Want a quick, satisfying real-world experiment? Mark a corner. Measure 3 units on one wall and 4 units on the other. The distance between those marks should be 5 units if the corner is square. Scale it up if you want: 6–8–10, 9–12–15, 12–16–20.

Why it spreads
  • People can test it at home and post the result.
  • It feels like a “math magic trick” that works in real life.
  • It’s instantly useful for DIY, sports, and school.
Next clicks
✅ Quick checklist

Before you trust the result

  • Use the same units for all sides (cm, m, inches, etc.).
  • In a right triangle, the hypotenuse is the longest side.
  • If you’re solving for a leg, the hypotenuse must be known and bigger than the leg you know.
  • Round only at the end if you need precision.

Pro tip: If you’re doing DIY or construction, add a tiny buffer (like 1–2 mm) before cutting.

📣 Tiny SEO note

Help this page rank (and get shared)

  • Use clear labels: leg a, leg b, hypotenuse c.
  • Show step-by-step math in the result area (done).
  • Add a shareable “3–4–5” challenge (done).
  • Include internal links to related geometry tools (20 links above).

Pro tip: Create a short TikTok/Reel showing the 3–4–5 test, then link this calculator in your bio.

MaximCalculator provides educational calculators for learning and quick verification. For construction and safety-critical work, double-check measurements with proper tools and standards.