home / Math / pythagorean theorem calculator

Pythagorean Theorem Calculator

The Pythagorean Theorem Calculator is a free online tool that finds the missing side of a right triangle. Enter any two sides and it returns the third, along with the angles, the area and whether the sides form a Pythagorean triple.

Enter any two sides; leave the unknown one at 0.

leave 0 to solve

Related: Right Triangle Calculator | Triangle Calculator | Distance Calculator

The Theorem

In any right triangle, the square on the hypotenuse equals the sum of the squares on the other two sides:

a² + b² = c²

Rearranged, it finds any missing side: c = √(a² + b²), a = √(c² − b²). The hypotenuse c is always the longest side and always sits opposite the right angle.

Pythagorean Triple Chart

Whole-number sides that satisfy the theorem exactly:

abcNotes
345The smallest; used to square corners on site
51213Common in textbooks
81517
72425
202129Nearly isosceles
94041
123537

Any multiple of a triple is also a triple: 6-8-10 and 9-12-15 are both scaled versions of 3-4-5. There are infinitely many primitive triples, generated by Euclid's formula from any two coprime integers.

The 3-4-5 Method

Builders use the theorem in reverse to check that a corner is square. Measure 3 units along one wall, 4 along the other, and the diagonal between the marks must be exactly 5. If it is not, the corner is not a right angle. Larger multiples — 6-8-10, 12-16-20 — give better accuracy over longer walls.

Older Than Pythagoras

The Babylonian tablet Plimpton 322, dating from around 1800 BC, lists Pythagorean triples more than a millennium before Pythagoras. Egyptian rope-stretchers and Chinese and Indian mathematicians all used the relationship independently. Pythagoras or his school are credited with an early proof rather than the discovery, and the theorem now has several hundred distinct proofs, including one by US President James Garfield.

Where It Is Used

  • The distance formula — the theorem applied to coordinates.
  • Screen and TV sizes — a 55-inch diagonal on a 16:9 panel is 47.9 by 26.9 inches.
  • Navigation and surveying — converting between components and straight-line distances.
  • Vector magnitudes — the length of a vector is the Pythagorean sum of its components.
  • Standard deviation — the same square-and-root structure appears throughout statistics.

Frequently Asked Questions

Does it work for non-right triangles?

No. The generalisation is the law of cosines: c² = a² + b² − 2ab cos(C). When C is 90°, the cosine term vanishes and it reduces to the Pythagorean theorem.

How do I know which side is the hypotenuse?

It is opposite the right angle and always the longest side. If a calculation makes a leg longer than the hypotenuse, the labels have been swapped.

Can the sides be decimals?

Yes. Whole-number solutions are special cases; the theorem holds for any real lengths.