Home / Right Triangle Calculator

Right Triangle Calculator

Enter any 2 known values from the sides and angles to solve the right triangle. The calculator finds all remaining sides, both acute angles, area, and perimeter, then shows the steps used.

Enter 2 known values

Leave the values you want to find blank. Angles are in degrees. At least one side is required alongside any angle.

Result

Hypotenuse c--
Leg a--
Leg b--
Angle A--
Angle B--
Angle C (right angle)90 deg
Area--
Perimeter--
Enter 2 values above and press Solve.

Real-World Uses

A right triangle has one 90-degree angle (angle C) and two acute angles A and B, and that fixed right angle is exactly what makes it so useful outside a classroom. A carpenter checks a door frame is square by comparing it to a 3-4-5 triangle. A surveyor finds the height of a hill by measuring a baseline distance and an angle of elevation, then solving the right triangle those two values form. A roofer works out rafter length from the run and the pitch angle before a single board gets cut.

How It's Calculated

a² + b² = c²    (Pythagorean theorem)

Given two legs, the hypotenuse is c = sqrt(a squared + b squared). Given one leg and the hypotenuse, the missing leg is a = sqrt(c squared minus b squared). The basic trig ratios tie each side pair to an angle:

sin A = a / c     cos A = b / c     tan A = a / b

Angle B always equals 90 degrees minus A because the angles of any triangle sum to 180 degrees and C is fixed at 90. Area and perimeter follow once all three sides are known:

Area = (1/2) x a x b     Perimeter = a + b + c

Worked Example: legs a = 3, b = 4

Step 1. Hypotenuse. c = sqrt(3 squared + 4 squared) = sqrt(9 + 16) = sqrt(25) = 5.
Step 2. Angle A. sin A = a / c = 3 / 5 = 0.6, so A = arcsin(0.6) = 36.87 degrees.
Step 3. Angle B. B = 90 minus 36.87 = 53.13 degrees.
Step 4. Area. (1/2) x 3 x 4 = 6.
Step 5. Perimeter. 3 + 4 + 5 = 12.

This is the classic 3-4-5 Pythagorean triple, and it is why carpenters and surveyors still reach for that ratio first. For the underlying theorem on its own, see the Pythagorean theorem calculator.

For an academic reference on right triangle trigonometry, see Wolfram MathWorld's page on right triangles.

Nearby geometry tools

Not every triangle has a right angle, and slope measures steepness a different way entirely.

On this page

Right triangle calculator FAQs

How do you find the missing side of a right triangle?

Use the Pythagorean theorem: a squared + b squared = c squared. If you know both legs, c = sqrt(a squared + b squared). If you know one leg and the hypotenuse, the other leg is sqrt(c squared minus the known leg squared). This calculator handles all three cases automatically.

How do you find the angles of a right triangle given two sides?

Apply an inverse trig function. With the opposite side and hypotenuse, angle A = arcsin(opposite / hypotenuse). With opposite and adjacent legs, angle A = arctan(opposite / adjacent). The remaining acute angle is 90 degrees minus A.

What is the formula for the area of a right triangle?

Area = (1/2) times leg a times leg b. The two legs serve as base and height because they meet at the right angle, so no separate altitude is needed.

What are the most common right triangle ratios?

The 3-4-5 and 5-12-13 Pythagorean triples come up constantly in geometry. Any whole-number multiple (6-8-10, 10-24-26) also forms a right triangle. The 45-45-90 triangle has legs in ratio 1:1 with hypotenuse = leg times sqrt(2); the 30-60-90 has sides in ratio 1 : sqrt(3) : 2.

What is sin, cos, and tan in a right triangle?

For angle A opposite leg a: sin A = a / c; cos A = b / c; tan A = a / b. SOH-CAH-TOA is the standard memory aid. Once you know one side and one angle, any missing side follows directly from these ratios.

Marcus Vance
About the author
Marcus Vance
Contributing Writer, Technology & Data, Encore Editorial

Marcus Vance spent a decade building data pipelines and testing calculation logic before he started writing about the math behind the tools. On MathCalcTools he checks every formula against the source math, then writes out the steps so a reader can follow the same path a calculator takes.