Skip to content

Pythagorean Theorem Calculator

This Pythagorean theorem calculator solves a right triangle. Enter any two sides to find the third, then read off the two acute angles and the area. It is a free tool for students, builders and anyone with a right angle to check.

Solve for

Hypotenuse c

5

√(3² + 4²) = 5

Leg a
3
Leg b
4
Hypotenuse c
5
Angle opposite a
36.8699°
Angle opposite b
53.1301°
Area
6

How to use this calculator

  1. 1 Choose the side you want to find: the hypotenuse c, leg a or leg b.
  2. 2 Enter the two sides you know. The hypotenuse is always the longest side, opposite the right angle.
  3. 3 Read the missing side, the two acute angles in degrees and the area.
  4. 4 Check the working line to see the sum the calculator used.

What is the Pythagorean theorem?

The Pythagorean theorem is a rule about right triangles. A right triangle has one corner of exactly 90 degrees. The two sides that meet at that corner are called the legs, and the longest side, opposite the corner, is the hypotenuse.

The rule says that the square of the hypotenuse equals the sum of the squares of the two legs. In symbols, a² + b² = c². It is named after the Greek mathematician Pythagoras, although many cultures knew it long before him.

For example, a 3 m leg and a 4 m leg give a hypotenuse of 5 m, because 3² + 4² = 9 + 16 = 25, and √25 = 5. Sets of whole numbers like this are called Pythagorean triples.

How to find a missing side

If you know both legs, find the hypotenuse. Square each leg, add the results, and take the square root. This is the step the calculator takes when you choose c.

If you know the hypotenuse and one leg, rearrange the rule. Subtract the square of the known leg from the square of the hypotenuse, then take the square root. The rule needs the hypotenuse to be longer than the leg you know. Otherwise, no right triangle is possible.

Once you have all three sides, you can find the angles. The angle opposite a leg equals the inverse tangent of that leg divided by the other leg. Two angles always add up to 90 degrees, so the third angle is the right angle.

Common whole-number right triangles
Leg aLeg bHypotenuse c
345
51213
81517
72425

Where the theorem is used

Builders use the theorem to check corners. A common method is the 3-4-5 rule: mark 3 units along one wall and 4 units along the other. If the diagonal between the marks is 5 units, the corner is square.

Navigation and design use it too. For example, a straight walk across a rectangular park is its diagonal, and you can find that length with the same rule. For points on a graph, the distance calculator uses the same idea.

Triangles that are not right-angled need other rules, such as the law of cosines. For those, the triangle calculator is a better fit. You can also find the area of any triangle with the area calculator.

Tips for reliable results

Small slips with squares and roots cause most errors. These habits keep your sums on track:

  • Check the hypotenuse first. It must be the longest side, or the numbers cannot form a right triangle.
  • Use one unit. Convert metres and centimetres to the same unit before you start.
  • Square before adding. Do not add the sides first and then square them.
  • Round at the end. Keep extra decimal places during the sum, so the answer stays accurate.
  • Check the result. Square the new side and confirm that the two legs add up to it.

The formula

Pythagorean theorem

a² + b² = c²

a, b
the two legs, which meet at the right angle
c
the hypotenuse, opposite the right angle

Hypotenuse

c = √(a² + b²)

A missing leg

a = √(c² − b²) or b = √(c² − a²)

Angles and area

Angle opposite a = arctan(a ÷ b). Area = ½ × a × b

arctan
inverse tangent, which gives an angle in degrees

Worked example

A ladder leaning against a wall, with a 5 m base and a 12 m height

  1. 1.Hypotenuse: c = √(5² + 12²) = √(25 + 144) = √169 = 13 m.
  2. 2.Angle opposite the 5 m leg: arctan(5 ÷ 12) = 22.6199°.
  3. 3.Angle opposite the 12 m leg: 90° − 22.6199° = 67.3801°, or 67.38° to two decimals.
  4. 4.Area: ½ × 5 × 12 = 30 square metres.

The ladder is 13 m long, and its acute angles are about 22.62° and 67.38°.

Frequently asked questions

How do I use the Pythagorean theorem?

Square the two legs, add the results, and take the square root. For legs of 3 and 4, the hypotenuse is √(9 + 16) = 5. To find a missing leg, subtract the square of the known leg from the square of the hypotenuse, then take the square root.

Which side is the hypotenuse?

The hypotenuse is the side opposite the right angle. It is always the longest side of a right triangle.

Why does a missing leg need a longer hypotenuse?

A leg is always shorter than the hypotenuse, so c² − b² must be positive. If the hypotenuse is not longer than the known leg, no right triangle can exist.

Do the two acute angles add up to 90 degrees?

Yes. In any right triangle, the two acute angles add up to 90°. The calculator shows them to four decimal places, so they sum to 90 once rounded.

Does the theorem work for triangles that are not right-angled?

No. The rule only works when one angle is exactly 90 degrees. For other triangles, use the law of sines or the law of cosines, which the triangle calculator covers.

Sources

Last reviewed by the GridCalculators team.