Right Triangle Side and Angle Calculator

Enter any two values of a right triangle and find all remaining sides, angles, area, perimeter, and all six trigonometric ratios instantly.

📐 Right Triangle Side & Angle Calculator
I know these two values
Leg a (opposite to angle A)
units
Leg b (adjacent to angle A)
units
Leg a (shorter side)
units
Hypotenuse c
units
Angle A (degrees)
deg
Hypotenuse c
units
Angle A (degrees)
deg
Which leg do you know?
Opposite Leg (a)
units
Hypotenuse (c)
Angle A
Leg a (opposite)
Leg b (adjacent)
Angle B
Area
Perimeter
Altitude to Hyp

Trigonometric Ratios

📐 What is a Right Triangle Side and Angle Calculator?

A right triangle is a triangle with one angle equal to exactly 90 degrees. The side opposite the right angle is called the hypotenuse, always the longest side. The other two sides are called legs, and their two angles (called acute angles) each measure between 0 and 90 degrees and always sum to exactly 90 degrees together.

This calculator solves a right triangle completely from any two known values. In practice, you always know two things and need to find the rest. A contractor measuring a roof pitch knows the run and rise (two legs). A student given a trig problem might know one angle and the hypotenuse. A surveyor might know one angle and the distance across a river (one leg). All four scenarios are handled here with four dedicated input modes.

Beyond finding the three sides and two acute angles, the calculator also computes area (one half times leg a times leg b), perimeter (sum of all three sides), the altitude from the right angle to the hypotenuse (a measure used in geometric proofs and similarity theorems), and all six trigonometric ratios (sine, cosine, tangent, cosecant, secant, and cotangent) for both acute angles. These ratios are the foundation of trigonometry and appear in physics, engineering, navigation, and architecture.

The core relationships are the Pythagorean theorem (c squared = a squared + b squared) and the SOH-CAH-TOA ratios: Sin = Opposite over Hypotenuse, Cos = Adjacent over Hypotenuse, Tan = Opposite over Adjacent. By applying inverse trig functions (arcsin, arccos, arctan), any unknown angle can be recovered from two known sides. Together these six equations can find any unknown in the triangle as long as two independent knowns are provided.

📐 Formula

c  =  √(a² + b²)   |   A  =  arctan(a ÷ b)
a, b = legs (shorter sides). c = hypotenuse (side opposite 90°)
A = angle opposite leg a. B = angle opposite leg b = 90° − A
sin A = a/c   cos A = b/c   tan A = a/b
csc A = c/a   sec A = c/b   cot A = b/a
Area = ½ × a × b    Perimeter = a + b + c
Altitude to hypotenuse = (a × b) ÷ c
Example (3-4-5): a=3, b=4 → c=5, A=36.87°, B=53.13°, Area=6, Perimeter=12, Altitude=2.4

📖 How to Use This Calculator

Steps

1
Choose your input mode — Select which two values you know: Two Legs (a and b), Leg plus Hypotenuse, Angle plus Hypotenuse, or Angle plus One Leg. The relevant input fields appear immediately.
2
Enter your known values — Type your two known values. Lengths can be in any consistent unit. Angles must be in degrees between 0 and 90 (exclusive). The calculator accepts decimals for precision.
3
Click Calculate — Press Calculate to instantly see all three sides, both acute angles, area, perimeter, altitude to hypotenuse, and all nine listed trig ratios.
4
Read all results — The top result boxes show the primary unknowns. The trig ratio grid below shows sin, cos, tan, csc, sec, and cot for angle A, plus sin, cos, and tan for angle B (which is 90° minus A).

💡 Example Calculations

Example 1 — Classic 3-4-5 Right Triangle (Two Legs)

The most famous Pythagorean triple

