Pythagorean Theorem Calculator

Find the hypotenuse or missing leg of any right triangle using a² + b² = c².

📐 Pythagorean Theorem Calculator
Hypotenuse c
-

📖 What is the Pythagorean Theorem?

The Pythagorean theorem is one of the most famous and widely used theorems in mathematics. It states that in any right triangle, the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the lengths of the other two sides, called legs.

Written as an equation: a² + b² = c², where c is always the hypotenuse - the longest side of the right triangle.

Named after the ancient Greek mathematician Pythagoras (though known to many civilisations before him), this theorem is fundamental to geometry, trigonometry, physics, and engineering. It appears in distance calculations in coordinate geometry (the distance between two points), navigation (finding the straight-line distance between GPS coordinates), construction (ensuring walls and corners are perfectly square using the 3-4-5 rule), and computer graphics.

The theorem only applies to right triangles. For triangles without a 90° angle, the law of cosines is used instead: c² = a² + b² - 2ab·cos(C).

📐 Formula

a² + b² = c²
Find hypotenuse: c = √(a² + b²)
Find leg a: a = √(c² - b²)
Find leg b: b = √(c² - a²)

Where c is the hypotenuse (longest side) and a, b are the two legs.

📖 How to Use This Calculator

1
Select whether you want to find the hypotenuse or a missing leg.
2
Enter the two known side lengths.
3
Click Calculate - the missing side and a verification equation are shown.

💡 Example Calculations

Example 1 - Classic 3-4-5 triple

1
Legs: a = 3, b = 4
2
c = √(3² + 4²) = √(9 + 16) = √25 = 5
3
Verification: 3² + 4² = 9 + 16 = 25 = 5² ✓
Try this example →

Example 2 - Construction application

1
You're building a rectangular garden 6 m × 8 m and want to verify a diagonal corner brace length.
2
Diagonal = √(6² + 8²) = √(36 + 64) = √100 = 10 m
Try this example →

Example 3 - Finding a leg

1
A ladder 10 m long leans against a wall, with its base 4 m from the wall. How high does it reach?
2
Height = √(10² - 4²) = √(100 - 16) = √84 = 9.165 m
Try this example →

Frequently Asked Questions

What is the Pythagorean theorem?+
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides. Written as: a² + b² = c², where c is the hypotenuse.
How do I find the hypotenuse?+
If you know both legs (a and b), use: c = √(a² + b²). For example, if a = 3 and b = 4, then c = √(9 + 16) = √25 = 5.
How do I find a missing leg?+
If you know the hypotenuse c and one leg a, use: b = √(c² − a²). For example, if c = 13 and a = 5, then b = √(169 − 25) = √144 = 12.
What is a Pythagorean triple?+
A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a² + b² = c². Common examples: (3, 4, 5), (5, 12, 13), (8, 15, 17). Any multiple of a triple is also a triple: (6, 8, 10), (9, 12, 15), etc.
Does the Pythagorean theorem work in 3D?+
Yes - for 3D, the diagonal d of a rectangular box with dimensions l, w, h is: d = √(l² + w² + h²). This is derived by applying the theorem twice: first to find the diagonal of the base, then using that as a leg with the height.
How do I generate Pythagorean triples?+
Any two positive integers m > n generate a Pythagorean triple using Euclid's formula: a = m² − n², b = 2mn, c = m² + n². Example: m=2, n=1 → a=3, b=4, c=5. m=3, n=2 → a=5, b=12, c=13. m=4, n=1 → a=15, b=8, c=17. Primitive triples (with no common factor) require m and n to be coprime with opposite parity (one odd, one even).
How is the Pythagorean theorem used in real life?+
The Pythagorean theorem has countless practical applications: in construction to verify square corners (using the 3-4-5 method), in navigation to calculate straight-line distance between two GPS coordinates, in architecture for roof pitch calculations, in engineering for stress and force calculations, and in computer graphics for calculating distances between pixels. It also underlies the distance formula in coordinate geometry, making it fundamental to all of Euclidean geometry and its applications.
What is the converse of the Pythagorean theorem?+
The converse states: if a² + b² = c² for the sides of a triangle, then the triangle has a right angle opposite side c. This is used in construction and surveying to verify right angles: a triangle with sides 3, 4, and 5 metres must contain a 90° angle because 9 + 16 = 25. Similarly, if a² + b² < c², the triangle is obtuse; if a² + b² > c², the triangle is acute.
What are the most common Pythagorean triples?+
Pythagorean triples are integer sets (a, b, c) where a squared + b squared = c squared. Most common: 3-4-5, 5-12-13, 8-15-17, 7-24-25. Any multiple also works: 6-8-10, 9-12-15. The 3-4-5 triangle is used constantly in construction to verify right angles - measure 3 units on one side, 4 on the other; if the diagonal is exactly 5, you have a true right angle.