MathsTrigonometry

Right Triangle
solver.

Know two sides, or one side and an angle, and get every other side and angle.

How it's worked out

The labels follow the usual habit. C is the right angle, and c is the hypotenuse, the longest side, across from it. Side a is across from angle A, and side b is across from angle B. So from angle A, side a is the opposite leg and side b is the adjacent leg, the one that touches it. If you know angle B instead, enter 90° minus B as angle A.

Two values fix the triangle when at least one is a length. With two sides, the Pythagorean rule finds the third, and the inverse tangent of the two legs finds angle A.

a2+b2\displaystyle a^2 + b^2=c2\displaystyle {}= c^2

With an angle and a side, pick the ratio that holds the side you know and the side you want. These are the three that SOHCAHTOA names.

sin⁡A\displaystyle \sin A=ac\displaystyle {}= \frac{a}{c}
cos⁡A\displaystyle \cos A=bc\displaystyle {}= \frac{b}{c}
tan⁡A\displaystyle \tan A=ab\displaystyle {}= \frac{a}{b}

The two acute angles always share 90°, so B is 90° minus A. The rest of the figures come from the standard right triangle results. The altitude is the line from the right angle to the hypotenuse, and it cuts the hypotenuse into two parts. The inradius is the radius of the circle inside the triangle. The circumradius is half the hypotenuse, since the hypotenuse is a diameter of the circle through all three corners.

altitude\displaystyle \text{altitude}=abc\displaystyle {}= \frac{ab}{c}
inradius\displaystyle \text{inradius}=a+b−c2\displaystyle {}= \frac{a + b - c}{2}
circumradius\displaystyle \text{circumradius}=c2\displaystyle {}= \frac{c}{2}

Worked examples

Nora measures a tree from 50 m away

Nora stands 50 m from a tree and measures the angle of elevation to its top, 35° above flat. The ground is the leg next to her angle, so the height is 50 times the tangent of 35°, which is 35.01 m. Her line of sight is 61.04 m long.

That height starts at her eye, so she adds the height of her eye above the ground. Her reading also has limits. At 34° the height is 33.73 m, and at 36° it is 36.33 m, so one degree either way moves the answer by more than a meter. Quoting a height to the centimeter would claim more than she measured.

Open this example in the tool

Marcus sets a ladder against a wall

A 6 m ladder stands with its foot 1.5 m from the wall. The ladder is the hypotenuse and the gap is a leg, so it reaches 5.81 m up the wall and leans at 75.5° to the ground, 14.5° off the wall.

OSHA rule 1926.1053(b)(5)(i) asks for a gap of about one quarter of the working length of the ladder, and 1.5 m is one quarter of 6 m. On a real site, the working length runs to the top support, which may be lower than the ladder's tip.

Open this example in the tool

Elena works out a roof rafter

A 6 in 12 roof rises 6 inches for every 12 inches of run. Those are the two legs. The roof angle is 26.57°, and each 12 inches of run needs 656\sqrt{5} inches of rafter, or 13.42 inches.

Elena divides that by 12 to get a slope factor of 1.118. She multiplies the plan length of any run by it to get the rafter length, before any overhang.

Open this example in the tool

Reading your result

Some right triangles have side ratios worth knowing, and the answer names them when it finds one. Whole-number sets such as 3, 4 and 5 are Pythagorean triples. Any multiple of one is a triple too, so 6, 8 and 10 behave the same way.

Common right triangles
TriangleSides a, b, cAngle AArea
30-60-901, 1.732, 230°0.866
45-45-901, 1, 1.41445°0.5
3-4-53, 4, 536.87°6
5-12-135, 12, 1322.62°30
8-15-178, 15, 1728.07°60

The altitude splits the triangle. It makes two smaller triangles of the same shape as the first one. In the 3-4-5 triangle it is 2.4 long, and it cuts the hypotenuse into 1.8 and 3.2. Its square is the product of those two parts.

To check a corner is square, measure 3 units along one wall and 4 along the other. If the diagonal between the marks is 5, the corner is a right angle. Larger multiples such as 6, 8 and 10 give a more reliable check on a big floor.

Exact forms appear only when they are true. Two whole-number sides give an exact third side, such as a square root of 74. A whole-number side with an angle of 30°, 45° or 60° gives exact sides too. Decimals and other angles show decimals only.

Common mistakes

  • Mixing up opposite and adjacent. Those names depend on which angle you are standing at. Swap A for B and the two legs swap names, while the hypotenuse stays put.
  • Giving a leg as long as the hypotenuse. The hypotenuse is always the longest side, so a leg of 5 with a hypotenuse of 5 is rejected. The message reads: The hypotenuse must be longer than either leg.
  • Giving two angles and no side. Angles fix the shape but not the size. Every enlarged copy has the same angles, so you need at least one length.
  • Using this on a triangle with no right angle. These rules rely on the 90° corner. The triangle solver handles any triangle with the laws of sines and cosines.

Questions people ask

Name the side you know and the side you want, from the point of view of your angle. Opposite and hypotenuse means sine, adjacent and hypotenuse means cosine, and opposite and adjacent means tangent. Cross out the side you neither know nor need, and the two left pick the ratio for you.

Sources