Pythagorean Theorem Calculator

Use the Pythagorean Theorem Calculator to find a missing right-triangle side from two known sides, plus angles, area and perimeter.

Use the same length unit for every side. The legs a and b meet at the square (90°) corner; the hypotenuse c is the longest side. A is opposite a; B is opposite b. Two angles do not determine the triangle size.

Hypotenuse c

5

  • Leg a3
  • Leg b4
  • Angle A36.86989765°
  • Angle B53.13010235°
  • Altitude to c2.4
  • Area (square units)6
  • Perimeter12
  • Inradius1
  • Circumradius2.5
abcAB

How this was calculated

  1. The Pythagorean theorem says a² + b² = c² in a right triangle (a triangle with one square, 90° corner). c is the hypotenuse, the longest side, across from the square corner. Square each leg (multiply it by itself), add them, then take the square root.c = √(a² + b²)Put in your numbers: c = √(3² + 4²) = √(9 + 16) = √25Answer: c = 5
  2. Tangent (tan) of angle A = the side opposite ÷ the side next to it. atan works backwards from that number to the angle.A = atan(a ÷ b)Put in your numbers: A = atan(3 ÷ 4)Answer: A = 36.86989765°
  3. The two small angles of a right triangle always add up to 90°, because all three angles make 180°.B = 90° − APut in your numbers: B = 90° − 36.86989765°Answer: B = 53.13010235°
  4. A right triangle is half of a rectangle with sides a and b, so multiply the legs and halve.Area = ab ÷ 2Put in your numbers: Area = 3 × 4 ÷ 2Answer: Area = 6 square units
  5. The altitude is the height from the square corner to the hypotenuse. The area is also c × h ÷ 2, so h = ab ÷ c.h = ab ÷ cPut in your numbers: h = 3 × 4 ÷ 5Answer: h = 2.4
  6. The perimeter (P) is the distance all the way around: add the three sides.P = a + b + cPut in your numbers: P = 3 + 4 + 5Answer: P = 12
  7. The inradius is the radius of the biggest circle that fits inside the triangle.Inradius r = (a + b − c) ÷ 2Put in your numbers: r = (3 + 4 − 5) ÷ 2Answer: r = 1
  8. The circumradius is the radius of the circle that passes through all three corners.Circumradius R = c ÷ 2Put in your numbers: R = 5 ÷ 2Answer: R = 2.5The hypotenuse is a diameter of the circumscribed circle (Thales' theorem).
  9. Quick check: a² + b² = c²; sin(A) = a/c; A + B = 90°.

The Pythagorean theorem in simple words

A right triangle has one square corner, like the corner of a page. The two sides that meet at that corner are the legs, a and b. The longest side, across from the corner, is the hypotenuse, c.

The Pythagorean theorem says a² + b² = c². In words: square each leg (multiply it by itself), add the two answers, and you get the square of the hypotenuse. Take the square root to find c.

Example: legs of 3 and 4. 3 × 3 = 9 and 4 × 4 = 16. 9 + 16 = 25, and the square root of 25 is 5, so the hypotenuse is 5.

To find a missing leg, do it the other way round: square the hypotenuse, take away the square of the leg you know, then take the square root.

Formula and method

For a right triangle, a²+b²=c², where c is the hypotenuse opposite the 90° angle. To find c, use √(a²+b²). To find a leg, subtract the other leg’s square from c² before taking the square root.

Worked example

With a = 3 and b = 4, c = √(9+16) = 5. The area is 3 × 4 / 2 = 6 square units and perimeter is 12 units. A = atan(3/4) ≈ 36.86989765° and B ≈ 53.13010235°.

Inputs and limitations

This theorem applies only to right triangles. For a general triangle use the Triangle Calculator. The hypotenuse must be longer than either leg. Convert all side measurements to the same unit first; the area is in that unit squared.

Whole-number right triangles

Each row satisfies a²+b²=c². Multiplying all three sides by the same positive factor preserves the right angle.

Common Pythagorean triples
Leg aLeg bHypotenuse c
345
51213
81517
72425
202129

Exact answers and worked steps

The steps substitute your numbers: c = √(3² + 4²) = √(9 + 16) = √25 = 5, or b = √(13² − 5²) = √(169 − 25) = √144 = 12. If whole-number sides do not give a perfect square, the answer is also shown in simplified radical form. Legs 1 and 1 give c = √2, and legs 2 and 4 give c = √20 = 2√5.

The results also include the inradius, (a + b − c) ÷ 2, and the circumradius, c ÷ 2.

Frequently asked questions

How do I simplify the square root in my answer?

Take out the largest perfect-square factor: √20 = √(4 × 5) = 2√5, and √72 = √(36 × 2) = 6√2. The calculator does this automatically when the sides you enter are whole numbers.

References

Last updated . Results are estimates for informational purposes only.