About this calculator
In a right-angled triangle, the two shorter sides and the longest side are linked by Pythagoras' theorem: a² + b² = c². Give this calculator any two sides and it finds the third, with the working shown.
It also gives the triangle's area, its perimeter and its two other angles.
Worked examples
Real numbers, worked out by the same calculator. Press “Use these numbers” to try one above.
Sides 3 and 4
- Hypotenuse (c)
- 5
- Area
- 6
- Perimeter
- 12
- Angle opposite side a
- 36.87°
- Angle opposite side b
- 53.13°
A right-angled triangle with sides 3 and 4 has a hypotenuse of 5.
Show the working
- Pythagoras' theorem says a² + b² = c², where c is the hypotenuse (the longest side, opposite the right angle).
- Square the two sides and add them: 3² + 4² = 9 + 16 = 25.
- Take the square root: c = √25 = 5.
Sides 5 and 12
- Hypotenuse (c)
- 13
- Area
- 30
- Perimeter
- 30
- Angle opposite side a
- 22.62°
- Angle opposite side b
- 67.38°
A right-angled triangle with sides 5 and 12 has a hypotenuse of 13.
Show the working
- Pythagoras' theorem says a² + b² = c², where c is the hypotenuse (the longest side, opposite the right angle).
- Square the two sides and add them: 5² + 12² = 25 + 144 = 169.
- Take the square root: c = √169 = 13.
Hypotenuse 13, one side 5
- Missing side (b)
- 12
- Area
- 30
- Perimeter
- 30
- Angle opposite side a
- 22.62°
- Angle opposite side b
- 67.38°
With a hypotenuse of 13 and one side of 5, the other side is 12.
Show the working
- Pythagoras' theorem says a² + b² = c², where c is the hypotenuse.
- Rearrange to find the missing side: b² = c² − a² = 13² − 5² = 144.
- Take the square root: b = √144 = 12.
Two sides of 1 (the diagonal of a unit square)
- Hypotenuse (c)
- 1.414214
- Area
- 0.5
- Perimeter
- 3.414214
- Angle opposite side a
- 45°
- Angle opposite side b
- 45°
A right-angled triangle with sides 1 and 1 has a hypotenuse of 1.414214.
Show the working
- Pythagoras' theorem says a² + b² = c², where c is the hypotenuse (the longest side, opposite the right angle).
- Square the two sides and add them: 1² + 1² = 1 + 1 = 2.
- Take the square root: c = √2 = 1.414214.
The theorem
In a right-angled triangle, the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides:
a² + b² = c²
To find the hypotenuse: c = √(a² + b²). To find a shorter side: b = √(c² − a²). With sides 3 and 4: 9 + 16 = 25, and √25 = 5.
Whole-number triangles
Some right-angled triangles have all three sides as whole numbers. They're called Pythagorean triples: 3, 4, 5, 5, 12, 13, 8, 15, 17 and 7, 24, 25. Any multiple of a triple works too, so 6, 8, 10 is also a right-angled triangle. Builders use 3-4-5 to check corners are square: measure 3 along one wall and 4 along the other, and the diagonal should be exactly 5.
Where it's useful
- Finding the length of a diagonal, such as across a rectangular room, or the size of a screen from its width and height.
- Working out how long a ladder needs to be to reach a height at a safe distance from a wall.
- Finding the straight-line distance between two points on a grid or map.
Limits and mistakes
The theorem only works for right-angled triangles. Always make sure c is the longest side: the hypotenuse must be longer than either of the other sides, so if you're finding a shorter side, the hypotenuse you enter has to be the biggest number. Use the same units for all sides.
Frequently asked questions
How do I find the hypotenuse?
Square the two shorter sides, add the results and take the square root. For sides 3 and 4: √(9 + 16) = √25 = 5.
How do I find a missing shorter side?
Square the hypotenuse, subtract the square of the known side, and take the square root. With c = 13 and a = 5: √(169 − 25) = √144 = 12.
Does it work for any triangle?
No, only for triangles with a right angle (90 degrees). For other triangles you'd use the law of cosines.
What is a Pythagorean triple?
Three whole numbers that satisfy a² + b² = c², such as 3-4-5 and 5-12-13.
Why must the hypotenuse be longest?
It sits opposite the biggest angle, the right angle, and the longest side of any triangle is always opposite its biggest angle.
Formulas tested against hand-worked answers. Last reviewed 29 September 2026. These calculators do arithmetic only; they are not financial, tax or legal advice.