Right Triangle Calculator

Enter the two legs of a right triangle to get the hypotenuse (c = √(a² + b²)), area, perimeter, and both acute angles.

Quick Facts

Pythagorean theorem
c = √(a² + b²)
The hypotenuse (c) is always the longest side, opposite the 90° angle.
Area formula
Area = ½ × a × b
The two legs are perpendicular, so one leg acts as the base and the other as the height.
Acute angles
A + B = 90°
The two non-right angles are complementary — they always sum to 90°.

Your Results

Calculated
Hypotenuse (c)
-
c = √(a² + b²)
Area
-
½ × a × b
Perimeter
-
a + b + c
Acute Angles
-
Opposite leg a, then leg b

Ready

Enter both leg lengths and a unit, then press Calculate.

Formula and Method for the Right Triangle Calculator

A right triangle has one 90° interior angle formed by two perpendicular sides called legs (a and b). The side opposite the right angle, always the longest side, is the hypotenuse (c). Given the two leg lengths, this calculator finds the hypotenuse with the Pythagorean theorem, then derives the area, perimeter, and both acute angles from the same three sides.

How the calculation works

Enter the two legs and choose the unit they are measured in. The calculator squares each leg, adds the squares, and takes the square root to get the hypotenuse: c = √(a² + b²). Because the legs are perpendicular, the area is half their product: Area = ½ × a × b. The perimeter is simply the sum of all three sides: P = a + b + c. For the angles, the calculator uses inverse tangent: the angle opposite leg a is A = arctan(a / b), and the angle opposite leg b is B = 90° − A, since the two acute angles of any right triangle always sum to 90°.

Common mistakes

  • Mixing up legs and hypotenuse: the two inputs here are the legs (the sides that meet at the right angle), not the hypotenuse. If you only know one leg and the hypotenuse, solve for the missing leg first with b = √(c² − a²) before using this tool.
  • Units: area is reported in square units (ft², m²) while the hypotenuse and perimeter stay in linear units (ft, m). A 3 ft × 4 ft leg pair gives a 6 ft² area, not 6 ft.
  • Degrees vs. radians: the angle results are given in degrees. If you are plugging arctan into your own spreadsheet or code, remember many programming languages return radians by default and need conversion (multiply by 180/π).

Real-world applications

  • Construction and framing use the 3-4-5 right-triangle rule (a scaled version of this calculator) to square corners of walls, decks, and foundations.
  • Roofing and ramp design use the leg lengths and angles to determine pitch, slope, and the length of rafters or ramps.
  • Surveying and navigation use right-triangle relationships to find distances that cannot be measured directly, such as the height of a building from its shadow.
  • Physics and engineering decompose forces, velocities, and vectors into perpendicular components using the same Pythagorean and trigonometric relationships.

Frequently Asked Questions

What is the Pythagorean theorem and how does this calculator use it?
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: c² = a² + b². This calculator takes the two leg lengths you enter and computes c = √(a² + b²) to find the hypotenuse.
How do you find the area and perimeter of a right triangle from its legs?
Because the two legs are perpendicular, the area is simply half their product: Area = ½ × a × b. The perimeter is the sum of all three sides: P = a + b + c, where c is the hypotenuse found from the Pythagorean theorem.
How are the two acute angles calculated?
Using inverse tangent (arctan): the angle opposite leg a is A = arctan(a / b), and the angle opposite leg b is B = 90° − A, since the two acute angles in a right triangle always add up to 90°.
What is the difference between a leg and the hypotenuse?
The two legs (sometimes called catheti) are the two shorter sides that form the right angle. The hypotenuse is the longest side, located opposite the 90° angle, and is always longer than either individual leg.