Pythagorean Theorem Calculator
Enter any two sides of a right triangle and instantly find the missing side, area, perimeter, and all angles using a² + b² = c².
Last updated: March 2026
The Pythagorean Theorem Explained
The Pythagorean theorem is one of the oldest and most useful results in all of mathematics. For any right triangle with legs a and b and hypotenuse c (the side opposite the right angle):
a² + b² = c²
The theorem means that the area of the square drawn on the hypotenuse equals the combined area of the squares drawn on the two legs. This is not just an algebraic fact — it has a beautiful geometric interpretation that has inspired hundreds of proofs.
Finding Each Side
- Find hypotenuse c: c = √(a² + b²)
- Find leg a: a = √(c² − b²)
- Find leg b: b = √(c² − a²)
Remember: the hypotenuse is always the longest side. If your calculated hypotenuse is shorter than a leg, check your inputs.
Pythagorean Triples
Pythagorean triples are sets of three positive integers that satisfy a² + b² = c². They are useful in construction and problem-solving because all three sides are whole numbers:
- 3-4-5 — the most famous triple. Any multiple works: 6-8-10, 9-12-15, 15-20-25.
- 5-12-13 — 25 + 144 = 169. ✓
- 8-15-17 — 64 + 225 = 289. ✓
- 7-24-25 — 49 + 576 = 625. ✓
- 20-21-29 — 400 + 441 = 841. ✓
A formula to generate all primitive triples: for integers m > n > 0 with m − n odd and gcd(m,n) = 1: a = m² − n², b = 2mn, c = m² + n².
Visual and Algebraic Proofs
The Square Proof
Arrange four identical right triangles (legs a, b; hypotenuse c) inside a large square of side (a + b). The remaining space is a square of side c, so c² = (a+b)² − 4 × (ab/2) = a² + 2ab + b² − 2ab = a² + b².
Garfield's Trapezoid Proof (1876)
President James Garfield arranged two right triangles and a third isosceles right triangle into a trapezoid. Equating the trapezoid area formula with the sum of the triangle areas yields a² + b² = c².
Rearrangement Proof
Take a square of side c and rearrange four copies of the right triangle. The inner square has side (a − b) or (b − a), and expanding the equation proves the theorem geometrically.
Applications: Where the Pythagorean Theorem Shows Up
- Construction: The 3-4-5 rule has been used since ancient Egypt to lay out right angles. Modern builders still use it for framing corners.
- Navigation: Calculating the straight-line distance between two GPS coordinates (approximately, over short distances).
- Computer graphics: Calculating distances between pixels, sprite positions, collision detection in games.
- Physics: Resolving vector components — the magnitude of a 2D vector is √(x² + y²).
- Architecture: Calculating rafter lengths, staircase rises and runs, and structural diagonal bracing.
- 3D geometry: The space diagonal of a box with dimensions l, w, h is √(l² + w² + h²) — a 3D extension of the theorem.
The History of the Pythagorean Theorem
While Pythagoras (c. 570–495 BCE) is credited with the first proof, the relationship was known long before him. The Babylonian clay tablet Plimpton 322 (c. 1800 BCE) lists 15 Pythagorean triples with extraordinary accuracy. Indian mathematicians in the Sulba Sutras (c. 800–600 BCE) knew the result for squares. Chinese mathematicians documented it in the Zhoubi Suanjing (c. 100 BCE).
Pythagoras founded a mathematical brotherhood that proved the theorem in general — not just for specific triples. His school also demonstrated that √2 is irrational, a discovery that follows directly from the theorem applied to a unit square.
In 2023, high school students Ne'Kiya Jackson and Calcea Johnson presented a new trigonometric proof — the first of its kind that avoids circular reasoning — at the American Mathematical Society.
How to Apply the Theorem If...
How to use the Pythagorean theorem with a = 3, b = 4?
c = √(3² + 4²) = √(9 + 16) = √25 = 5. The 3-4-5 triple is the most recognizable right triangle.
How to use the Pythagorean theorem with a = 5, b = 12?
c = √(25 + 144) = √169 = 13. The 5-12-13 triple.
How to find leg a if c = 10 and b = 6?
a = √(100 − 36) = √64 = 8. Rearrange: a² = c² − b².
How to find the hypotenuse of a 45-45-90 triangle with leg 7?
c = √(7² + 7²) = √98 = 7√2 ≈ 9.899. In 45-45-90 triangles, c = leg × √2.
How to find the space diagonal of a 3 × 4 × 12 box?
d = √(3² + 4² + 12²) = √(9 + 16 + 144) = √169 = 13. Apply the theorem twice, or use the 3D formula directly.
How to check if 7, 24, 25 is a right triangle?
7² + 24² = 49 + 576 = 625 = 25². Yes, it is a right triangle. Always put the largest side as c.
How to find the height of an equilateral triangle with side 6?
Bisect the base: you get a right triangle with hypotenuse 6 and one leg 3. Height = √(6² − 3²) = √(36 − 9) = √27 = 3√3 ≈ 5.196.
How to find the diagonal of a square with side 10?
d = √(10² + 10²) = √200 = 10√2 ≈ 14.142.
People Also Search For
What is the Pythagorean theorem formula?
a² + b² = c², where a and b are the legs and c is the hypotenuse. To find c: c = √(a² + b²). To find a leg: a = √(c² − b²).
What are common Pythagorean triples to memorize?
The most useful are 3-4-5, 5-12-13, 8-15-17, and 7-24-25. Memorizing these speeds up mental math for right triangle problems considerably.
How is the Pythagorean theorem used in real life?
It is used in construction (squaring corners), navigation (straight-line distance), engineering (vector magnitude), and computer graphics (pixel distance). Any time you need the diagonal of a rectangle, you are using the Pythagorean theorem.
What is the distance formula and how is it related to the theorem?
The distance formula d = √((x₂−x₁)² + (y₂−y₁)²) is the Pythagorean theorem applied to coordinate geometry. The horizontal and vertical differences are the legs; the straight-line distance is the hypotenuse.
Does the Pythagorean theorem work in 3D?
Yes, extended to 3D: d = √(x² + y² + z²) for distance from the origin, or d = √(Δx² + Δy² + Δz²) for distance between two points. You apply the 2D theorem twice.
What is the converse of the Pythagorean theorem?
If a² + b² = c², then the triangle is a right triangle. You can test any three lengths: compute a² + b² and compare to c². Equal = right; greater = acute; less = obtuse.
Frequently Asked Questions
What is the Pythagorean theorem?
a² + b² = c², where a and b are the legs (shorter sides) and c is the hypotenuse (the side opposite the right angle). It holds for all right triangles.
What is the hypotenuse for a = 3, b = 4?
c = √(9 + 16) = √25 = 5. The 3-4-5 right triangle is the smallest Pythagorean triple.
What are Pythagorean triples?
Integer sets (a, b, c) where a² + b² = c². Examples: 3-4-5, 5-12-13, 8-15-17, 7-24-25. Any multiple of a triple is also a triple (e.g., 6-8-10).
Can the Pythagorean theorem be used for any triangle?
No — only right triangles (those with exactly one 90° angle). For other triangles, use the Law of Cosines: c² = a² + b² − 2ab·cos(C).
What is the converse of the Pythagorean theorem?
If a² + b² = c², the triangle is a right triangle. If a² + b² > c², it is acute. If a² + b² < c², it is obtuse.
What is the 3D Pythagorean theorem?
The space diagonal of a box or the distance between two 3D points: d = √(x² + y² + z²). It extends the 2D formula by adding a third squared term.
Who proved the Pythagorean theorem?
Pythagoras of Samos (c. 570–495 BCE) is credited with the first general proof. However, the relationship was known to Babylonian, Indian, and Chinese mathematicians centuries earlier.
How do I verify my three sides form a right triangle?
Check whether a² + b² = c² (using the longest side as c). This calculator's "Right triangle?" result does this check automatically.
What is the area of a right triangle?
Area = (1/2) × leg a × leg b. The two legs form the base and height of the triangle. For a 3-4-5 triangle: area = (1/2) × 3 × 4 = 6 square units.
Is my data stored?
No. All calculations happen in your browser. No data is sent to any server.