Mathematics · Updated 2026

Pythagorean Theorem Calculator

Find any side of a right triangle. Enter any two sides and calculate the third using a² + b² = c². Step-by-step solution, Pythagorean triples, all angles shown.

Find Any Side
Step-by-Step Solution
All Angles Shown
Pythagorean Triples
Ad · 728x90
a²+b²
Pythagorean Theorem
a² + b² = c² · Enter any two sides
a b c leg a leg b hypotenuse 90°
Side a (leg)
Side b (leg)
Side c (hyp.)
Common Pythagorean Triples — click to load
3·4·5
Classic
5·12·13
Common
8·15·17
Classic
7·24·25
Classic
20·21·29
Classic
9·40·41
Classic
6·8·10
Scaled
10·24·26
Scaled

Enter any two sides of the right triangle to calculate the missing one.

Ad · 300x250

The Pythagorean Theorem Explained

In any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The hypotenuse (c) is always the longest side and always sits opposite the 90° angle.

Known to Babylonian mathematicians 3,000 years ago, the theorem is named after Pythagoras (570–495 BC), who is credited with its first formal proof. It is arguably the most used theorem in all of mathematics.

Finding the Hypotenuse
c = √(a² + b²). With legs 3 and 4: c = √(9+16) = √25 = 5. The result is always positive and always larger than either leg.
Finding a Leg
a = √(c² − b²). With c=13 and b=12: a = √(169−144) = √25 = 5. The hypotenuse must be larger than either leg.
Pythagorean Triples
Integer solutions: 3-4-5, 5-12-13, 8-15-17. Any multiple of a triple is also a triple. Used in construction to create perfect 90° angles.
Real-World Uses
Architecture, navigation, surveying, screen diagonal sizes, GPS distance calculation, and game physics all rely on the Pythagorean theorem daily.
Ad · 300x600
Ad · 728x90
Pythagorean Theorem Questions
What is the Pythagorean theorem?+
The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The hypotenuse (c) is the longest side, always opposite the right angle (90°). Pythagoras of Samos (570–495 BC) is credited with the first formal proof, though the relationship was known to Babylonians, Egyptians, and Chinese mathematicians centuries earlier. It is one of the most proved theorems in mathematics, with over 370 known proofs.
How do I find the hypotenuse of a right triangle?+
Use c = √(a² + b²). Step-by-step: (1) Square both legs: a² and b². (2) Add them: a² + b². (3) Take the square root of the sum. Example: legs 6 and 8. c = √(36 + 64) = √100 = 10. The hypotenuse is always the longest side and is always greater than either leg but less than their sum. If c ≥ a + b, you have made an error.
How do I find a leg when I know the hypotenuse?+
Rearrange the formula: a = √(c² − b²). The hypotenuse (c) must be greater than the known leg (b). Example: c = 13, b = 12. a = √(169 − 144) = √25 = 5. If c ≤ b, the values are invalid — no such right triangle can exist. This is how GPS systems calculate distances: measuring horizontal and vertical components then applying the theorem to find actual distance.
What is a Pythagorean triple?+
A Pythagorean triple is a set of three positive integers (a, b, c) satisfying a² + b² = c². The simplest is 3-4-5 (9+16=25). Multiples of any triple also form triples: 6-8-10, 9-12-15, 12-16-20. Other primitive triples (not multiples of smaller ones): 5-12-13, 8-15-17, 7-24-25, 20-21-29. Euclid gave a formula for generating all primitives: a = m²−n², b = 2mn, c = m²+n² for integers m > n > 0.
How is the Pythagorean theorem used in real life?+
Construction: builders use 3-4-5 triangles to verify right angles. Architecture: calculating roof slopes, staircase dimensions, and ramp gradients. Navigation: calculating straight-line distance from east-west and north-south components. Screen sizes: a TV described as "65 inches" refers to the diagonal, calculated using the theorem from width and height. Game physics: calculating distances between objects. GPS: computing distances between coordinates. Basically any time you need to find the straight-line distance between two points in a flat plane.
Does the Pythagorean theorem work for all triangles?+
Only for right triangles (those with exactly one 90° angle). For other triangles: if a² + b² > c², the angle opposite c is acute (less than 90°). If a² + b² < c², the angle is obtuse (greater than 90°). For any triangle (not just right), the generalized law of cosines applies: c² = a² + b² − 2ab×cos(C), which reduces to a² + b² = c² when C = 90° (since cos(90°) = 0).
What is the 3-4-5 rule in construction?+
The 3-4-5 rule is a practical application of the Pythagorean theorem for creating perfect 90° angles on building sites. Measure 3 units along one wall, 4 units along the adjacent wall. If the diagonal distance between those two endpoints is exactly 5 units, the angle is a perfect right angle. Any scale works: 30cm-40cm-50cm, or 3ft-4ft-5ft, or 6m-8m-10m. This method has been used since ancient Egypt — construction workers who knew and used this trick were called "rope stretchers."
How do I calculate the angles of a right triangle?+
In a right triangle, one angle is always 90°. The other two angles (A and B) are complementary (they add to 90°). Using trigonometry: angle A = arctan(a/b) = arcsin(a/c) = arccos(b/c). Angle B = 90° − A. Example: legs a=3, b=4, hypotenuse c=5. Angle A = arctan(3/4) ≈ 36.87°. Angle B = 90° − 36.87° = 53.13°. This calculator shows all angles in the results panel.
How do I find the area and perimeter of a right triangle?+
Area = ½ × a × b (the two legs are the base and height, since they meet at 90°). Example: legs 3 and 4. Area = ½ × 3 × 4 = 6 square units. Perimeter = a + b + c. Example: 3 + 4 + 5 = 12 units. Note: for the area formula, always use the two legs (the sides adjacent to the right angle), not the hypotenuse. The hypotenuse is only the base of a right triangle when the triangle is positioned differently.
What is the converse of the Pythagorean theorem?+
The converse states: if a² + b² = c² for a triangle with sides a, b, c, then the triangle is a right triangle with the right angle opposite side c. This allows you to verify right angles without a protractor. Example: do sides 5, 12, and 13 form a right triangle? 5² + 12² = 25 + 144 = 169 = 13². Yes. Do sides 5, 6, 7 form a right triangle? 5² + 6² = 25 + 36 = 61 ≠ 49 = 7². No, it is a non-right (scalene) triangle.