Pythagorean Theorem Calculator

Enter any two sides of a right triangle to find the third, plus its angles, area and perimeter.

Missing side
5
Side lengths
012345Leg a — Length: 3Leg aLeg b — Length: 4Leg bHypotenuse c — Length: 5Hypotenuse c
Leg a
3
Leg b
4
Hypotenuse c
5
Angle opposite a (α)
36.8699
Angle opposite b (β)
53.1301
Area
6
Perimeter
12
Show the working
  1. a² + b² = c²
  2. c = √(a² + b²) = √(9 + 16) = √25 = 5
  3. α = arctan(a ÷ b) = 36.8699°, β = 90° − α = 53.1301°
  4. Area = ½ab = 6

Runs entirely in your browser. Nothing you enter is uploaded.

Formula

a² + b² = c²c = √(a² + b²), a = √(c² − b²)

How it works

In any right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides, called the legs. This relationship, credited to the Greek mathematician Pythagoras, lets you find any side when you know the other two.

To find the hypotenuse, add the squares of the legs and take the square root. To find a leg, subtract the square of the known leg from the square of the hypotenuse, then take the square root. The hypotenuse is always the longest side, so a leg can never be longer than it.

Some right triangles have whole-number sides, called Pythagorean triples: 3-4-5, 5-12-13, 8-15-17 and 7-24-25 are the most common, and any multiple of one (like 6-8-10) works too. Builders use the 3-4-5 triple to check that corners are square.

Frequently asked questions

Does the theorem work for triangles without a right angle?

No. For other triangles use the law of cosines, c² = a² + b² − 2ab·cos C, which reduces to the Pythagorean theorem when C = 90°. The triangle calculator handles any three sides.

How do I find distance on a graph with it?

The horizontal and vertical gaps between two points are the legs, and the straight-line distance is the hypotenuse: d = √(Δx² + Δy²).

esc