Hypotenuse Calculator – Pythagorean Theorem
Enter any two sides of a right triangle (legs a and b, or the hypotenuse c) and this calculator instantly finds the missing side, plus the area and perimeter.
Find the Missing Side of a Right Triangle
Pythagorean Theorem Formula
Where:
- \(a\) — first leg of the right triangle (one of the two sides that form the right angle)
- \(b\) — second leg of the right triangle
- \(c\) — hypotenuse, the side opposite the right angle and always the longest side
The first equation is the Pythagorean theorem itself: in any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. The other three equations are simply rearranged to solve for whichever side is missing.
Pythagorean Theorem – Calculation Example
Example: a right triangle has leg \(a = 3\) cm and leg \(b = 4\) cm. Find the hypotenuse.
\[ c = \sqrt{a^2 + b^2} = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5 \]
Result: the hypotenuse is \(c = 5\) cm. The calculator also reports the area \(\frac{1}{2} \cdot 3 \cdot 4 = 6\) cm² and the perimeter \(3 + 4 + 5 = 12\) cm.
How to Use the Calculator
- Enter the known sides into the fields Leg a, Leg b and Hypotenuse c. Leave exactly one of the three fields empty — that is the side the calculator will find.
- Pick the Unit (cm, m, in or ft) that applies to all sides and results.
- Read the Missing Side value, along with the Triangle Area, Perimeter and step-by-step solution.
If you give the two legs, the calculator solves for the hypotenuse. If you give the hypotenuse and one leg, it solves for the other leg and checks that the hypotenuse is actually longer than the leg you entered.
What Is the Pythagorean Theorem?
The Pythagorean theorem states that in a right triangle — a triangle with one 90° angle — the square of the hypotenuse equals the sum of the squares of the two legs. It is one of the oldest and most used results in geometry, attributed to the Greek mathematician Pythagoras around 500 BC, although versions of it were known earlier in Babylon and Egypt.
The theorem only holds for right triangles, and the hypotenuse is always the side opposite the right angle. This gives a quick way to check whether a triangle is right-angled: if the three sides satisfy \(a^2 + b^2 = c^2\), the angle between legs \(a\) and \(b\) must be 90°. Carpenters and builders use exactly this test, often with the 3-4-5 triangle, to lay out square corners.
Beyond geometry, the theorem is the foundation of the distance formula in coordinate geometry: the distance between two points is the hypotenuse of a right triangle whose legs are the differences in their coordinates. The same idea — combining quantities by squaring, adding and taking the square root — appears in the quadratic mean (root mean square), which is how effective voltage and other averaged quantities are computed.
Common Pythagorean Triples
A Pythagorean triple is a set of three whole numbers that satisfies the theorem. Because the sides are integers, these triangles are handy for quick checks and construction layouts.
| Leg a | Leg b | Hypotenuse c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 8 | 15 | 17 |
| 7 | 24 | 25 |
| 9 | 40 | 41 |
Any multiple of a triple is also a triple: 6-8-10 and 9-12-15 are just the 3-4-5 triangle scaled up.
Limitations and Tips
- Right triangles only. The formula does not work for obtuse or acute triangles; for those you need the law of cosines.
- The hypotenuse must be the longest side. If you enter a hypotenuse that is shorter than or equal to a given leg, the calculator returns an error, because no right triangle can have those measurements.
- Use the same unit for all sides. Convert everything to a single unit (the one you pick in the Unit field) before entering the values.
- Results are rounded to three decimals. The missing side often involves a square root; if you need the root of a specific number directly, the Nth Root calculator can compute it.
- Sanity-check your input. The hypotenuse should always be greater than either leg but less than their sum — otherwise the values cannot form a triangle at all.
Frequently Asked Questions
How do I calculate the hypotenuse by hand without a calculator?
Square both legs, add the results, and take the square root. For legs 5 and 12: \(5^2 + 12^2 = 25 + 144 = 169\), and \(\sqrt{169} = 13\). If the sum under the root is not a perfect square, estimate the root or leave the answer in radical form, e.g. \(\sqrt{20} = 2\sqrt{5}\). The calculator does this instantly and rounds to three decimals.
Can I use the Pythagorean theorem to find a missing leg?
Yes. If you know the hypotenuse \(c\) and one leg \(a\), the other leg is \(b = \sqrt{c^2 - a^2}\). Subtract the square of the known leg from the square of the hypotenuse, then take the square root. Remember that the hypotenuse must be the longest side — if \(c\) is not longer than \(a\), no right triangle with those measurements exists.
Does the theorem work if I enter the sides in a different order?
The two legs are interchangeable, so swapping \(a\) and \(b\) changes nothing. The hypotenuse is different: it must always go in the Hypotenuse c field, because it plays a unique role in the formula. A common mistake is entering the longest side as a leg, which produces a wrong (too large) hypotenuse or an invalid result.
What are common mistakes when using the Pythagorean formula?
The most frequent errors are mixing units (e.g. one side in inches, another in feet), using the theorem on a non-right triangle, and plugging the hypotenuse into a leg field. Also watch the order of operations when solving by hand: \(c^2 - a^2\) means square first, then subtract — not \((c - a)^2\). Always check that the hypotenuse came out longer than both legs.
How do I convert the result between cm, m, inches and feet?
The calculator keeps everything in the unit you pick, so convert before entering if your inputs differ. Useful factors: 1 m = 100 cm, 1 ft = 12 in, 1 in = 2.54 cm, 1 ft = 30.48 cm. Note that converting the result is easier than converting all inputs: for example, a hypotenuse of 5 in equals \(5 \times 2.54 = 12.7\) cm.
Can this calculator check whether a triangle is right-angled?
Indirectly, yes. If all three sides are whole numbers or known values, test whether \(a^2 + b^2\) equals \(c^2\), where \(c\) is the longest side. If the two sides match, the triangle has a 90° angle between the two shorter sides. This is the same test builders use with a 3-4-5 triangle to square up corners — if the numbers check out, the corner is square.
Is there a formula for triangles without a right angle?
Yes — the law of cosines, \(c^2 = a^2 + b^2 - 2ab\cos(C)\), works for any triangle. When the angle \(C\) between the two known sides is 90°, \(\cos(90°) = 0\) and the law of cosines reduces exactly to the Pythagorean theorem. So if your triangle is obtuse or acute, use the law of cosines instead; the Pythagorean formula will give incorrect results there.