Right Triangle Calculator

Solve any right triangle completely - find all sides, both acute angles, area, and perimeter from any two known values.

🔺 Right Triangle Calculator
Leg a (one perpendicular side)
units
Leg b (other perpendicular side)
units

🔺 What is a Right Triangle?

A right triangle is a triangle that contains exactly one angle of 90° — a right angle. The side opposite the right angle is called the hypotenuse and is always the longest side. The other two sides are called the legs (or catheti). The two acute angles (both less than 90°) always sum to exactly 90°, making the three angles total 180° as in any triangle.

The relationship between the sides of a right triangle is governed by the Pythagorean theorem: a² + b² = c², where a and b are the legs and c is the hypotenuse. This theorem, known for over 2,500 years, is one of the most fundamental results in all of mathematics. It means that if you know any two sides, you can always find the third. The classic 3-4-5 right triangle is the simplest integer example: 9 + 16 = 25.

The angles of a right triangle are found using trigonometry. Given the two legs a and b, angle A = arctan(a/b) and angle B = 90° − A. Given the hypotenuse and one leg, angle A = arcsin(leg/hypotenuse). Given one angle and one side, all remaining sides can be found using SOH CAH TOA: sin(A) = opposite/hypotenuse, cos(A) = adjacent/hypotenuse, tan(A) = opposite/adjacent. These three ratios form the foundation of all trigonometry.

Right triangles appear throughout mathematics, science, and everyday life. In construction, the 3-4-5 rule is used to verify that corners are perfectly square. In navigation, right triangle decomposition resolves a journey into north-south and east-west components. In physics, force vectors are decomposed into perpendicular components using right triangle geometry. In computer graphics, pixel distances on screen are calculated as hypotenuses of right triangles. This calculator solves any right triangle completely from any two known values, giving you all three sides, both acute angles, area, and perimeter instantly.

📐 Formulas

c = √(a² + b²)    (Pythagorean Theorem)
a, b = legs (perpendicular sides)  ·  c = hypotenuse (opposite 90°)
Missing leg: b = √(c² − a²)
Angle A = arctan(a/b)    Angle B = 90° − A
From hyp + leg: Angle A = arcsin(a/c) = arccos(b/c)
From angle A + opposite a: c = a/sin(A), b = c × cos(A)
From angle A + adjacent b: c = b/cos(A), a = c × sin(A)
From angle A + hypotenuse c: a = c × sin(A), b = c × cos(A)
Area = ½ × a × b    Perimeter = a + b + c
Altitude to hypotenuse: h = (a × b) / c
SOH: sin(A) = a/c  ·  CAH: cos(A) = b/c  ·  TOA: tan(A) = a/b

📖 How to Use This Calculator

  1. Choose your input mode using the tabs at the top: Two Legs (you know both perpendicular sides), Hyp + One Leg (you know the hypotenuse and one leg), or Angle + One Side (you know one acute angle and any one side).
  2. Enter the known values in the fields that appear. For angles, enter degrees between 0 and 90 (exclusive). All length values must be positive numbers in consistent units (cm, m, inches, etc.).
  3. Click Calculate to instantly see all results: hypotenuse, both legs, both acute angles, area, and perimeter. A step-by-step note explains exactly how each value was computed.
  4. Use the example links below in the Examples section to auto-fill worked examples and verify the results match the hand-computed values.
  5. Share or save your result using the Copy, Print, Permalink, or WhatsApp buttons below the results grid.

💡 Example Calculations

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

Given: leg a = 3, leg b = 4

1
Hypotenuse c = √(3² + 4²) = √(9 + 16) = √25 = 5.0000 units
2
Angle A = arctan(3/4) = arctan(0.75) = 36.87°
3
Angle B = 90° − 36.87° = 53.13°
4
Area = ½ × 3 × 4 = 6.0000 sq units  ·  Perimeter = 3 + 4 + 5 = 12.0000 units
c = 5.0000, A = 36.87°, B = 53.13°, Area = 6.0000 sq units, Perimeter = 12.0000 units.
Try this example →

Example 2 — Hypotenuse + One Leg: c = 13, a = 5

Given: hypotenuse c = 13, known leg a = 5

1
Missing leg b = √(13² − 5²) = √(169 − 25) = √144 = 12.0000 units
2
Angle A = arcsin(5/13) = arcsin(0.3846) = 22.62°
3
Angle B = 90° − 22.62° = 67.38°
4
Area = ½ × 5 × 12 = 30.0000 sq units  ·  Perimeter = 5 + 12 + 13 = 30.0000 units
b = 12.0000, A = 22.62°, B = 67.38°, Area = 30.0000 sq units, Perimeter = 30.0000 units.
Try this example →

Example 3 — Angle + Opposite Side: A = 30°, opposite = 5

Given: angle A = 30°, opposite side (a) = 5

