ToolNimba Browse

📐 Right Triangle Calculator (Pythagorean)

By ToolNimba Editorial Team · Updated 2026-06-19

Enter any two of the three sides of a right triangle. Leave the side you want to find blank. Side c is the hypotenuse (the longest side, opposite the right angle).

Result
Enter two sides to begin.

This right triangle calculator finds the missing side of a right triangle from any two known sides using the Pythagorean theorem, a squared plus b squared equals c squared. Enter the two legs to get the hypotenuse, or one leg and the hypotenuse to get the other leg. Along with the third side it returns the area and the two non-right angles, so you get the full shape from just two numbers.

What is the Right Triangle Calculator?

A right triangle is a triangle with one 90 degree angle. The two sides that meet at the right angle are called the legs (here a and b), and the side opposite the right angle is the hypotenuse (here c). The hypotenuse is always the longest side, which is a useful sanity check: if a side you have called c is not the largest, the numbers are not describing a valid right triangle.

The relationship between the three sides is the Pythagorean theorem: a squared plus b squared equals c squared. Because there are three sides and one fixed equation, knowing any two sides pins down the third exactly. If you have both legs, the hypotenuse is the square root of (a squared plus b squared). If you have one leg and the hypotenuse, the missing leg is the square root of (c squared minus the known leg squared).

Once all three sides are known, the rest follows. The area of a right triangle is one half times the product of its two legs, since the legs act as the base and the height. The two acute (non-right) angles are found with the arctangent of the opposite leg over the adjacent leg, and because the three angles of any triangle add to 180 degrees, the two acute angles always add to exactly 90 degrees.

When to use it

  • Finding the length of a diagonal brace, ramp, or roof rafter from its rise and run.
  • Checking a corner is square on a construction or woodworking project (the 3-4-5 method).
  • Solving geometry and trigonometry homework that gives two sides of a right triangle.
  • Working out the straight-line distance between two points from their horizontal and vertical offsets.

How to use the Right Triangle Calculator

  1. Enter the two sides you know. Use leg a and leg b for the two short sides, and hypotenuse c for the longest side.
  2. Leave the side you want to find blank.
  3. Press Calculate (or Enter) to solve for the missing side.
  4. Read off the third side, the area, the perimeter, and the two acute angles.
  5. If you enter all three sides, the tool checks whether they form a valid right triangle.

Formula & method

a2 + b2 = c2.   c = √(a2 + b2).   missing leg = √(c2 − known leg2).   area = ½ × a × b.   angle A = arctan(a ÷ b), angle B = arctan(b ÷ a).

Worked examples

Both legs known: a = 3, b = 4. Find the hypotenuse.

  1. c = √(a² + b²) = √(3² + 4²)
  2. c = √(9 + 16) = √25 = 5
  3. area = ½ × 3 × 4 = 6
  4. angle A = arctan(3 ÷ 4) = 36.87°, angle B = arctan(4 ÷ 3) = 53.13°

Result: c = 5, area = 6, angles 36.87° and 53.13°

Both legs known: a = 6, b = 8. Find the hypotenuse.

  1. c = √(6² + 8²) = √(36 + 64)
  2. c = √100 = 10
  3. area = ½ × 6 × 8 = 24
  4. angle A = arctan(6 ÷ 8) = 36.87°, angle B = arctan(8 ÷ 6) = 53.13°

Result: c = 10, area = 24, angles 36.87° and 53.13°

A leg and the hypotenuse known: a = 5, c = 13. Find leg b.

  1. b = √(c² − a²) = √(13² − 5²)
  2. b = √(169 − 25) = √144 = 12
  3. area = ½ × 5 × 12 = 30
  4. angle A = arctan(5 ÷ 12) = 22.62°, angle B = arctan(12 ÷ 5) = 67.38°

Result: b = 12, area = 30, angles 22.62° and 67.38°

Common Pythagorean triples (whole-number right triangles)

Leg aLeg bHypotenuse cCheck (a² + b²)
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
9404181 + 1600 = 1681
681036 + 64 = 100

Angles of a few standard right triangles

TriangleSmaller acute angleLarger acute angle
3-4-536.87°53.13°
5-12-1322.62°67.38°
Isosceles (a = b)45°45°
1-√3-2 (30-60-90)30°60°

Common mistakes to avoid

  • Treating a leg as the hypotenuse. The hypotenuse c is always the longest side and sits opposite the right angle. If you plug a leg into the c box, the math breaks. Only use c for the longest side.
  • Adding the sides instead of their squares. The theorem squares the sides: a² + b² = c², not a + b = c. For a 3-4-5 triangle, 3 + 4 = 7, but the correct hypotenuse is √(9 + 16) = 5.
  • Forgetting the square root. After computing a² + b² you have c², not c. You must take the square root of that sum to get the actual length of the hypotenuse.
  • Using the theorem on a non-right triangle. a² + b² = c² only holds when one angle is exactly 90 degrees. For other triangles you need the law of cosines instead.

Glossary

Right triangle
A triangle containing one 90 degree (right) angle.
Hypotenuse
The side opposite the right angle. It is always the longest side of a right triangle.
Leg
One of the two sides that form the right angle. The legs are the base and height used for the area.
Pythagorean theorem
The rule that, in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c².
Acute angle
An angle smaller than 90 degrees. A right triangle has two acute angles that add up to 90 degrees.

Frequently asked questions

How do I find the hypotenuse of a right triangle?

Square both legs, add the results, then take the square root of that sum: c = √(a² + b²). For example, with legs 3 and 4 the hypotenuse is √(9 + 16) = √25 = 5.

How do I find a missing leg when I know the hypotenuse?

Subtract the square of the known leg from the square of the hypotenuse, then take the square root: leg = √(c² − leg²). With c = 13 and one leg = 5, the other leg is √(169 − 25) = 12.

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, written a² + b² = c². It only applies to triangles with a 90 degree angle.

How do I calculate the area of a right triangle?

Multiply the two legs and halve the result: area = ½ × a × b. The legs serve as the base and height. A 6 by 8 right triangle has an area of ½ × 6 × 8 = 24.

How does the calculator find the two angles?

It uses the arctangent of the opposite leg over the adjacent leg: angle A = arctan(a ÷ b) and angle B = arctan(b ÷ a). The two acute angles always add up to exactly 90 degrees.

Why does the tool say my hypotenuse must be the largest side?

In any right triangle the hypotenuse is the longest side. If the value entered for c is not larger than both legs, the three numbers cannot describe a valid right triangle, so the calculator flags it.