100+ free calculators - no signup, no ads | 💰 Financial ❤️ Health & Fitness 📐 Math 🔧 Other
🇺🇸 USD | About Contact

Right Triangle Calculator

Any two values · All sides and angles · SOH CAH TOA · Area

Enter any 2 values. Leave the rest blank.
Sides
Angles (degrees)
Other

📐 Enter any two values, such as two sides or one side and an angle, to solve the whole right triangle.

What Is a Right Triangle?

A right triangle has one 90° angle. The two sides that form it are the legs (a and b), and the side opposite it is the hypotenuse (c), always the longest side. The other two angles, α and β, are acute and always add up to 90°.

Because the right angle is fixed, a right triangle is completely determined by just two more values, provided at least one is a length. This calculator accepts any such pair: two sides, a side and an angle, or combinations with the area or perimeter. It returns every side, both angles, the area, perimeter, altitude, inradius, circumradius, and all six trigonometric ratios, with the steps shown.

Labelling conventions. Textbooks usually name the right angle C and the hypotenuse c, with each leg named after the angle it faces: leg a is opposite angle A (α here) and leg b is opposite angle B (β). Some books use x, y, and r, or call the angles θ and φ. The formulas are identical; only the letters change, so match each value to its position before entering it.

How to Use the Right Triangle Calculator

  1. Enter two values. Fill in any two boxes and leave the others empty. Leg a is opposite angle α, leg b is opposite angle β, and c is the hypotenuse.
  2. Read the solution. Every missing value appears in the results and as a grey hint inside its empty box. The diagram is drawn to scale.
  3. Change a value. Results update as you type. Press Clear to empty every box and start again, or pick an example from the menu.

Angles are in degrees. The calculator rejects impossible inputs, such as a leg longer than the hypotenuse, an angle of 90° or more, or an area too large for the given hypotenuse.

SOH CAH TOA Formulas

sin α = opposite ÷ hypotenuse = a ÷ c cos α = adjacent ÷ hypotenuse = b ÷ c tan α = opposite ÷ adjacent = a ÷ b
Example: c = 10, α = 30° a = c sin α = 10 × 0.5 = 5 b = c cos α = 10 × 0.8660 = 8.6603 β = 90° − 30° = 60°; area = 5 × 8.6603 ÷ 2 = 21.65

Opposite and adjacent depend on which angle you use. For β, the opposite side is b and the adjacent side is a.

Finding Angles from Two Sides

α = arctan(a ÷ b) = arcsin(a ÷ c) = arccos(b ÷ c) Legs a = 5, b = 12: α = arctan(0.4167) = 22.62° β = 90° − 22.62° = 67.38°; c = √(25 + 144) = 13

Inverse functions turn a ratio back into an angle. Scientific calculators label them sin⁻¹, cos⁻¹, and tan⁻¹. Check that the calculator is in degree mode; in radian mode, arctan(0.4167) shows 0.3948 instead of 22.62.

Special Right Triangles

TriangleAnglesSide ratioExample
Isosceles right45°, 45°, 90°1 : 1 : √27, 7, 9.8995
30 60 9030°, 60°, 90°1 : √3 : 25, 8.6603, 10
3, 4, 536.87°, 53.13°, 90°3 : 4 : 56, 8, 10
5, 12, 1322.62°, 67.38°, 90°5 : 12 : 1310, 24, 26

Memorizing the first two ratios lets you solve these triangles without a calculator. The calculator names them when your inputs match.

Area, Perimeter, and Altitude

Area = ab ÷ 2 · Perimeter = a + b + c Altitude to hypotenuse h = ab ÷ c Legs 6 and 8: c = 10, area = 24, h = 48 ÷ 10 = 4.8 Inradius r = (a + b − c) ÷ 2 · Circumradius R = c ÷ 2 Legs 6 and 8: r = 2, R = 5

The hypotenuse is a diameter of the circle through all three corners, which is why R is half of c. The altitude splits c into pieces a² ÷ c and b² ÷ c (3.6 and 6.4 for legs 6 and 8).

Which Ratio Should You Use?

Pick the ratio that links the value you know with the value you want, both measured from the same angle.

