How long is the missing side of a right triangle?
Find the hypotenuse or a leg with a² + b² = c², shown with the squares on each side.
What you enter stays on your device while you use this tool. Opening a shared link sends the settings in its address to HowToolbox to prepare the page.
Hypotenuse c
5
3² + 4² = 9 + 16 = 25, so c = √25 = 5.
Key values as a table
| Side | Length | Square on it |
|---|---|---|
| a | 3 | 9 |
| b | 4 | 16 |
| c | 5 | 25 |
- Area
- 6
- Perimeter
- 12
- Angles
- α 36.8699°, β 53.1301°
- Height to c
- 2.4
- Pythagorean triple
- Yes, primitive
Find the hypotenuse or a leg with a² + b² = c², shown with the squares on each side.
How to use
- Choose the side to find: the hypotenuse c (the longest side, opposite the right angle) or one of the legs a and b.
- Type the two sides you know. Add a unit if you like.
- Read the missing side, the area, the perimeter and the angles. Drag the corners of the triangle to change the legs and watch the squares grow.
How it works
In every right triangle, the square drawn on the longest side has exactly the same area as the squares on the two shorter sides together. That is the Pythagorean theorem, a² + b² = c², where a and b are the legs at the right angle and c is the hypotenuse across from it. The drawing shows it to scale.
So the hypotenuse is c = √(a² + b²), and a leg is a = √(c² − b²). With legs 3 and 4: 3² + 4² = 9 + 16 = 25, so c = √25 = 5. Whole numbers that fit like 3, 4, 5 or 5, 12, 13 are Pythagorean triples; builders use 3-4-5 to check that a corner is square.
The rule holds only for right angles; for other triangles use the law of cosines. A leg needs a hypotenuse longer than the other leg. Results are rounded to six significant digits. Sources: Euclid, Elements I.47; OpenStax Prealgebra 2e, section 9.3.
Worked example
What is the hypotenuse of a right triangle with legs 5 and 12?
- c = √(a² + b²) = √(5² + 12²) = 13.
- Area = ½ · a · b = 30; perimeter = 30.
- The acute angles are 22.62° and 67.38°.
c = 13: a whole-number Pythagorean triple.
Frequently asked questions
Does it matter which short side I call a or b?
No. Swapping the legs leaves the hypotenuse, area and perimeter unchanged. It swaps the labels of the two acute angles.
How do I check that a corner is square?
Measure 3 units along one wall and 4 along the other. If the diagonal between the marks is exactly 5, the corner is 90°. Multiples such as 60, 80 and 100 cm work the same way.
Can the answer be a decimal even if both inputs are whole numbers?
Yes. Most whole-number pairs do not form a Pythagorean triple, so the square root need not be a whole number. The displayed decimal is rounded.
How do I find the diagonal of a rectangle or a screen?
The diagonal is the hypotenuse of a right triangle whose legs are the width and the height: for a 16 × 9 rectangle it is √(256 + 81) ≈ 18.36.
Can the two legs use different units?
Convert both lengths to the same unit first. The unit selector labels the result; it does not convert a mixture of input units.
Next you might need
More in Math & numbers
- Percentage calculator, private, runs on your device
- A/B test significance calculator, private, runs on your device
- Average calculator, private, runs on your device
- Chi-square test calculator, private, runs on your device
- Combinations and permutations calculator, private, runs on your device
- Confidence interval calculator, private, runs on your device





