Pythagorean Theorem Calculator

Enter two sides of a right triangle and get the third. The area, perimeter and both acute angles come with it.

Your triangle

Result

Please correct the highlighted fields.
Hypotenuse c
5
Sides a, b, c
3, 4, 5
Area
6
Perimeter
12
Angle opposite a
36.8699°
Angle opposite b
53.1301°

How the Pythagorean theorem works

In a right triangle, the square of the hypotenuse, the side opposite the right angle, equals the sum of the squares of the two legs. Knowing two sides, the third follows.

The acute angles come from the ratio of the legs: the angle opposite a is the arctangent of a ÷ b, and the two acute angles add up to 90°.

Formulas used

a² + b² = c²
c = √(a² + b²)
b = √(c² − a²)
Area = a × b ÷ 2
Angle A = arctan(a ÷ b)

Worked example

Legs of 3 and 4:

  1. c² = 3² + 4² = 9 + 16 = 25
  2. c = √25 = 5
  3. Area = 3 × 4 ÷ 2 = 6

c = √(3² + 4²) = 5.

Assumptions and limits

  • Sides must be greater than 0.
  • When solving for a leg, the hypotenuse must be longer than the leg you enter.
  • Values up to one billion are accepted.

Common questions

Does the Pythagorean theorem work for any triangle?

Only for right triangles, where one angle is exactly 90 degrees. For other triangles you need the law of cosines, or you can find the area from the three sides with Heron’s formula in the area calculator.

What are Pythagorean triples?

They are sets of three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple, like 6-8-10, is also a triple. They are handy for checking that a corner is square.

Related tools