Pythagorean Theorem Calculator

Find the hypotenuse or a missing leg of a right triangle, or check whether three sides make a right triangle.

Enter the sides of your triangle

Solve for

a b c A B C

How to use the Pythagorean theorem calculator

  1. Under Solve for, pick Hypotenuse (c), Leg (a), Leg (b), or Check 3 sides to test whether three lengths make a right triangle.
  2. Type the sides you know into Leg a, Leg b and Hypotenuse c. The field being solved fills in for you.
  3. Choose the Decimal places (default 4), then read the answer, the working, and the triangle's area, perimeter and angles. Use one unit for every side.

The formula

In a right triangle, the square of the hypotenuse c (the side opposite the 90 degree angle) equals the sum of the squares of the two legs: a² + b² = c². Solving for each side gives c = √(a² + b²), a = √(c² - b²) and b = √(c² - a²). The converse, which Check 3 sides relies on, is Euclid's Proposition 48.

The calculator also gives the area (a × b ÷ 2), the perimeter, and the two acute angles: angle A = arctan(a ÷ b) and angle B = arctan(b ÷ a). With whole-number sides you also get exact answers, such as 2√5.

Worked example with the default values

Solve for Hypotenuse (c) with a = 3 and b = 4:

  • c² = a² + b² = 3² + 4² = 9 + 16 = 25
  • c = √25 = 5
  • Area = 3 × 4 ÷ 2 = 6, perimeter = 3 + 4 + 5 = 12
  • Angle A = 36.8699°, angle B = 53.1301°, and the right angle is 90°

To find a leg, pick Leg (a), then enter b = 12 and c = 13. The calculator returns a² = 169 - 144 = 25, so a = 5. A 10 ft ladder standing 3 ft from a wall reaches √(10² - 3²) = √91 ≈ 9.5394 ft up it.

Real uses

Limits and edge cases

Frequently asked questions

How do I find a missing leg of a right triangle?

Choose Leg (a) or Leg (b) under Solve for, then enter the other leg and the hypotenuse. The calculator subtracts the squares: a = √(c² - b²). For c = 13 and b = 12 it returns a = 5.

How can I tell if a triangle is a right triangle?

Choose Check 3 sides and enter the lengths in any order. If the squares of the two shorter sides add up to the square of the longest, it is a right triangle (the converse of the theorem). For 3, 4 and 5, 9 + 16 = 25, so the answer is yes.

What are Pythagorean triples?

A Pythagorean triple is a set of three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13. Multiples such as 6, 8, 10 also count. The calculator points out when your sides form one.

Does the Pythagorean theorem work for non-right triangles?

No, it only holds when one angle is exactly 90 degrees. For other triangles use the law of cosines, c² = a² + b² - 2ab cos(C), which reduces to the Pythagorean theorem when C is 90 degrees.

Sources: Euclid, Elements, Book I, Proposition 47 (Clark University edition) and Wolfram MathWorld, Pythagorean Theorem.