No ads, no sign-upChecked 2026-08-24

Pythagorean Theorem Calculator

Result

5.0000units

Result: 5.0000 units

Square both legs, add them, take the square root: c = √(a² + b²). Legs of 3 and 4 give exactly 5 — the measurement builders use to check that a corner is square. Enter the legs in one length unit and the hypotenuse comes back in that same unit.

The numbers at a glance

Held fixed: Leg a 3.000.

Leg bResult
1.0003.1623
2.0003.6056
3.0004.2426
4.000Your value5.0000
5.0005.8310
6.0006.7082
7.0007.6158
8.0008.5440

Worked examples

How it's calculated

c = √(a² + b²)

  1. StepMeasure the two legs — the sides that meet at the right angle.
  2. StepEnter both in the same length unit.
  3. ResultRead the hypotenuse, the side opposite the right angle.

What this number means

Right triangles only

The theorem holds only where two sides meet at exactly 90°. In a triangle without that corner a² + b² = c² is simply false, and the law of cosines takes over.

The hypotenuse stands alone in the equation

c is the side opposite the right angle and always the longest of the three, so it belongs by itself on one side of a² + b² = c². The two you enter here are the legs that form the corner.

6-8-10 is 3-4-5 doubled

Every multiple of a Pythagorean triple is a triple again, which is why legs of 6 and 8 land on exactly 10. That is what lets the builder's 3-4-5 check scale to whatever tape length is at hand.

Looking for a leg instead?

This calculator returns the hypotenuse, so rearrange by hand: a = √(c² − b²). With c = 13 and b = 12 that leaves √25 = 5, the third member of the 5-12-13 triple.

Commonly misread

Legs of 3 and 4 give a hypotenuse of 7.

That adds the legs themselves instead of their squares. Square first, add to 25, then take the root: c = 5.

Any triangle with sides of 5 and 12 has a third side of 13.

Only if those two sides meet at a right angle. Without that 90° corner the third side depends on the angle between them, and the law of cosines is what gives it.

Whichever side is longest can be entered as leg a.

The longest side is the hypotenuse, and it is the answer here, not an input. The two fields take the shorter sides that form the right angle.

Reference table

Legs a, bExactHypotenuse
1, 1√21.4142
3, 4√255.0000
5, 12√16913.0000
6, 8√10010.0000
8, 15√28917.0000

Questions

What is the Pythagorean theorem?

In any right triangle the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². Rearranged for the longest side, c = √(a² + b²). Legs of 3 and 4 give √25 = 5.

Does this work for any triangle?

No — the theorem holds only for right triangles, where two sides meet at exactly 90°. For a triangle without a right angle the law of cosines takes over, and it reduces to this one at 90°.

What are Pythagorean triples?

Triples are three whole numbers that satisfy a² + b² = c² exactly, so the hypotenuse comes out as an integer. The common ones are 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple is a triple too: 6-8-10 is 3-4-5 doubled.

What is the theorem used for?

Anywhere a right angle meets a diagonal: checking that a wall or foundation is square, finding a screen diagonal from width and height, sizing ramps, rafters and braces. Two perpendicular distances always give the third.

Which units does the answer use?

Whichever you entered. Both legs must use the same unit, and the hypotenuse comes back in that unit — centimetres in, centimetres out.

Sources and last check

  1. mathworld.wolfram.com

Information, not professional advice.