You knowYou wantUse
HypotenuseOpposite sideopposite = c × sin α
HypotenuseAdjacent sideadjacent = c × cos α
Adjacent sideOpposite sideopposite = adjacent × tan α
Opposite sideHypotenusec = opposite ÷ sin α
Adjacent sideHypotenusec = adjacent ÷ cos α
Two sidesAn anglearcsin, arccos, or arctan of their ratio

If the unknown is in the denominator, divide instead of multiplying. With a known opposite side of 5 and α = 30°, c = 5 ÷ 0.5 = 10.

Slope, Grade, and Angles of Elevation

A slope is a right triangle whose legs are the rise and the run. The angle comes from arctan(rise ÷ run), and the grade in percent is (rise ÷ run) × 100.

angle = arctan(grade ÷ 100) 10% road grade: arctan(0.1) = 5.71° 1 in 12 ramp: arctan(1 ÷ 12) = 4.76°, grade 8.33% 45°: rise equals run, grade 100%

An angle of elevation is measured upward from horizontal to an object, and an angle of depression is measured downward. Both use the horizontal distance as the adjacent side, so height = distance × tan(angle). Enter the distance as leg b and the angle as α to solve it here.

Practical Examples and Common Mistakes

Height of a tree. Standing 20 m from a tree, you measure a 35° angle up to its top. Height = 20 × tan 35° = 20 × 0.7002 = 14.00 m, plus your eye height above the ground.

Roof pitch. A 6 in 12 pitch rises 6 for every 12 of run, an angle of arctan(0.5) = 26.57°. For a 12 ft run, the rafter is √(144 + 36) = 13.42 ft before overhang.

From area and perimeter. A right triangle with area 24 and perimeter 24 has c = (P² − 4 × area) ÷ 2P = (576 − 96) ÷ 48 = 10, and legs 6 and 8.

  • Radian mode. A calculator in radian mode gives sin 30 = −0.988 instead of 0.5.
  • Wrong side for the angle. Label opposite and adjacent from the angle you are using, not from the picture's orientation.
  • Only two angles. Angles fix the shape, not the size. Add one length.
  • Rounding early. Keep full precision until the final answer to avoid drift in later steps.
  • Using right triangle rules on other triangles. For triangles without a 90° angle, use the law of sines or cosines in the triangle calculator.

Frequently Asked Questions

How do you solve a right triangle?
Start from two values, at least one a length. With two sides, use the Pythagorean theorem for the third side and an inverse trig function for the angles. With a side and an angle, use sine, cosine, or tangent for the other sides and 90° minus the angle for the second angle. This calculator also solves from area or perimeter.
What is SOH CAH TOA?
A memory aid: Sine = Opposite ÷ Hypotenuse, Cosine = Adjacent ÷ Hypotenuse, Tangent = Opposite ÷ Adjacent. For a 30° angle and hypotenuse 10, the opposite side is 10 × sin 30° = 5 and the adjacent side is 10 × cos 30° = 8.66. The ratio table in the results lists all six ratios for both angles.
How do you find the angles of a right triangle from the sides?
Use inverse trig: α = arctan(a ÷ b), arcsin(a ÷ c), or arccos(b ÷ c), depending on which sides you know. Then β = 90° − α. Legs 5 and 12 give α = 22.62° and β = 67.38°. All three formulas give the same angle when the sides are consistent.
What are the side ratios of a 30 60 90 triangle?
1 : √3 : 2, with the short leg opposite 30° and the hypotenuse twice the short leg. A short leg of 5 gives a long leg of 8.66 and a hypotenuse of 10. The 45 45 90 triangle has ratio 1 : 1 : √2.
How do you find the area of a right triangle?
Area = ab ÷ 2, because the legs are a base and height at right angles. Legs 6 and 8 give 24 square units. You can also enter the area as one of your two values, together with a side, an angle, or the perimeter, to solve the rest of the triangle.

Sources & References

  • OpenStax. Algebra and Trigonometry, 7.2 Right Triangle Trigonometry (sine, cosine, tangent ratios, special angles). openstax.org
  • OpenStax. Precalculus 2e, 6.3 Inverse Trigonometric Functions (finding angles from two sides). openstax.org
  • Weisstein EW. Right Triangle (area, inradius, circumradius, altitude). Wolfram MathWorld. mathworld.wolfram.com

Results are for educational purposes. Check critical measurements before cutting or building. Methodology reviewed: 2026.