Calculate the Hypotenuse from Both Legs
The classic form of the Pythagorean theorem. Use it when both legs of a right triangle are known and you need the length of the hypotenuse — the side opposite the right angle.
c = √(a² + b²)
Calculate Leg a from the Hypotenuse and Leg b
Rearrange the Pythagorean theorem when the hypotenuse and one leg are known. This is the standard 'find the missing leg' problem from geometry class.
a = √(c² − b²)
Calculate Leg b from the Hypotenuse and Leg a
Same rearrangement, with the labels swapped. Use it when the hypotenuse and the first leg are known and you need the second leg.
b = √(c² − a²)
How It Works
The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The theorem only applies to right triangles — triangles with one 90° angle — so the very first step is always to confirm the triangle has a right angle. Pick the unknown with the solve-for toggle, enter the remaining two sides, and the calculator returns the third side using the appropriate rearrangement of c = √(a² + b²).
Example Problem
A right triangle has legs of 3 m and 4 m. Find the length of the hypotenuse.
- Identify the right triangle: legs a = 3 m, b = 4 m, with the right angle between them. The hypotenuse c is the unknown side opposite the right angle.
- Write the Pythagorean theorem: a² + b² = c².
- Substitute the known leg lengths: 3² + 4² = c².
- Compute the squares and add: 9 + 16 = 25, so c² = 25.
- Take the positive square root of both sides: c = √25 = 5 m. (Length is positive, so the negative root is discarded.)
- Verify with the 3-4-5 Pythagorean triple — these three integers satisfy a² + b² = c² exactly, so the answer checks out.
3-4-5 is the smallest Pythagorean triple. Other common triples worth memorizing: 5-12-13, 8-15-17, 7-24-25, and 20-21-29. Any whole-number multiple of a triple (for example 6-8-10 or 9-12-15) is also a triple.
Key Concepts
A right triangle has exactly one 90° angle. The two sides meeting at the right angle are called legs (a and b); the third side — opposite the right angle — is the hypotenuse (c). The hypotenuse is always the longest of the three sides. A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a² + b² = c² exactly — the smallest is 3-4-5. The converse theorem also holds: if the three side lengths of a triangle satisfy a² + b² = c², then the triangle must be a right triangle (with the right angle opposite the longest side). For non-right triangles, the theorem generalizes to the law of cosines: c² = a² + b² − 2ab·cos(C), which reduces to the Pythagorean theorem when angle C is 90°.
Applications
- Carpentry and construction: checking that a corner is square by measuring 3 ft along one wall, 4 ft along the other, and confirming the diagonal between the marks is exactly 5 ft (the 3-4-5 method).
- Navigation and surveying: computing the straight-line (great-circle approximation) distance from north-south and east-west legs of travel.
- Screen and display sizing: a 16-inch (b) by 12-inch (a) monitor has a diagonal of √(16² + 12²) = √400 = 20 inches — the diagonal is how screen size is marketed.
- GPS and 2D distance: distance between two points (x₁, y₁) and (x₂, y₂) is √((x₂−x₁)² + (y₂−y₁)²) — the Pythagorean theorem applied to the coordinate differences.
- Truss and frame design: the diagonal brace of a rectangular frame is the hypotenuse of the right triangle formed by the frame's width and height.
Common Mistakes
- Applying the theorem to a triangle that isn't a right triangle. The Pythagorean theorem only works when one angle is exactly 90°. For general triangles use the law of cosines.
- Misidentifying the hypotenuse. The hypotenuse is always the side opposite the right angle and is always the longest side. If you put the wrong side on the left of a² + b² = c², you'll get the wrong answer.
- Mixing units. All three sides must be expressed in the same unit (all meters, or all feet — never one in meters and another in feet) before applying the formula.
- Forgetting to take the square root. The formula gives c², which has units of area; the final answer needs c, which is a length, so always take √.
- Adding non-squared values. The theorem says a² + b² = c², not a + b = c. Always square first, add, then take the square root.
Frequently Asked Questions
What is the Pythagorean theorem?
The Pythagorean theorem states that in any right triangle, a² + b² = c², where a and b are the lengths of the two legs and c is the length of the hypotenuse (the side opposite the right angle). It was known to ancient Babylonian and Indian mathematicians and is attributed to the Greek mathematician Pythagoras (c. 570–495 BCE).
How do you solve a² + b² = c²?
To solve for c (the hypotenuse), compute c = √(a² + b²). To solve for one of the legs, rearrange: a = √(c² − b²) or b = √(c² − a²). Take only the positive square root because lengths are non-negative.
What is a Pythagorean triple?
A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a² + b² = c² exactly. The smallest is 3-4-5. Other common triples include 5-12-13, 8-15-17, 7-24-25, and 20-21-29. Any whole-number multiple of a triple — like 6-8-10 from 3-4-5 — is also a triple.
How do you find the hypotenuse of a right triangle?
Square both legs, add the squares, then take the square root: c = √(a² + b²). For a triangle with legs 3 and 4, c = √(9 + 16) = √25 = 5.
How do you find a missing leg of a right triangle?
Rearrange the Pythagorean theorem: a = √(c² − b²) or b = √(c² − a²). For example, with a hypotenuse of 13 and one leg of 5, the missing leg is √(169 − 25) = √144 = 12 (the 5-12-13 triple).
Does the Pythagorean theorem work for any triangle?
No — only for right triangles. For non-right triangles, the law of cosines c² = a² + b² − 2ab·cos(C) generalizes it. When C = 90°, cos(C) = 0 and the formula collapses back to a² + b² = c².
What is a 3-4-5 triangle?
A 3-4-5 triangle is a right triangle whose sides have lengths 3, 4, and 5 in some unit (inches, feet, meters, etc.). The integers satisfy 3² + 4² = 9 + 16 = 25 = 5². Carpenters use this triple — usually scaled up to 6-8-10 ft — to verify that a corner is square without a protractor.
Why is the hypotenuse always the longest side?
Because the hypotenuse is opposite the largest angle (the 90° angle), and in any triangle the longest side is opposite the largest angle. Algebraically, c² = a² + b² > a² and c² > b², so c > a and c > b.
Reference: Weisstein, Eric W. "Pythagorean Theorem." MathWorld — A Wolfram Web Resource. https://mathworld.wolfram.com/PythagoreanTheorem.html
Worked Examples
Carpentry
What diagonal brace squares a 3 × 4 ft frame? (the 3-4-5 method)
A carpenter is squaring a corner of a wood frame. Measuring 3 ft along one wall and 4 ft along the other, what diagonal length confirms the corner is exactly 90°?
- Knowns: a = 3 ft, b = 4 ft (legs along the two walls)
- Formula: c = √(a² + b²)
- c = √(9 + 16) = √25 = 5 ft
Diagonal = 5 ft (the 3-4-5 triple)
If the measured diagonal is exactly 5 ft, the corner is square. This 3-4-5 method is how carpenters check square corners without a framing square — usually scaled up to 6-8-10 or 9-12-15 ft for longer walls.
TV / Monitor Sizing
What is the diagonal size of a 36 × 27 inch screen?
A monitor measures 36 inches wide and 27 inches tall (4:3 aspect ratio). Manufacturers market screens by their diagonal — what is it?
- Knowns: a = 27 in, b = 36 in
- Formula: c = √(a² + b²)
- c = √(729 + 1296) = √2025 = 45 in
Diagonal = 45 inches
27-36-45 is the 3-4-5 triple scaled by 9. The 4:3 aspect ratio always yields a clean integer diagonal when the sides match a multiple of 3 and 4.
Geometry / Algebra
A right triangle has a hypotenuse of 13 m and one leg of 5 m. What is the other leg?
Classic 'find the missing leg' problem from geometry class. The 5-12-13 triple is one of the most common Pythagorean triples after 3-4-5.
- Knowns: c = 13 m, b = 5 m
- Rearrange Pythagorean theorem: a = √(c² − b²)
- a = √(169 − 25) = √144 = 12 m
Missing leg = 12 m (5-12-13 triple)
Memorize the common triples — 3-4-5, 5-12-13, 8-15-17, 7-24-25 — and many geometry problems become instant.
The Pythagorean Theorem
In any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs:
Where:
- a, b — the two legs (the sides meeting at the right angle)
- c — the hypotenuse (the longest side, opposite the right angle)
All three sides must be expressed in the same units. The squares drawn in the diagram have area a², b², and c² — and the c² square (on the hypotenuse) always equals the sum of the a² and b² squares (on the legs). This visual proof is the original geometric argument for the theorem.
Related Calculators
- Right Triangle Calculator — compute hypotenuse, area, perimeter, both acute angles, inradius, and circumradius — full right-triangle solver
- General Triangle Calculator — solve any triangle (SSS, SAS, ASA, AAS) using the law of cosines and law of sines — works for non-right triangles too
- Isosceles Triangle Calculator — compute properties for a triangle with two equal sides
- Equilateral Triangle Calculator — side, height, area, and perimeter for a triangle with three equal sides
- Geometric Formulas Calculator — explore area, perimeter, and side formulas for many 2D shapes
Related Sites
- Temperature Tool — Temperature unit converter
- Z-Score Calculator — Z-score, percentile, and probability calculator
- OptionsMath — Options trading profit and loss calculators
- Medical Equations — Hemodynamic, pulmonary, and dosing calculators
- Dollars Per Hour — Weekly paycheck calculator with overtime
- Percent Off Calculator — Discount and sale price calculator