Right Triangle Calculator

A right triangle can be fully solved from any two independent values, besides the 90° angle. With legs 3 and 4, the hypotenuse is 5, the angles are 36.87° and 53.13°, the area is 6 and the altitude to the hypotenuse is 2.4.

Last updated · By · Runs in your browser, nothing is uploaded

Result

Step-by-Step Solution

Enter your values above to see the full working.

What Is a Right Triangle?

A right triangle is a triangle with one 90° angle. The side opposite the right angle is the hypotenuse, the longest side. The other two sides are the legs. Right triangles are the foundation of trigonometry, and they appear everywhere in practical measuring: slopes, ramps, roof pitches, shadows and distances.

To solve a right triangle means to find every unknown side and angle. You always need two pieces of information in addition to the right angle: two sides, or one side and one acute angle. This calculator accepts six different combinations of known values and returns everything else, including the area, perimeter, altitude to the hypotenuse and the radius of the inscribed circle.

Trigonometric Ratios

RatioDefinitionFor 3-4-5, angle A = 36.87°
sin Aopposite ÷ hypotenuse = a ÷ c0.6
cos Aadjacent ÷ hypotenuse = b ÷ c0.8
tan Aopposite ÷ adjacent = a ÷ b0.75

Right Triangle Formulas

a² + b² = c² sin A = a ÷ c cos A = b ÷ c tan A = a ÷ b A + B = 90° Area = ½ab Altitude to hypotenuse h = ab ÷ c Inradius r = (a + b − c) ÷ 2
  • a and b are the legs, and c is the hypotenuse.
  • A is the angle opposite leg a, and B is the angle opposite leg b.
  • The two acute angles always add up to 90°.
  • The inradius of a right triangle has the neat formula (a + b − c) ÷ 2.

The first relationship is the Pythagorean theorem. For a general triangle with three known sides, use the triangle area calculator.

How Is It Calculated? Worked Examples

Both Legs Known: a = 3, b = 4

  1. c = √(9 + 16) = 5.
  2. A = arctan(3 ÷ 4) = 36.87° and B = 90° − 36.87° = 53.13°.
  3. Area = ½ × 3 × 4 = 6.
  4. Altitude to the hypotenuse = 3 × 4 ÷ 5 = 2.4, and inradius = (3 + 4 − 5) ÷ 2 = 1.

Hypotenuse and an Angle: c = 10, A = 30°

a = 10 sin 30° = 5 and b = 10 cos 30° = 8.660. The area is 21.65 and the perimeter 23.66.

A Leg and an Angle: b = 12, A = 40°

a = 12 tan 40° = 10.07 and c = 12 ÷ cos 40° = 15.66.

Tree Height from Its Shadow

A tree casts a 15 m shadow when the sun is 40° above the horizon. Its height is 15 × tan 40° ≈ 12.6 m.

A Wheelchair Ramp

A ramp rising 1 m over a horizontal run of 12 m has a length of √(1 + 144) = 12.04 m and a slope angle of arctan(1 ÷ 12) = 4.76°.

Special Right Triangles

TriangleAnglesSide ratio
45-45-9045°, 45°, 90°1 : 1 : √2
30-60-9030°, 60°, 90°1 : √3 : 2

Slope as a Percentage and Roof Pitch

A slope of 1 in 12 corresponds to 8.33% and an angle of 4.76°. A roof pitch of 6:12, rising 6 units for every 12 across, has a slope angle of arctan(0.5) = 26.57°, and each metre of horizontal run needs rafters 1.118 m long.

How to Use This Right Triangle Calculator

  1. Choose which two values you know: both legs, a leg and the hypotenuse, or a side and an acute angle.
  2. Enter those two values. Ignore the other inputs.
  3. Read all three sides, both acute angles, the area, the perimeter, the altitude to the hypotenuse and the inradius.

Angles are in degrees. The hypotenuse must be longer than any leg you enter.

Where Right Triangles Are Used

  • Construction: roof pitch, stair rise and run, ramps and bracing.
  • Surveying and navigation: measuring heights and distances indirectly with angles.
  • Physics and engineering: resolving forces and velocities into components.
  • Computer graphics and robotics: distance and angle calculations.
  • Everyday tasks: finding the height of a tree, a building or a hill from a distance and an angle.

What Are the Most Common Mistakes With the Right Triangle Calculator?

  • Calculator in the wrong angle mode. Make sure the angle is in degrees, as here.
  • Mixing up opposite and adjacent. The opposite side faces the angle, the adjacent side touches it.
  • Entering a hypotenuse shorter than a leg. That cannot form a right triangle.
  • Entering two angles. Angles alone fix the shape, not the size. You need at least one side.
  • Assuming a 90° angle. The formulas apply only if the triangle has a right angle.
  • Rounding too early. Keep extra digits for further steps.

Where Can You Verify These Formulas?

The definitions and formulas on this page follow standard references. Check them against these sources:

Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.

Frequently Asked Questions

How do you solve a right triangle?

Use the Pythagorean theorem and the trigonometric ratios sin, cos and tan to find the unknown sides and angles from two known values.

What is the sum of the angles in a right triangle?

180°. One angle is 90°, so the two acute angles add up to 90°.

How do I find a missing angle?

Use an inverse trigonometric function, such as A = arctan(a ÷ b), A = arcsin(a ÷ c) or A = arccos(b ÷ c).

What is the altitude to the hypotenuse?

The perpendicular from the right-angle vertex to the hypotenuse. Its length is ab ÷ c, which is 2.4 for the 3-4-5 triangle.

What are special right triangles?

The 45-45-90 triangle with sides in the ratio 1 : 1 : √2, and the 30-60-90 triangle with sides 1 : √3 : 2.

How can I find a height using angles?

Measure the distance to the base and the angle of elevation, then use height = distance × tan(angle).