Skip to content

Pythagorean Theorem Calculator

Enter any two sides of a right triangle to find the third with a² + b² = c². You also get the area, perimeter and both acute angles, with every step shown.

  • Free, no sign-up
  • Runs in your browser
  • Math
a² + b² = c²
Enter any two sides and leave the one you want to find empty. The legs a and b meet at the right angle; the hypotenuse c is the side opposite it. Use any one length unit for all sides.

How to use the calculator

Type the two sides you know and leave the third box empty. Press Calculate and the missing side appears, along with the area, the perimeter and the two acute angles in degrees. The details panel shows each substitution so you can follow or check the working.

  • Leg a and leg b are the two sides that meet at the right angle.
  • Hypotenuse c is the side opposite the right angle. It is always the longest side.

Use the same length unit for every side. The result is in that unit, and the area is in that unit squared.

The formula

In every right triangle the square of the hypotenuse equals the sum of the squares of the two legs:

a² + b² = c²

Rearranged, it gives each side:

  • Hypotenuse: c = √(a² + b²)
  • Missing leg: a = √(c² − b²) or b = √(c² − a²)

The acute angles come from basic trigonometry: angle A, opposite leg a, is arctan(a / b), and angle B is 90° − A. The area is half the product of the legs, a × b / 2.

Worked example: finding the hypotenuse

Legs of 6 and 8:

  1. c² = 6² + 8² = 36 + 64 = 100
  2. c = √100 = 10
  3. Area = 6 × 8 / 2 = 24, perimeter = 6 + 8 + 10 = 24
  4. Angle A = arctan(6 / 8) ≈ 36.87°, angle B ≈ 53.13°

Worked example: finding a leg

A 5 m ladder leans against a wall with its foot 1.5 m from the wall. How high does it reach? The ladder is the hypotenuse:

  1. a² = 5² − 1.5² = 25 − 2.25 = 22.75
  2. a = √22.75 ≈ 4.7697 m

The ladder reaches about 4.77 m up the wall, at an angle of about 72.54° to the ground.

Good to know

  • Whole-number solutions such as 3-4-5, 5-12-13 and 8-15-17 are called Pythagorean triples. Any multiple of a triple, like 6-8-10, is also one.
  • The hypotenuse must be longer than either leg. If it is not, no right triangle exists and the calculator tells you so.
  • Results are shown with up to 10 significant digits. Square roots of most numbers are irrational, so the last digit is rounded.
  • The theorem works only for right triangles. For other triangles, use the law of cosines, which our triangle calculator applies for you.

Frequently asked questions

Which side is the hypotenuse?

The hypotenuse is the side opposite the right angle (the 90° corner). It is always the longest side of a right triangle. The other two sides, which form the right angle, are called legs.

Can I find a leg if I know the hypotenuse?

Yes. Enter the hypotenuse and the known leg and leave the other leg empty. The calculator uses a = √(c² − b²). For example, a hypotenuse of 13 and a leg of 12 give a missing leg of 5.

Why do I get an error when the hypotenuse equals a leg?

In a right triangle the hypotenuse is always strictly longer than each leg, because c² = a² + b² and both legs are greater than zero. If c is equal to or shorter than a leg, no right triangle has those sides.

How can I check whether a corner is square?

Measure 3 units along one edge and 4 units along the other, then measure between the two marks. If the distance is exactly 5 units, the corner is 90°. Builders use this 3-4-5 rule, often scaled up to 6-8-10 or 9-12-15 for more accuracy.