1
Legs: a = 3, b = 4. Hypotenuse: c = √(3² + 4²) = √(9 + 16) = √25 = 5.
2
Angle A = arctan(3/4) = arctan(0.75) = 36.87°. Angle B = 90 − 36.87 = 53.13°.
3
Area = ½ × 3 × 4 = 6 sq units. Perimeter = 3 + 4 + 5 = 12 units. Altitude to hyp = (3 × 4)/5 = 2.4 units.
4
Trig ratios: sin A = 3/5 = 0.6, cos A = 4/5 = 0.8, tan A = 3/4 = 0.75, csc A = 5/3 = 1.6667, sec A = 5/4 = 1.25, cot A = 4/3 = 1.3333.
c = 5, A = 36.87°, B = 53.13°, Area = 6 sq units
Try this example →

Example 2 — 30-60-90 Triangle (Angle + Hypotenuse)

Special triangle with exact trig values

1
Angle A = 30°, Hypotenuse c = 10. Opposite leg a = 10 × sin(30°) = 10 × 0.5 = 5.
2
Adjacent leg b = 10 × cos(30°) = 10 × 0.8660 = 8.660. Angle B = 90 − 30 = 60°.
3
Area = ½ × 5 × 8.660 = 21.65 sq units. Perimeter = 5 + 8.660 + 10 = 23.660 units.
a = 5, b = 8.660, A = 30°, B = 60°
Try this example →

Example 3 — Roof Pitch Problem (Angle + Opposite Leg)

Roof rafter length from pitch angle and rise

1
A roof rises at 22° pitch. The vertical rise (opposite leg a) = 8 feet. Find the rafter length (hypotenuse) and horizontal run (adjacent leg).
2
Hypotenuse c = a / sin(A) = 8 / sin(22°) = 8 / 0.3746 = 21.36 feet.
3
Adjacent leg b = a / tan(A) = 8 / tan(22°) = 8 / 0.4040 = 19.80 feet. Angle B = 90 − 22 = 68°.
Rafter = 21.36 ft, Run = 19.80 ft, Angle B = 68°
Try this example →

❓ Frequently Asked Questions

