Right Triangle Calculator

Enter the two legs of a right triangle to calculate the remaining key values.

Enter the first leg of the triangle.
Enter the second leg of the triangle.

Hypotenuse

5

Area6
Perimeter12
Angle A (degrees)36.9

How to use this right triangle calculator

  1. Enter Leg A

    Type the length of the first leg into the Leg A field.

  2. Enter Leg B

    Type the length of the second leg into the Leg B field using the same unit.

  3. Read the hypotenuse

    The calculator uses the Pythagorean theorem to return the hypotenuse length.

  4. Check area and perimeter

    Review the Area and Perimeter results for the triangle's surface and total edge length.

  5. Note the angle

    Use the Angle A (degrees) output to see the acute angle opposite Leg A.

Methodology

How this right triangle calculator works

This calculator applies the Pythagorean theorem to determine the hypotenuse from the two leg lengths of a right triangle. From the same inputs, it also computes area, perimeter, and one acute angle so you can solve the most common right-triangle questions in one place.

Formula
hypotenuse = √(a² + b²)
a The first leg of the right triangle
b The second leg of the right triangle
Example

If the legs are 3 and 4, the hypotenuse is √(9 + 16) = 5. The area is 6 and the perimeter is 12.

If the legs are 5 and 12, the hypotenuse is √(25 + 144) = 13. The area is 30 and the perimeter is 30.

If the legs are 8 and 15, the hypotenuse is √(64 + 225) = 17. The area is 60 and the perimeter is 40.

Assumptions
  • The triangle includes one 90-degree angle.
  • The two inputs are the legs, not the hypotenuse.
  • All side lengths are measured in the same unit.
Notes
  • Area of a right triangle is one-half the product of the legs.
  • Perimeter includes both legs plus the hypotenuse.
  • This is useful in construction, trigonometry, drafting, and layout work.
Sources
  1. Pythagorean theorem and elementary trigonometry references

What is the Pythagorean theorem?

The Pythagorean theorem states that in any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². This relationship was known to ancient Babylonian mathematicians and was formally attributed to Pythagoras around 500 BCE. It is one of the most fundamental results in all of geometry and forms the basis of distance calculations in everything from navigation to computer graphics. The theorem only applies to triangles with a 90-degree angle, but because any triangle can be split into two right triangles, its reach extends to virtually all triangle problems.

Right triangles in construction and navigation

Right triangles appear constantly in construction, surveying, and navigation. Builders use the 3-4-5 rule to verify that corners are square — if a triangle with legs of 3 and 4 units produces a hypotenuse of exactly 5, the angle is 90 degrees. Surveyors use right-triangle calculations to find distances across rivers or between landmarks without crossing the terrain. Pilots and sailors compute course corrections using right-triangle trigonometry. Roofers calculate rafter lengths by treating the roof as a right triangle with a known rise and run. Even hanging a shelf level on a wall involves an implicit right-triangle check. Mastering this calculation saves time, prevents errors, and eliminates the need for trial-and-error measuring.

Right triangle calculator FAQs

Can I use this if I know one leg and the hypotenuse?

Not in this version. This calculator expects the two legs as inputs.

Why is the area half of a × b?

Because a right triangle is exactly half of a rectangle with the same leg lengths.

What is the hypotenuse?

It is the longest side of a right triangle, opposite the 90-degree angle.

Written by Jan Křenek Founder and lead developer
Reviewed by DigitSum Methodology Review Formula verification and QA
Last updated Mar 11, 2026

Use this as an estimate and validate important decisions with a qualified professional.

Inputs stay in the browser unless a future feature explicitly tells you otherwise.