Right Triangle Calculator

Find the hypotenuse from two right triangle legs.

Right Triangle Calculator

Formula

c = √(a² + b²)

For a right triangle, the hypotenuse equals the square root of the sum of the squares of the two legs.

This right triangle calculator finds the hypotenuse from two legs using c = √(a² + b²). Enter leg a and leg b. The default values 3 and 4 return hypotenuse 5, the classic 3-4-5 triangle.

Builders, students, and designers use it whenever two perpendicular lengths are known and the diagonal is needed. For solving a missing leg when the hypotenuse is known, use the Pythagorean theorem calculator. For three given sides and area, see the triangle calculator.

How the formula works

Square each leg, add the squares, then take the square root. That length is opposite the right angle. The proof is the Pythagorean theorem for right triangles.

Worked example

a = 3, b = 4. Squares are 9 and 16. Sum is 25. Square root is 5.

InputValue
Leg a3
Leg b4
Hypotenuse5

How to use the fields

  • Leg a is one side adjacent to the right angle.
  • Leg b is the other side adjacent to the right angle.

Shop floor and DIY use

A rectangular frame needs a diagonal brace. Measure the two sides that meet at the corner, run the calculator, and cut the brace to the hypotenuse length. Matching units (inches or centimeters) keeps the cut accurate.

Common mistakes

  • Adding a and b instead of adding their squares
  • Using the formula when the angle between a and b is not 90 degrees
  • Mixing feet and inches without converting
  • Expecting area from a tool that returns hypotenuse length

Scaling similar triangles

If you double both legs, the hypotenuse doubles. The 6-8-10 triangle is a scaled 3-4-5. Ratios stay the same, which helps when you enlarge a drawing or a cut list.

Checking with area

After you trust the hypotenuse, area is still (1/2)×a×b. For the default legs, area is 6. That check does not replace the hypotenuse result, but it confirms you still have a valid right triangle story in your notes.

Trig connections

Once legs and hypotenuse are known, sin, cos, and tan of the acute angles are simple ratios. This page focuses on the hypotenuse length only. Keep trig for a second step when angles matter for design.

Classroom drill

Have students predict before calculating. Legs 3 and 4 should land near 5, not near 7. Estimation catches forgotten squares. Then ask them to swap which value is a or b; the hypotenuse must stay 5 because addition of squares is commutative.

Follow with a non integer pair such as 5 and 12 to practice square roots that are not whole numbers, while remembering the site default remains 3 and 4 for the shared example.

When to switch tools

If you know the hypotenuse and one leg, leave this page and use the Pythagorean calculator with a zero in the unknown field. If all three sides are known and you need area, use the triangle calculator with Heron’s formula path.

Keeping each tool on its job reduces field mix ups.

Angle free checks

You do not need trig to verify the default 3-4-5 case. Squaring and adding is enough. Once sides are known, you can optionally compute acute angles later if a design package asks for degrees.

Keep the first pass focused on lengths so measurement mistakes do not hide inside early angle rounding.

Brace and diagonal lists

Cut lists for shelves, gates, and frames often need many diagonals. Compute each hypotenuse from its own leg pair rather than assuming every panel shares the default 3-4-5 ratio.

Label which edge is a and which is b on the drawing so shop staff enter the same numbers you used.

Similar triangle scaling

If a model uses legs 3 and 4, a double size build uses 6 and 8 with hypotenuse 10. Run the calculator on the scaled legs instead of doubling a remembered 5 by habit when only one leg changed.

Unequal scaling of the two legs breaks similarity and needs a fresh hypotenuse every time.

Limitations

Only two positive legs are accepted. Oblique triangles, altitude to the hypotenuse, and angle outputs are out of scope. The primary result is the hypotenuse length only.

Frequently Asked Questions

What does the default example show?

Legs 3 and 4 give hypotenuse 5.

What do a and b represent?

They are the two legs that meet at the right angle. The result is the hypotenuse.

Can I solve for a missing leg here?

This tool expects both legs and returns the hypotenuse. Use the Pythagorean calculator when one side is unknown among three fields.

Must the triangle be right angled?

Yes. The formula c = √(a² + b²) applies only when the angle between a and b is 90 degrees.

Do units cancel?

Keep both legs in the same unit. The hypotenuse uses that same unit.

What if a or b is zero or negative?

Legs must be positive. Zero or negative inputs are invalid for this calculator.

Is 3-4-5 always the answer?

Only for those leg lengths. Scale both legs and the hypotenuse scales by the same factor.

How is this different from area?

Hypotenuse is a length. Area of a right triangle is (1/2)×a×b, which this primary result does not return.