Skip to content
CalcPilot
Salary calculator: gross to net pay for Canada, the US, the UK, France and Germany
Math

Pythagorean Theorem Calculator

Find the hypotenuse, area, and perimeter of a right triangle.

c = √(a² + b²)

Try an example

Hypotenuse (c)

5

Area6
Perimeter12

About this calculator

What Is the Pythagorean Theorem?

The Pythagorean theorem is a basic rule of geometry that relates the three sides of a right triangle — a triangle with one 90° angle. It states that the area of the square built on the longest side (the hypotenuse) equals the sum of the areas of the squares built on the other two sides. In symbols: a² + b² = c², where c is the hypotenuse and a and b are the legs. It is named for the ancient Greek thinker Pythagoras, though the relationship was known to earlier civilizations. Give this calculator any two sides and it finds the third.

How to Use the Formula

  • Find the hypotenuse: c = √(a² + b²). A triangle with legs 3 and 4 has hypotenuse √(9 + 16) = 5.
  • Find a leg: a = √(c² − b²). With hypotenuse 13 and one leg 5, the other leg is √(169 − 25) = 12.

Remember that the hypotenuse is always the longest side, opposite the right angle.

Worked Example

For legs of 3 and 4, the hypotenuse is 5 — the classic 3-4-5 right triangle — with an area of 6 and a perimeter of 12.

Pythagorean Triples

A Pythagorean triple is a set of three whole numbers that satisfy the theorem. The best known are 3-4-5, 5-12-13, 8-15-17 and 7-24-25. Any multiple of a triple is also a triple — 6-8-10 is just 3-4-5 doubled — and carpenters use the 3-4-5 shape to check that a corner is square.

Real-Life Applications

  • Construction: checking square corners and finding the length of a diagonal brace or a roof rafter.
  • Navigation and mapping: straight-line distance between two points from their horizontal and vertical differences.
  • Screens and TVs: a "55-inch" screen is the diagonal, found from its width and height.
  • Ladders and ramps: how far a ladder reaches up a wall at a given base distance.

Beyond Right Triangles

For triangles without a right angle, the law of cosines generalizes the theorem: c² = a² + b² − 2ab·cos C. When C = 90°, the cosine term is zero and the Pythagorean theorem is what remains. The Triangle Calculator handles those general cases, the Slope Calculator uses the theorem to find distance between points, and the Root Calculator helps with the square roots.

Worked example

For legs a = 3 and b = 4, the hypotenuse is c = √(9 + 16) = 5 — the classic 3-4-5 right triangle, with an area of 6.

Frequently asked questions

Does this work for any triangle?

No — the Pythagorean theorem only applies to right triangles (one 90° angle). For a triangle without a right angle, use the Law of Cosines instead, available on the Triangle Calculator.

Can I solve for a leg instead of the hypotenuse?

This calculator solves for the hypotenuse given both legs. To solve for a missing leg given the hypotenuse and one leg, rearrange the formula: a = √(c² − b²).

What's a real-world use for this?

Common uses include finding the diagonal of a rectangle, the length of a brace or ladder against a wall, or the straight-line distance between two points on a grid.

More Math calculators

Advertise on CalcPilot