The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the two shorter legs, written as a² + b² = c². To find the missing side of a right triangle, you rearrange that single equation — c = √(a² + b²) when you know both legs, or b = √(c² − a²) when you know the hypotenuse and one leg — and plug in the two lengths you already have. The fastest way to do that without paper is a dedicated Pythagorean theorem calculator, which accepts whichever two sides you know, solves for the third, and shows the formula line it used. Because the Pythagorean theorem links all three sides so tightly, knowing any two of them is enough to fix the third. The same idea underlies the distance formula in coordinate geometry, the diagonal of a TV or monitor, and the way surveyors turn grid coordinates into straight-line distance. Once you understand that a² + b² = c² is the only relationship you need, every right-triangle problem collapses to one short calculation.

how to find pythagorean theorem of a right triangle
How to Solve the Pythagorean Theorem for a Right Triangle

The Formula in Plain English

The theorem is older than written algebra and still does more work than almost any other geometric identity. In any triangle with one 90° angle — a "right" triangle — the side opposite the right angle is called the hypotenuse and given the letter c. The two sides that meet at the right angle are called the legs, a and b. The relationship is simply that a² + b² = c²: square each leg, add the squares, and the total equals the square of the hypotenuse.

Three consequences follow directly:

  • Knowing any two sides fixes the third. Plug two values in, and the missing length is the only number that can complete the equation.
  • The hypotenuse is always the longest side. Because the legs contribute positive amounts to c², c must exceed either leg on its own. The calculator checks this and flags cases where you supply a hypotenuse shorter than a leg, because no such triangle can exist.
  • The formula only works for right triangles. If the angle between a and b is not 90°, the squares don't add up the same way. Other shapes need the Law of Cosines.

That single set of rules is the whole apparatus behind the Pythagorean theorem. Everything the calculator does — including area, perimeter, and angles — is built on top of those three facts.

How to Use the Pythagorean Theorem Calculator

Pick the path that matches the two sides you already know. Each input updates every output the moment you finish typing, so you can experiment freely.

  1. Choose what you're solving for. Pick "Find hypotenuse" if you know both legs, or "Find missing leg" if you know the hypotenuse and one of the two legs.
  2. Type the two lengths you know into the input boxes. The calculator keeps enough precision to verify exact triples.
  3. Read the missing side along with area, perimeter, and both acute angles. Each result is shown next to the formula line that produced it, so you can see exactly how the answer was reached.

There is nothing to submit and no button to press — the output updates as you type. Because the working runs entirely in your browser, your numbers are never uploaded anywhere.

Worked Example: A 3-4-5 Triangle

The simplest test case is also the most famous. A triangle with legs of 3 and 4 has a known hypotenuse of 5, because 3² + 4² = 9 + 16 = 25, and √25 = 5. To confirm the calculator:

  1. Select Find hypotenuse.
  2. Enter 3 for leg a and 4 for leg b.
  3. Read c = 5.000, area = 6, perimeter = 12, and the acute angles 36.87° and 53.13°, which sum to exactly 90°.

Each of those numbers lines up with hand calculation. From legs a = 3 and b = 4, the area is ½ · 3 · 4 = 6. The perimeter is 3 + 4 + 5 = 12. The angle opposite leg a is arctan(3/4) ≈ 36.87°, and the angle opposite leg b is arctan(4/3) ≈ 53.13°. Seeing the calculator return those values is the fastest sanity check you can run.

Pythagorean Triples Worth Memorising

Some integer triples satisfy a² + b² = c² exactly, with no rounding. Recognising them on sight lets you sanity-check any answer in seconds.

Triple (a, b, c)a²b²c²
3, 4, 591625
5, 12, 1325144169
8, 15, 1764225289
7, 24, 2549576625
9, 40, 418116001681

Any multiple of a triple also works. The 3-4-5 family includes 6-8-10, 9-12-15, 12-16-20, and so on. Builders routinely use multiples of 3-4-5 to lay out square corners: measure 3 units along one wall, 4 along the other, and the diagonal between the marks should be 5.

What Else the Calculator Computes

Once all three sides are known, the rest of the triangle falls out for free. The Pythagorean theorem calculator reports each of the following from the same two inputs:

  • Area. ½ · a · b, the standard right-triangle area formula.
  • Perimeter. a + b + c, with all three sides already solved.
  • Both acute angles. Computed with the arctangent — typically arctan(a/b) and arctan(b/a) — and always summing to exactly 90°.

Every figure updates the moment an input changes, which makes it easy to watch the triangle respond.

When the Formula Applies — and When It Doesn't

The equation a² + b² = c² is exact only when a and b are the legs of a right triangle — that is, when they meet at a 90° angle. For any other triangle, use the Law of Cosines instead: c² = a² + b² − 2ab · cos(C), where C is the angle opposite side c. The Pythagorean theorem falls out of the Law of Cosines as a special case, because cos(90°) = 0, which silently drops the extra term and leaves a² + b² = c².

One practical check keeps the theorem from giving nonsense answers: the hypotenuse must always be longer than either leg. The calculator flags impossible inputs where the would-be hypotenuse is shorter than a leg, so you know immediately that the triangle cannot exist.

Where the Pythagorean Theorem Shows Up in Real Life

Although the rule comes from geometry, it turns up constantly outside textbooks.

  • Construction. Squares the corners of walls, foundations, and framing. The 3-4-5 method is the classic field technique.
  • Surveying and navigation. Turns north-south and east-west distances into the straight-line distance between two points. The same idea underlies the distance formula in any coordinate system.
  • Screens. A TV or monitor's diagonal screen size is the hypotenuse of a right triangle formed by its width and height — the c in a² + b² = c². The common 16:9 ratio comes from the same arithmetic.
  • Game development. 2D collision, line-of-sight checks, and movement grids all rely on c = √(Δx² + Δy²).
  • Everyday measuring. Reach across a tablecloth, measure the run and rise of a ramp, or check whether a picture frame is square — the theorem already knows the answer.

Enter your own lengths into the Pythagorean theorem calculator above and watch each of these cases resolve instantly, with the formula written out next to the answer.