How do you find all sides of a right triangle?+
You need exactly two known values. With two legs (a, b): hypotenuse c = sqrt(a squared + b squared). With one leg and the hypotenuse: missing leg = sqrt(c squared minus known leg squared). With an angle and any side: use sin, cos, or tan to find the others. This calculator handles all four cases and shows all three sides, both angles, area, and all trig ratios.
How do you find angles of a right triangle from two sides?+
Use inverse trig functions. Given legs a and b: angle A = arctan(a/b). Given one leg a and hypotenuse c: angle A = arcsin(a/c). Given adjacent leg b and hypotenuse c: angle A = arccos(b/c). The right angle is always exactly 90 degrees, and the remaining acute angle B = 90 degrees minus A. Most calculators and phones have arctan, arcsin, and arccos as the inv or second function of tan, sin, and cos.
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: c squared = a squared + b squared. For the classic 3-4-5 triangle: 5 squared = 3 squared + 4 squared, or 25 = 9 + 16. This theorem only works for right triangles. For any two sides, c = sqrt(a squared + b squared) gives the hypotenuse, and a = sqrt(c squared minus b squared) gives a missing leg.
What does SOH-CAH-TOA mean?+
SOH-CAH-TOA is a mnemonic for the three primary trig ratios in a right triangle relative to angle A. SOH: Sine = Opposite leg divided by Hypotenuse. CAH: Cosine = Adjacent leg divided by Hypotenuse. TOA: Tangent = Opposite leg divided by Adjacent leg. To find a side when an angle is known: opposite = hyp times sin(A), adjacent = hyp times cos(A), opposite = adjacent times tan(A). To find an angle from two sides: use inverse sin, cos, or tan.
What are all six trigonometric ratios of a right triangle?+
For angle A in a right triangle (opposite = a, adjacent = b, hypotenuse = c): sin A = a/c, cos A = b/c, tan A = a/b. The reciprocal functions: csc A = c/a (1/sin A), sec A = c/b (1/cos A), cot A = b/a (1/tan A). These six ratios are used throughout trigonometry, calculus, and physics. This calculator computes all six for both acute angles after solving the triangle.
What are the special right triangles?+
The 45-45-90 triangle has equal legs and a hypotenuse equal to the leg times sqrt(2) = 1.4142. If a leg is 1, hypotenuse = 1.4142. The 30-60-90 triangle has sides in ratio 1 : sqrt(3) : 2. If the shortest leg is 1, the other leg is 1.732 and the hypotenuse is 2. These triangles produce exact trig values: sin 30 = 0.5, sin 45 = sqrt(2)/2 = 0.7071, cos 60 = 0.5, tan 45 = 1.
How is the altitude to the hypotenuse calculated?+
The altitude h drawn from the right angle perpendicular to the hypotenuse equals (leg a times leg b) divided by the hypotenuse c: h = (a times b) / c. For the 3-4-5 triangle: h = (3 times 4) / 5 = 2.4. This altitude is also the geometric mean: h squared equals the product of the two segments it creates on the hypotenuse. It is used in proofs of the Pythagorean theorem and in geometric mean altitude theorems.
What is the area formula for a right triangle?+
Area = 0.5 times leg a times leg b. The two legs of a right triangle are perpendicular, so one serves as the base and the other as the height of the standard triangle area formula (Area = 0.5 times base times height). For the 5-12-13 right triangle: Area = 0.5 times 5 times 12 = 30 square units. For non-right triangles, the formula changes because height and base are not the same as the sides.
Can you solve a right triangle with only one known value?+
No. With only one side and the knowledge that one angle is 90 degrees, the triangle is not uniquely determined. There are infinitely many right triangles with a given hypotenuse (all sizes of similar triangles). You need exactly two pieces of independent information to fully determine all sides and angles. The one exception: if you know two angles (one is 90 degrees, another is given), you know the shape but not the scale.
What is the difference between the opposite and adjacent legs?+
Opposite and adjacent are defined relative to a specific angle. For angle A: the opposite leg is the side directly across the triangle from A (not touching angle A), and the adjacent leg is the side that forms angle A along with the hypotenuse. The hypotenuse is always opposite the right angle. If you switch focus to angle B, opposite and adjacent swap: what was opposite A is now adjacent to B, and vice versa.
How do right triangles appear in everyday life?+
Right triangles appear everywhere. Builders use the 3-4-5 rule to check square corners. Ramps, stairs, and roof pitches form right triangles. Ladders leaning against a wall create right triangles. GPS and navigation systems use trigonometric triangulation. Surveyors measure inaccessible distances using right triangle relationships. Carpenters use the diagonal of a rectangle (the hypotenuse of a right triangle) to check for squareness. Electrical conduit runs at angles through walls form right triangles with the wall and floor.
What is a Pythagorean triple?+
A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a squared + b squared = c squared, meaning they form the sides of a right triangle with no irrational numbers. Common examples: 3-4-5, 5-12-13, 8-15-17, 7-24-25. Multiples also work: 6-8-10 and 9-12-15 are both scaled versions of 3-4-5. Pythagorean triples are used in construction and carpentry because measuring in whole-number lengths avoids rounding errors when checking for square corners.

How do you find the sides of a right triangle?

With two known values, use the Pythagorean theorem or trigonometry. If you know both legs (a, b): hypotenuse c = sqrt(a squared plus b squared). If you know one leg and hypotenuse: missing leg = sqrt(c squared minus known leg squared). If you know an angle and one side: use sin, cos, or tan to find the others. This calculator handles all four cases automatically.

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

Use inverse trigonometric functions. Given legs a and b: angle A = arctan(a/b) in degrees. Given one leg a and hypotenuse c: angle A = arcsin(a/c). Given leg b and hypotenuse c: angle A = arccos(b/c). The right angle C is always 90 degrees, and angle B = 90 minus angle A.

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 two legs: c squared = a squared + b squared, where c is the hypotenuse. Equivalently, c = sqrt(a squared + b squared). For example, legs 3 and 4 give hypotenuse = sqrt(9 + 16) = sqrt(25) = 5. The 3-4-5 triple is the most famous Pythagorean triple.

