Maths / Geometry

Pythagorean Theorem Calculator

Find the missing side of a right triangle from any two sides, with the working shown step by step, a drawing to scale, and the angles, area, and perimeter.

Pythagorean Theorem Calculator: The Pythagorean theorem says that in a right triangle the square of the hypotenuse, the side opposite the right angle, equals the sum of the squares of the other two sides: a² + b² = c². Given both legs, the calculator adds their squares and takes the square root; given a leg and the hypotenuse, it subtracts. The angles come from the arctangent of the two legs. Runs 100% locally in your browser with zero server file uploads.

Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use
Pythagorean theorem calculatorLocal processing

Runs entirely in your browser

Enter any two sides and leave the third empty.

abc53.1°36.9°
  1. c² = a² + b²
  2. c² = 3² + 4² = 9 + 16 = 25
  3. c = √25 = 5
a3
b4
c5
Area6
Perimeter12
Angles36.87° · 53.13° · 90°opposite a, opposite b, between the legs

Using it in real life

Builders check a corner is square by marking 3 m along one wall and 4 m along the other: if the diagonal between the marks is exactly 5 m, the corner is 90°. The same sum finds the length of a ladder needed to reach a height from a given distance, or a TV's diagonal from its width and height.

For a right triangle's area from its legs alone, the right triangle calculator is quicker; for roots on their own, the square root calculator.

Why it is true

Arrange four copies of the triangle inside a square with sides a + b, leaving a tilted square of side c in the middle. The big square's area is (a + b)², which equals the four triangles, 2ab, plus c². Expanding gives a² + 2ab + b² = 2ab + c², so a² + b² = c².

How to use it

  1. Enter any two of the three sides and leave the third empty.
  2. Read the missing side and the steps that found it.
  3. Use the angles, area, and perimeter shown below the drawing.

Privacy & limitations

Everything is worked out in your browser.

Related tools

Frequently asked questions

Which side is the hypotenuse?

The longest side, opposite the right angle. It must be longer than either leg, so a leg of 5 and a hypotenuse of 5 has no answer.

What are Pythagorean triples?

Whole-number sides that fit the theorem, such as 3, 4, 5; 5, 12, 13; and 8, 15, 17. Builders use 3, 4, 5 to check that a corner is square.

Does it work for any triangle?

Only for right triangles. For others, the law of cosines adds a correction: c² = a² + b² − 2ab·cos C, which becomes the Pythagorean theorem when C is 90°.

Free tool · runs in your browser · no account required