Sign up
Pythagorean Theorem calculator →

Pythagorean Theorem guide

The Pythagorean Theorem Calculator solves for any missing side of a right-angled triangle using the formula a² + b² = c². You can solve for the hypotenuse (c) or either of the legs (a or b).

Worked examples

Find the hypotenuse (c) of a 3-4-5 right triangle

  1. Select "Solve for c".
  2. Enter 3 as side a.
  3. Enter 4 as side b.
  4. Click Calculate.
Result: c = 5

c = √(a² + b²) = √(3² + 4²) = √(9 + 16) = √25 = 5.

Find a missing leg (a)

  1. Select "Solve for a".
  2. Enter 5 as side b.
  3. Enter 13 as the hypotenuse c.
  4. Click Calculate.
Result: a = 12

a = √(c² - b²) = √(13² - 5²) = √(169 - 25) = √144 = 12.

Identify an invalid triangle

  1. Select "Solve for a".
  2. Enter 10 as side b.
  3. Enter 5 as the hypotenuse c.
  4. Click Calculate.
Result: Error: Hypotenuse must be greater than the leg

The hypotenuse is always the longest side. If you enter a leg larger than the hypotenuse, the math would require taking the square root of a negative number.

Tips

  • •The hypotenuse is always the longest side, located opposite the 90-degree angle.
  • •Common Pythagorean triples include (3,4,5), (5,12,13), and (8,15,17).
  • •If the square of the longest side equals the sum of the squares of the other two, the triangle is a right triangle.

Frequently asked questions

What is the Pythagorean Theorem?
A fundamental principle in geometry stating that in a right triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides (a² + b² = c²).
What is the hypotenuse?
The longest side of a right triangle, opposite the 90-degree right angle.
What are the legs of a right triangle?
The two shorter sides that meet at the 90-degree angle.
Does this theorem work for non-right triangles?
No. For non-right triangles, you must use the Law of Cosines.
What is a Pythagorean triple?
A set of three positive integers that perfectly satisfy the theorem, such as 3, 4, and 5 (since 3² + 4² = 5²).
Can a right triangle have equal legs?
Yes, it is called an isosceles right triangle (45-45-90 triangle). The hypotenuse will be leg × √2.
Who was Pythagoras?
An ancient Greek philosopher and mathematician who founded the Pythagorean school, though the theorem was known to Babylonians over 1000 years earlier.
How do I find the diagonal of a rectangle?
The diagonal splits the rectangle into two right triangles. Use the length and width as the legs (a and b) to find the diagonal as the hypotenuse (c).
Why is the hypotenuse always the longest side?
Because the side opposite the largest angle in any triangle is always the longest, and the right angle (90°) is the largest angle in a right triangle.
What is the converse of the Pythagorean Theorem?
If a triangle’s sides satisfy a² + b² = c², then the triangle is a right triangle.
Can the sides of a right triangle be decimals?
Yes. The theorem works for any real positive numbers, including decimals and irrational numbers.
What happens if a and b are zero?
A triangle cannot have a side length of zero, so the calculator will return an error.
Is there a 3D version of this theorem?
Yes. The 3D distance formula d = √(x² + y² + z²) is an extension of the Pythagorean theorem.
How is this used in construction?
Builders use the 3-4-5 rule to ensure corners are perfectly square (90 degrees). If opposite sides of a corner are 3 and 4, the diagonal must be exactly 5.
What is the unit of the result?
It is the same linear unit as your inputs (e.g., if you enter cm, the result is in cm).
Can I solve for side b?
Yes, the calculator allows you to solve for side a, side b, or the hypotenuse c.
Does the tool draw the triangle?
Yes, a dynamic graph visualizes the triangle based on your inputs.
Are the results exact?
If the answer is an integer (like 5), it is exact. If it is irrational (like √2), it is displayed as a rounded decimal (1.4142).