1
Hypotenuse c = a / sin(30°) = 5 / 0.5 = 10.0000 units
2
Adjacent leg b = c × cos(30°) = 10 × 0.8660 = 8.6603 units
3
Angle B = 90° − 30° = 60.00°
4
Area = ½ × 5 × 8.6603 = 21.6506 sq units  ·  Perimeter = 5 + 8.6603 + 10 = 23.6603 units
This is a 30-60-90 triangle! c = 10.0000, b = 8.6603, A = 30.00°, B = 60.00°, Area = 21.6506 sq units.
Try this example →

Example 4 — 45° Triangle with Adjacent Leg = 7

Given: angle A = 45°, adjacent side (b) = 7

1
Hypotenuse c = b / cos(45°) = 7 / 0.7071 = 7 × √2 = 9.8995 units
2
Opposite leg a = c × sin(45°) = 9.8995 × 0.7071 = 7.0000 units (equal legs — 45-45-90 triangle)
3
Angle B = 90° − 45° = 45.00°
4
Area = ½ × 7 × 7 = 24.5000 sq units  ·  Perimeter = 7 + 7 + 9.8995 = 23.8995 units
This is a 45-45-90 triangle with legs both 7. c = 9.8995, A = B = 45.00°, Area = 24.5000 sq units.
Try this example →

❓ Frequently Asked Questions

How do I solve a right triangle with two sides?+
With two legs a and b: use c = √(a²+b²) for the hypotenuse, angle A = arctan(a/b), angle B = 90° − A. With hypotenuse c and one leg a: missing leg b = √(c²−a²), angle A = arcsin(a/c), angle B = 90°−A. All five values (three sides, two angles) are fully determined.
What is SOH CAH TOA and how is it used?+
SOH CAH TOA is a mnemonic for the three basic trig ratios in a right triangle: Sin(A) = Opposite/Hypotenuse, Cos(A) = Adjacent/Hypotenuse, Tan(A) = Opposite/Adjacent. To find a side when an angle is known: opposite = hypotenuse × sin(A), adjacent = hypotenuse × cos(A). To find an angle when sides are known: A = arcsin(opposite/hypotenuse), A = arccos(adjacent/hypotenuse), A = arctan(opposite/adjacent).
How do I find the angles of a right triangle?+
Given two sides, use inverse trig functions. If you know legs a and b: angle A = arctan(a/b) in degrees = atan(a/b) × 180/π. Angle B = 90° − A. If you know one leg and the hypotenuse: angle A = arcsin(opposite/hypotenuse). The right angle C is always exactly 90°.
What is the area of a right triangle?+
Area = ½ × leg&sub1; × leg&sub2;. Since the two legs are perpendicular, one serves as the base and the other as the height. For a right triangle with legs 6 and 8: area = ½ × 6 × 8 = 24 square units. The hypotenuse is 10 (a 3-4-5 triple scaled by 2).
What are the special right triangles?+
The two most important special right triangles are: (1) 45-45-90 triangle — both acute angles are 45°, sides in ratio 1:1:√2. If a leg is 1, the hypotenuse is √2 ≈ 1.414. (2) 30-60-90 triangle — angles 30°, 60°, 90°, sides in ratio 1:√3:2. The short leg opposite 30° is half the hypotenuse. These arise constantly in geometry, construction, and trigonometry.
Can I solve a right triangle with only one side?+
No. You need at least two pieces of information. One side alone (with the implicit knowledge that one angle is 90°) is insufficient — the triangle is not uniquely determined. You need two sides, or one side and one acute angle, or the two legs, or hypotenuse and one leg.
How do I find the hypotenuse from an angle and one side?+
If you know angle A and the opposite side (a): hypotenuse = a / sin(A). If you know angle A and the adjacent side (b): hypotenuse = b / cos(A). For example, if angle A = 30° and the opposite leg is 5: hypotenuse = 5 / sin(30°) = 5 / 0.5 = 10. Then the adjacent leg = 10 × cos(30°) = 10 × 0.866 = 8.66.
What is the perimeter of a right triangle?+
Perimeter = a + b + c, where a and b are the legs and c is the hypotenuse. For the classic 3-4-5 right triangle: perimeter = 3 + 4 + 5 = 12 units. Once all three sides are known (which this calculator computes), the perimeter is simply their sum.
What is the altitude to the hypotenuse of a right triangle?+
The altitude h drawn from the right angle to the hypotenuse has length h = (a × b) / c, where a, b are the legs and c is the hypotenuse. It divides the hypotenuse into two segments of length a²/c and b²/c. This altitude is the geometric mean of the two hypotenuse segments: h² = (a²/c) × (b²/c).
How do right triangles appear in real life?+
Right triangles appear in construction (roof pitch, rafter length), navigation (north-south and east-west components of a journey), surveying (measuring distances with a transit), architecture, physics (vector components), computer graphics (pixel distance), and engineering. The 3-4-5 right triangle is used by builders worldwide to check that corners are square.