What are SOH, CAH, and TOA?

SOH, CAH, TOA is a mnemonic for the three primary trig ratios in a right triangle. SOH: Sin(A) = Opposite divided by Hypotenuse. CAH: Cos(A) = Adjacent divided by Hypotenuse. TOA: Tan(A) = Opposite divided by Adjacent. These let you find any missing side when an angle is known: opposite = hypotenuse times sin(A), adjacent = hypotenuse times cos(A), opposite = adjacent times tan(A).

What are all six trigonometric ratios of a right triangle?

The six trig ratios for angle A are: sin A = opposite/hypotenuse, cos A = adjacent/hypotenuse, tan A = opposite/adjacent, csc A = hypotenuse/opposite (reciprocal of sin), sec A = hypotenuse/adjacent (reciprocal of cos), cot A = adjacent/opposite (reciprocal of tan). This calculator shows all six for both acute angles once the triangle is solved.

What is the area of a right triangle?

Area = one half times leg a times leg b. Since the two legs are perpendicular, one acts as the base and the other as the height: Area = 0.5 times a times b. For the 3-4-5 right triangle: Area = 0.5 times 3 times 4 = 6 square units. Once you know both legs (which this calculator computes in all modes), the area is always computable.

What is the altitude to the hypotenuse of a right triangle?

The altitude from the right angle perpendicular to the hypotenuse has length h = (a times b) divided by c, where a and b are the legs and c is the hypotenuse. It is also the geometric mean: h squared = (projection of a onto c) times (projection of b onto c). This altitude divides the triangle into two smaller triangles that are each similar to the original.

What are the special right triangles and why are they important?

The two key special right triangles are: the 45-45-90 triangle (isosceles right triangle, sides 1:1:sqrt 2) and the 30-60-90 triangle (sides 1:sqrt 3:2). They appear constantly in geometry, trigonometry, and construction because their trig ratios are exact values: sin 30 = 0.5, sin 45 = sqrt 2 over 2, sin 60 = sqrt 3 over 2. These are the exact values tested on standardized exams and used in engineering.

How do I find a side when I know an angle and the hypotenuse?

Use sine for the opposite side and cosine for the adjacent side. Opposite = hypotenuse times sin(angle). Adjacent = hypotenuse times cos(angle). Example: angle A = 37 degrees, hypotenuse = 10. Opposite leg a = 10 times sin(37) = 10 times 0.6018 = 6.02. Adjacent leg b = 10 times cos(37) = 10 times 0.7986 = 7.99. Then check: sqrt(6.02 squared + 7.99 squared) should equal 10.

How do I find the hypotenuse when I know an angle and one leg?

If you know the angle and the opposite leg: hypotenuse = opposite divided by sin(angle). If you know the angle and the adjacent leg: hypotenuse = adjacent divided by cos(angle). Example: angle A = 30 degrees, opposite leg a = 5. Hypotenuse = 5 divided by sin(30) = 5 divided by 0.5 = 10. Adjacent leg b = sqrt(100 minus 25) = sqrt(75) = 8.66.

How are right triangles used in real life?

Right triangles appear everywhere: architects use them to check that corners are square (the 3-4-5 rule). Surveyors use trigonometry to measure land without direct access. Navigation uses bearing angles and distances forming right triangles. Ramps, stairs, and roof pitches are analyzed as right triangles. GPS and satellite positioning uses triangulation. Electricians use them to find wire lengths when routing at angles through walls.

What is the difference between this calculator and a general triangle calculator?

This calculator is specialized for right triangles, which always have one 90-degree angle. Because one angle is fixed, you only need two pieces of information (instead of three for a general triangle) to fully solve the triangle. The calculator uses the Pythagorean theorem and basic trig ratios, which are simpler and more exact than the Law of Sines and Law of Cosines used for general triangles. It also computes all six trig ratios and the altitude to the hypotenuse.