Home › Math & Science › Pythagoras Calculator

Pythagoras Calculator

Use this free Pythagoras calculator to solve any right triangle. Enter the two sides you know and it finds the missing side, then works out the area and perimeter too. Pick whether you need the hypotenuse or one of the legs, and the calculator shows every step of the working so you can follow along or check your homework.

Hypotenuse c = 5
Area = 6 square units · Perimeter = 12 units

How it works

The Pythagoras theorem is one of the oldest and most useful facts in geometry. It says that in a right triangle — a triangle with one 90-degree angle — the square of the hypotenuse equals the sum of the squares of the other two sides. The two sides that meet at the right angle are called the legs, usually labeled a and b, and the side opposite the right angle is the hypotenuse, labeled c. Because the hypotenuse sits across from the biggest angle, it is always the longest of the three sides.

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

Which form you use depends on which side is missing. If you know both legs, the hypotenuse is the square root of a squared plus b squared. If you know the hypotenuse and one leg, subtract the square of the known leg from the square of the hypotenuse, then take the square root. That is why the calculator asks which side you are solving for first: the two cases use different rearrangements of the same equation.

The theorem only works on right triangles. If a triangle has no right angle, the equation does not hold, and you need the law of cosines instead. A quick sanity check is that the hypotenuse must come out longer than either leg, and that the two legs plus the hypotenuse satisfy the triangle inequality — the sum of any two sides is greater than the third. The calculator checks this for you: if the hypotenuse you enter is shorter than the leg you enter, it tells you the triangle cannot exist instead of giving a nonsense answer.

Once all three sides are known, the area and perimeter follow easily. The area of a right triangle is one half times leg a times leg b, because the two legs stand at right angles to each other and act as base and height. The perimeter is just the three sides added together: a + b + c. Carpenters and builders use this every day — a 3-4-5 triangle, and its multiples like 6-8-10, is the classic way to check that a corner is square before pouring concrete or framing a wall.

Worked example

A ramp design needs a right triangle with legs of 3 feet and 4 feet. What is the length of the sloped side, and what are the area and perimeter?

Step 1: Write down the theorem — a² + b² = c².
Step 2: Substitute the known legs — 3² + 4² = 9 + 16 = 25.
Step 3: Take the square root — c = √25 = 5 feet.
Step 4: Area — ½ × 3 × 4 = 6 square feet.
Step 5: Perimeter — 3 + 4 + 5 = 12 feet.

Enter 3 and 4 in the calculator with "Hypotenuse (c)" selected and it gives exactly the same result: c = 5, area = 6, perimeter = 12. Try the leg mode too: a hypotenuse of 13 and a leg of 5 gives the other leg as √(169 − 25) = √144 = 12, the 5-12-13 triangle.

FAQ

What is the Pythagoras theorem?

The Pythagoras theorem says that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a squared plus b squared equals c squared. The hypotenuse is always the side opposite the right angle, and it is always the longest side of the triangle.

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

Rearrange the theorem to solve for the leg you need: a squared equals c squared minus b squared, so a equals the square root of c squared minus b squared. You need the hypotenuse and one leg. The hypotenuse must be longer than the known leg, or the triangle cannot exist.

What is the 3-4-5 triangle?

The 3-4-5 triangle is the simplest right triangle with whole-number sides. Since 3 squared plus 4 squared equals 9 plus 16 equals 25, and 25 is 5 squared, a triangle with legs of 3 and 4 has a hypotenuse of 5. Builders use multiples of it, like 6-8-10 or 9-12-15, to check that a corner is square.

Can the Pythagoras theorem be used on any triangle?

No, it only works on right triangles, where one angle is exactly 90 degrees. For triangles without a right angle, use the law of cosines instead. If you try the theorem on a non-right triangle, the answer will be wrong.

How do you find the area of a right triangle?

The area of a right triangle is one half times leg a times leg b, because the two legs form the base and height. Once the calculator finds all three sides, it multiplies the two legs together and halves the result. The perimeter is simply a plus b plus c.