Hypotenuse Calculator (Pythagorean Theorem)
Type the two legs of a right triangle to get the hypotenuse…
Type the two legs of a right triangle to get the hypotenuse, as an exact square root and a decimal, or the hypotenuse and one leg to get the other.
Angle C
90° (the right angle)
Legs a and b meet at the right angle; c, the hypotenuse, is opposite it.
More optionsNo length unit
Length unit
A label for the answers; the maths is the same in any unit.
ExampleHypotenuse c
8.6023
Exactly √74. From c² = a² + b² = 74.
Type your own values, or drag a corner.
Drag the handle on B to change leg a, or on A to change leg b; the right angle stays at C.
| Side | Opposite angle |
|---|---|
| a = 5given | A = 35.538° |
| b = 7given | B = 54.462° |
| c = 8.6023exactly √74 | C = 90°exactly 90° = π/2 rad |
Area 17.5Perimeter 12 + √74 ≈ 20.6023
Area, perimeter, heights and circlesEvery other measurement of this triangle
| Area | 17.5 square units |
|---|---|
| Perimeter | 12 + √74 ≈ 20.6023 |
| Height to side a | 7 |
| Height to side b | 5 |
| Height to side c | 4.0687 |
| Inradius (inscribed circle) | 1.6988 |
| Circumradius (circle through the corners) | 4.3012 |
| Angles in radians | A 0.6202, B 0.9505, C 1.5708 |
How this works: 6 sources,
How this works
Method
Square each leg, add the squares and take the square root: c = √(a² + b²). That is the Pythagorean theorem, true for every right triangle and for no other. Legs of 9 and 12 give √(81 + 144) = √225 = 15. Full method
Sources
How it’s tested
2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Privacy
On your device. Nothing you enter or open leaves this browser. About privacy labels
Changes
- First published: any three values, both triangles in the ambiguous case, exact answers, worked steps, a drawing you can drag and seven focused pages.
How to find the hypotenuse
Square each leg, add the squares and take the square root: c = √(a² + b²). That is the Pythagorean theorem, true for every right triangle and for no other. Legs of 9 and 12 give √(81 + 144) = √225 = 15.
Most pairs of legs don’t come out whole, and then the exact answer is a square root. Legs of 5 and 7 give √74, which is about 8.6023; the calculator also simplifies roots that hide a square, so legs of 4 and 8 give √80 = 4√5. A TV that is 48 inches wide and 27 inches tall has a diagonal of √(2304 + 729) = √3033 ≈ 55.07 inches, which is why it is sold as a 55-inch set.
To go the other way, from the hypotenuse to a missing leg, subtract instead of add: b = √(c² − a²). A 13 ft ladder whose foot is 5 ft from the wall reaches √(169 − 25) = √144 = 12 ft up it. Whole-number solutions like 3-4-5, 5-12-13 and 8-15-17 are called Pythagorean triples.
c = √(a² + b²) · a = √(c² − b²)
- The theorem is Proposition 47 of Book I of Euclid’s Elements: the square on the hypotenuse equals the squares on the other two sides. Source: Euclid’s Elements, Book I, Proposition 47 (D. E. Joyce’s edition).
- A Babylonian clay tablet, Plimpton 322, lists Pythagorean triples about 1,200 years before Pythagoras; it is dated to around 1800 BC. Source: Wikipedia, Plimpton 322.
- US grade 8 standards ask students to apply the Pythagorean theorem to find unknown sides in two and three dimensions (8.G.B.7). Source: Common Core State Standards, Grade 8 Geometry (8.G.B.7, 8.G.B.8).
Hypotenuse for common pairs of legs
The hypotenuse for each pair of legs, as an exact square root and a decimal; whole-number rows are Pythagorean triples.
| Legs a and b | a² + b² | Hypotenuse c | Decimal |
|---|---|---|---|
| 1 and 1 | 2 | √2 | 1.4142 |
| 1 and 2 | 5 | √5 | 2.2361 |
| 2 and 3 | 13 | √13 | 3.6056 |
| 3 and 4 | 25 | 5 | 5 |
| 4 and 8 | 80 | 4√5 | 8.9443 |
| 5 and 7 | 74 | √74 | 8.6023 |
| 5 and 12 | 169 | 13 | 13 |
| 6 and 8 | 100 | 10 | 10 |
| 7 and 24 | 625 | 25 | 25 |
| 8 and 15 | 289 | 17 | 17 |
Show all 15 rowsShow fewer
| 9 and 12 | 225 | 15 | 15 |
| 9 and 40 | 1681 | 41 | 41 |
| 12 and 35 | 1369 | 37 | 37 |
| 20 and 21 | 841 | 29 | 29 |
| 48 and 27 | 3033 | 3√337 | 55.0727 |
Common questions
Does a² + b² = c² work for any triangle?
Only for right triangles. For any other triangle the law of cosines adds a correction term: c² = a² + b² − 2ab·cos C, which shrinks to Pythagoras when C is 90° because cos 90° = 0.
How do I check whether a triangle is a right triangle?
Square the longest side and compare it with the sum of the squares of the other two. 7, 24, 25: 49 + 576 = 625 = 25², so it is right. If the square of the longest side is bigger, the triangle is obtuse; if smaller, acute.
Why is the answer a square root?
Because c² is what the theorem gives, and most whole numbers are not perfect squares. √74 can’t be simplified (74 = 2 × 37 has no square factor), but √80 = √(16 × 5) = 4√5 can.