Calculator · Level 2

Pythagorean theorem calculator: find the hypotenuse or a leg

Enter two sides of a right triangle and get the third. The calculator shows a² + b² = c² with your numbers, gives the answer exactly and as a decimal, draws the triangle and, if you like, adds the angles, altitude, area and perimeter.

Also available in: Deutsch · Português · Español

Free for teaching and learning (terms (in German)). Ad-free in class: Classroom view · Do you teach?

How to use the calculator

Choose the side you are looking for under “Solve for”: the hypotenuse c or one of the legs a and b. The field for that side is grayed out, and you enter the other two sides. The hypotenuse is always the longest side, opposite the right angle; the two shorter sides are the legs.

Sides can be whole numbers, decimals (1.5), fractions (3/2) or large numbers with commas (1,200). The unit is just a label, such as in, ft, cm or m; use the same unit for both sides. After the calculation the missing side is filled into its field, and the drawing shows the triangle to scale.

Finding the hypotenuse

The Pythagorean theorem says that in a right triangle the squares of the legs add up to the square of the hypotenuse:

a2+b2=c2c=a2+b2

Finding a missing leg

If you know the hypotenuse and one leg, subtract instead of adding: a = √(c² − b²). The hypotenuse must be longer than the leg, otherwise there is no right triangle and the calculator shows an error.

Exact answers and decimals

When the result is not a whole number, the calculator gives the decimal and the exact value in simplest radical form. With legs 1 and 1 the hypotenuse is √2 ≈ 1.4142. A baseball diamond is a square with 90-foot sides, so the throw from home plate to second base is √(90² + 90²) = √16,200 = 90√2 ≈ 127.28 feet. With decimal sides such as 1.5 and 2, the result can still be exact: c = 2.5.

Angles, area, perimeter and altitude

With the option under “More options” switched on, the table adds more values of the triangle. For the 3-4-5 triangle:

  • angle α opposite a ≈ 36.8699°, angle β opposite b ≈ 53.1301°, and the right angle γ = 90°;
  • area A = a · b ÷ 2 = 6 and perimeter P = a + b + c = 12;
  • the altitude to the hypotenuse h = a · b ÷ c = 2.4;
  • the two hypotenuse segments that the altitude cuts off: a² ÷ c = 1.8 and b² ÷ c = 3.2.

The angles come from trigonometry: tan α = a ÷ b.

Frequently asked questions

Which side is the hypotenuse?

The side opposite the right angle. It is always the longest side of a right triangle. In the formula it is c, and it stands alone on one side of the equals sign.

Does the Pythagorean theorem work for every triangle?

No, only for right triangles. The converse is useful, though: if a² + b² = c² holds for three side lengths, the triangle has a right angle. For 6, 8 and 10: 36 + 64 = 100, so it is a right triangle.

Can the sides be decimals or fractions?

Yes. The calculator computes exactly with fractions, so 1.5 and 2 give exactly 2.5, and 3/4 and 1 give exactly 5/4.

What are Pythagorean triples?

Whole numbers a, b, c with a² + b² = c², such as 3, 4, 5; 5, 12, 13; 8, 15, 17 and 7, 24, 25. Multiples of a triple, such as 6, 8, 10, are triples as well.

What if my sides are in different units?

Convert them first. A leg of 2 feet and a leg of 18 inches should both be in inches (24 and 18) or both in feet (2 and 1.5). The hypotenuse is then 30 inches, or 2.5 feet.

Keep learning

Spotted a mistake or have a request? Send us a short message and we will take care of it.

Spotted a mistake or have a request?

Your message about the page “Pythagorean theorem calculator”. We send the page address along automatically.

Please do not include any other personal data. More in our privacy policy (in German).