What This Calculator Does
The Hypotenuse Calculator finds the longest side of a right triangle — the side opposite the 90° angle — using the two shorter sides (the legs). You enter Side A and Side B, and the tool instantly returns the hypotenuse. As a bonus, it also computes the two non-right angles and the area of the triangle, so a single entry gives you a complete picture of the right triangle.
The Formula
The calculation is based on the Pythagorean theorem:
c = √(a² + b²)
Here a and b are the two legs you enter, and c is the hypotenuse. The calculator also works out:
- Angle A = atan2(a, b) in degrees — the angle adjacent to Side B.
- Angle B = atan2(b, a) in degrees — the angle adjacent to Side A.
- Area = (a × b) ÷ 2.
Because the two legs meet at the right angle, multiplying them and halving gives the triangle's area directly, and the two computed angles always add up to 90°.
How to Use It
- Enter the length of Side A (one leg).
- Enter the length of Side B (the other leg).
- Read off the hypotenuse, the two angles, and the area.
Use any consistent unit — centimetres, metres, inches or feet. The result is returned in the same unit you typed in.
Worked Example
Suppose Side A = 3 and Side B = 4.
- Hypotenuse: c = √(3² + 4²) = √(9 + 16) = √25 = 5.
- Angle A: atan2(3, 4) ≈ 36.87°.
- Angle B: atan2(4, 3) ≈ 53.13°.
- Area: (3 × 4) ÷ 2 = 6.
This is the classic 3-4-5 right triangle.
Common Pythagorean Triples
A Pythagorean triple is a set of three positive integers \(a\), \(b\) and \(c\) that satisfy \(a^2 + b^2 = c^2\), so the hypotenuse comes out to a whole number. The six "primitive" triples below are the smallest of their families; every whole-number multiple (2×, 3×, …) of a triple is also a valid triple. Recognizing these can let you find a hypotenuse by inspection instead of a full square-root calculation.
| Primitive triple (a-b-c) | Leg a | Leg b | Hypotenuse c | ×2 multiple | ×3 multiple |
|---|---|---|---|---|---|
| 3-4-5 | 3 | 4 | 5 | 6-8-10 | 9-12-15 |
| 5-12-13 | 5 | 12 | 13 | 10-24-26 | 15-36-39 |
| 8-15-17 | 8 | 15 | 17 | 16-30-34 | 24-45-51 |
| 7-24-25 | 7 | 24 | 25 | 14-48-50 | 21-72-75 |
| 9-40-41 | 9 | 40 | 41 | 18-80-82 | 27-120-123 |
| 20-21-29 | 20 | 21 | 29 | 40-42-58 | 60-63-87 |
Check any row with the formula: for 8-15-17, \(8^2 + 15^2 = 64 + 225 = 289 = 17^2\); for 20-21-29, \(20^2 + 21^2 = 400 + 441 = 841 = 29^2\).
More Worked Examples
Each example uses \(c = \sqrt{a^2 + b^2}\) for the hypotenuse, the area \(A = \tfrac{1}{2}ab\), and the two acute angles from \(\alpha = \arctan\!\left(\tfrac{a}{b}\right)\) and \(\beta = 90^\circ - \alpha\) (the angle opposite leg \(a\) and the angle opposite leg \(b\)).
Example 1 — an exact triple: a = 5, b = 12
$$c = \sqrt{5^2 + 12^2} = \sqrt{25 + 144} = \sqrt{169} = 13$$
- Hypotenuse: 13
- Angle opposite \(a\): \(\alpha = \arctan(5/12) \approx 22.62^\circ\)
- Angle opposite \(b\): \(\beta = 90^\circ - 22.62^\circ \approx 67.38^\circ\)
- Area: \(A = \tfrac{1}{2}(5)(12) = 30\) square units
Example 2 — a non-integer result: a = 6, b = 8
$$c = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10$$
- Hypotenuse: 10 (this is the 3-4-5 triple scaled by 2)
- Angle opposite \(a\): \(\alpha = \arctan(6/8) \approx 36.87^\circ\)
- Angle opposite \(b\): \(\beta = 90^\circ - 36.87^\circ \approx 53.13^\circ\)
- Area: \(A = \tfrac{1}{2}(6)(8) = 24\) square units
Example 3 — a decimal case: a = 2.5, b = 6
$$c = \sqrt{2.5^2 + 6^2} = \sqrt{6.25 + 36} = \sqrt{42.25} = 6.5$$
- Hypotenuse: 6.5
- Angle opposite \(a\): \(\alpha = \arctan(2.5/6) \approx 22.62^\circ\)
- Angle opposite \(b\): \(\beta = 90^\circ - 22.62^\circ \approx 67.38^\circ\)
- Area: \(A = \tfrac{1}{2}(2.5)(6) = 7.5\) square units
Notice that Examples 1 and 3 share the same angles: multiplying both legs by the same factor (here ×0.5) produces a similar triangle with identical angles but a proportionally smaller hypotenuse and area.
FAQ
Does it matter which leg is A and which is B? No. The hypotenuse and area are the same either way; only the labelling of Angle A and Angle B swaps.
Can I find a missing leg instead? This tool needs two legs to find the hypotenuse. To find a missing leg from the hypotenuse, rearrange: a = √(c² − b²).
Why are the angles given? A right triangle is fully defined by its two legs, so the calculator can derive the remaining two angles and the area at no extra effort, saving you separate trigonometry steps.