How this right triangle calculator works
A right triangle has one 90° angle. The two sides that meet at that corner are the legs, written a and b, and the longest side — the one opposite the right angle — is the hypotenuse, written c. The Pythagorean theorem ties them together: a² + b² = c².
Because you have one equation in three sides, knowing any two sides fixes the third. If you enter both legs, the tool computes the hypotenuse as c = √(a² + b²). If you enter a leg and the hypotenuse, it rearranges the formula to find the missing leg as √(c² − a²) — and checks that the hypotenuse really is longer than the leg, since otherwise no such triangle exists.
Once all three sides are known, the rest follows. The two non-right angles come from trigonometry: the angle opposite leg a is atan(a / b) (equivalently asin(a / c)), and the two non-right angles always sum to 90°. The legs are perpendicular, so they double as base and height, giving an area of ½ · a · b, and the perimeter is a + b + c.
Some side lengths come out as whole numbers on all three sides. These are called Pythagorean triples, and they are handy for laying out or checking right angles without a protractor.
| Triple (a-b-c) | Leg a | Leg b | Hypotenuse c | Check a² + b² |
|---|---|---|---|---|
| 3-4-5 | 3 | 4 | 5 | 9 + 16 = 25 |
| 5-12-13 | 5 | 12 | 13 | 25 + 144 = 169 |
| 8-15-17 | 8 | 15 | 17 | 64 + 225 = 289 |
| 7-24-25 | 7 | 24 | 25 | 49 + 576 = 625 |
Reference note: angles are shown in degrees and rounded for display. The Pythagorean theorem and these formulas apply only to right triangles — triangles with a 90° angle.
Frequently asked questions
- What is the Pythagorean theorem?
- It states that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c², where c is the side opposite the right angle and a and b are the two shorter sides.
- How do I find the hypotenuse?
- When you know both legs, the hypotenuse is the square root of the sum of their squares: c = √(a² + b²). For example, legs of 3 and 4 give a hypotenuse of √25 = 5.
- How do I find a missing side of a right triangle?
- If you know one leg and the hypotenuse, the other leg is √(c² − a²). The hypotenuse must be longer than either leg, otherwise the triangle is impossible.
- How do I find the angles of a right triangle?
- One angle is always 90°. For a non-right angle opposite leg a, use atan(opposite / adjacent) or asin(opposite / hypotenuse). The two non-right angles always add up to 90°.
- What is a 3-4-5 triangle?
- A right triangle whose sides are in the ratio 3:4:5, because 3² + 4² = 25 = 5². It is the simplest Pythagorean triple and is widely used to check or lay out right angles.
- How do I calculate the area of a right triangle?
- The two legs are perpendicular, so they act as base and height: area = ½ × a × b. For legs of 3 and 4 the area is ½ × 3 × 4 = 6.