Pythagorean Theorem Calculator

Solve a² + b² = c² for the hypotenuse or a missing leg.

Free Pythagorean theorem calculator — find the hypotenuse from two legs, or a missing leg from the hypotenuse and the other leg. It runs entirely in your browser and nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What does this calculator solve?

The Pythagorean theorem, a² + b² = c². It finds the hypotenuse c from two legs, or a missing leg from the hypotenuse and the other leg.

Pythagorean theorem calculator

Solve a² + b² = c² in either direction. Find the hypotenuse from the two legs, or find a missing leg from the hypotenuse and the other leg. The formula used is shown alongside each result, so it doubles as a quick way to check your own working in geometry, construction and trigonometry.

How it works

The theorem relates the three sides of a right triangle, where c is the hypotenuse (the side opposite the right angle):

hypotenuse:  c = √(a² + b²)
missing leg: b = √(c² − a²)

When solving for a leg, the calculator checks that the hypotenuse is longer than the known leg, since a real right triangle cannot have a leg as long as or longer than its hypotenuse.

Examples

Hypotenuse from legs 3 and 4:

  • c = √(3² + 4²) = √(9 + 16) = √25 = 5

Missing leg from hypotenuse 5 and leg 3:

  • b = √(5² − 3²) = √(25 − 9) = √16 = 4
Solve forKnown sidesResult
Hypotenusea=3, b=4c = 5
Hypotenusea=5, b=12c = 13
Hypotenusea=8, b=15c = 17
Legc=5, a=3b = 4
Legc=13, a=5b = 12

Pythagorean triples

A Pythagorean triple is a set of three positive whole numbers where a² + b² = c² exactly. These produce right triangles with no rounding error, making them invaluable in construction when you need a perfect right angle using only a tape measure. The 3-4-5 triangle is the most widely used on job sites: if one side is 3 units and another is 4 units and the diagonal measures exactly 5 units, the angle between the two shorter sides is a perfect 90°.

Common Pythagorean triples to know:

abc
345
51213
81517
72425
202129

Scaling any triple preserves the right angle: 6-8-10, 9-12-15, and 30-40-50 all work just as well as 3-4-5.

Real-world applications

The Pythagorean theorem appears far beyond geometry class:

  • Construction and carpentry: squaring a foundation or a room using the 3-4-5 rule
  • Screen and display sizing: a “65-inch TV” is the diagonal — the theorem gives you the actual width and height given the aspect ratio
  • Navigation: the straight-line (as-the-crow-flies) distance between two GPS coordinates on a flat plane uses the same formula
  • Right triangle trigonometry: once you know all three sides, you can compute all six trig ratios — sin, cos, tan and their reciprocals

Everything runs in your browser — nothing is uploaded.