Pythagorean Theorem Calculator
Last updated:
How to Use This Calculator
Step 1: Choose what to solve for — the hypotenuse c, or one of the legs a or b.
Step 2: Enter the two known side lengths.
Step 3: Click Calculate to see the missing side along with the triangle's area and perimeter.
What Is the Pythagorean Theorem?
The Pythagorean theorem states that 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. It applies only to right triangles — triangles with one 90-degree angle.
It is one of the oldest and most important theorems in mathematics, attributed to the ancient Greek mathematician Pythagoras (around 500 BCE), though the relationship was known in Babylonian and Indian mathematics centuries earlier.
The theorem is used constantly in construction, navigation, physics, computer graphics, and any problem involving distance in two dimensions.
The Pythagorean Formula
a² + b² = c²
Where a and b are the two legs (shorter sides) and c is the hypotenuse (longest side, opposite the right angle).
Solving for c: c = √(a² + b²)
Solving for a: a = √(c² − b²)
Solving for b: b = √(c² − a²)
Example: a = 3, b = 4
c² = 9 + 16 = 25
c = √25 = 5 (classic 3-4-5 triangle)
Common Pythagorean Triples
| a | b | c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 9 | 40 | 41 |
| 20 | 21 | 29 |
Examples
Example 1: Legs 3 and 4 → hypotenuse 5 (the famous 3-4-5 triangle used by builders to square corners).
Example 2: Hypotenuse 13, leg 5 → other leg is 12 (Pythagorean triple 5-12-13).
Example 3: Legs 1 and 1 → hypotenuse √2 ≈ 1.414 (diagonal of a unit square).
Tips
Right triangles only. The theorem fails for non-right triangles.
c is always the longest side — across from the right angle.
Pythagorean triples are whole-number solutions like 3-4-5 and 5-12-13.
Distance formula in coordinate geometry is just the Pythagorean theorem with (x₂−x₁) and (y₂−y₁) as legs.
Frequently Asked Questions
Does the Pythagorean theorem work for non-right triangles?
Which side is the hypotenuse?
What are Pythagorean triples?
How is the Pythagorean theorem used in real life?
What happens if I enter values that do not form a valid right triangle?
Is there a 3D version of the Pythagorean theorem?
Related Calculators
Slope Calculator
Free slope calculator. Find slope, y-intercept, equation, angle, ...
Triangle Calculator
Free triangle calculator. Solve any triangle from any 3 values (S...
Circle Calculator
Free circle calculator. Find radius, diameter, circumference, and...
Random Number Generator
Free random number generator. Generate one or multiple random int...