Lelifi·tools

SOHCAHTOA Calculator

A right triangle with legs 3 and 4 has a hypotenuse of 5.000 and angles of 36.87 and 53.13 degrees. Enter any two sides, or one side and an acute angle, and the calculator returns the missing sides, both angles, the area and the perimeter.

Enter two sides, or one side and an acute angle, to solve a right triangle with SOHCAHTOA. The calculator returns both legs, the hypotenuse, two acute angles, area and perimeter.

By the Lelifi editors ·

Key takeaways

The 3-4-5 right triangleb = 4 (adjacent)a = 3c = 5A = 36.87 deg90 degtan A = 3 / 4 = 0.75, so A = arctan(0.75) = 36.87 deg
A right triangle with legs 3 and 4, hypotenuse 5, and the 36.87 degree angle at the end of the 4 unit run.
Same triangle, two reference anglesopposite from Aadjacent to AA90 degadjacent to Bopposite from BB90 degThe vertical leg is opposite A and adjacent to B. The ratios follow the chosen angle.
Each acute angle of a right triangle carries its own opposite and adjacent labels, while the hypotenuse stays put.
On this page
  1. What SOHCAHTOA means
  2. The ratios and when to choose them
  3. Worked example: legs 3 and 4
  4. Worked example: a side and an angle
  5. Choose the ratio before the numbers
  6. From ratios to the unit circle
  7. A reliable problem solving routine
  8. Limits, rounding and related tools

What SOHCAHTOA means

SOHCAHTOA is a memory aid for the three trigonometric ratios used with an acute angle in a right triangle. SOH expands to Sine equals Opposite divided by Hypotenuse. CAH expands to Cosine equals Adjacent divided by Hypotenuse. TOA expands to Tangent equals Opposite divided by Adjacent. The opposite side is across from the angle you selected. The adjacent side touches that angle but is not the hypotenuse. The hypotenuse is opposite the 90 degree angle and is always the longest side.

The names are relative, not permanent labels. If you look at the other acute angle, the two legs trade the roles of opposite and adjacent. The hypotenuse stays the same. That small detail explains many errors in homework: a learner identifies a side by its location in the drawing, then changes the reference angle without changing the ratio. Mark the target angle first, name the three sides second, and pick the ratio that contains the known side and the unknown side.

This page follows the right triangle definitions taught by Khan Academy. For broader mathematical definitions of sine, cosine and tangent, see the NIST Digital Library of Mathematical Functions. The browser widget also uses the Pythagorean relationship, so it can solve side-only inputs without guessing an angle.

The ratios and when to choose them

Write the ratio that includes the unknown before entering numbers. If the opposite and hypotenuse are involved, use sin(A) = a / c, then multiply or divide to isolate the missing value. If the adjacent and hypotenuse are involved, use cos(A) = b / c. If both legs are involved, use tan(A) = a / b. In this page, a is opposite angle A, b is adjacent to angle A, and c is the hypotenuse.

RatioFormula relative to AGood input pairRearrangement example
Sinesin A = a / ca and ca = c sin A
Cosinecos A = b / cb and cb = c cos A
Tangenttan A = a / ba and ba = b tan A

All three ratios describe the same shape from different measurements. The calculator uses inverse sine, inverse cosine or inverse tangent when it needs an angle. It restricts an entered acute angle to greater than 0 and less than 90 degrees. A right triangle has exactly one 90 degree angle, so the two remaining angles must add to 90 degrees.

Worked example: legs 3 and 4

Suppose a ramp rises 3 units and runs 4 units. The right angle is between the rise and run. The hypotenuse is the sloping length, so the Pythagorean theorem gives c = sqrt(a^2 + b^2) = sqrt(3^2 + 4^2) = sqrt(9 + 16) = sqrt(25) = 5. The widget reports a = 3.000, b = 4.000, c = 5.000, area 6.00 and perimeter 12.00.

For angle A at the end of the 4 unit run, the opposite leg is 3 and the adjacent leg is 4. Therefore tan(A) = 3 / 4 = 0.75, and A = arctan(0.75) = 36.87 degrees. The other acute angle is B = 90 - 36.87 = 53.13 degrees. A quick check uses sine: sin(36.87 degrees) is about 3 / 5 = 0.60. If your diagram puts angle A at the other end, the numeric angle labels switch while the side lengths do not.

This example is a useful sanity check because 3, 4 and 5 form a familiar Pythagorean triple. Try the same shape at 6 and 8: c = sqrt(36 + 64) = 10, area = (6 x 8) / 2 = 24.00, and the angles remain 36.87 and 53.13 degrees. Scaling a triangle changes lengths but not its angles.

Worked example: a side and an angle

Take a hypotenuse of 10 and angle A of 30 degrees. Since a is opposite A, a = c sin A = 10 sin(30 degrees) = 10 x 0.5 = 5. The adjacent leg is b = c cos A = 10 cos(30 degrees) = 10 x 0.866025... = 8.660 after rounding. The widget returns a = 5.000, b = 8.660, c = 10.000, A = 30.00 degrees, B = 60.00 degrees, area 21.65 and perimeter 23.66.

A second route checks the same result. The tangent ratio predicts tan(30 degrees) = a / b, so b is about 5 / 0.57735 = 8.660. The Pythagorean check gives 5^2 + 8.660^2, which is approximately 25 + 75 = 100, matching c^2. Small differences in the last decimal place come from rounding the displayed cosine value, while the widget keeps full JavaScript precision until it formats the result.

If you know leg b = 4 and angle A = 65 degrees, use b = c cos A, so c = 4 / cos(65 degrees) = 9.465 and a = b tan(65 degrees) = 8.578. The widget displays area 17.16 and perimeter 22.04. These two examples show why the choice of ratio should follow the sides in the diagram rather than the acronym alone.

Choose the ratio before the numbers

Mixed problems are easier when the ratio is selected first and the arithmetic second. The table below maps a pair of known quantities to the ratio that uses them, with a rearranged form for solving a side directly.

KnownWantedRatioRearranged form
Angle A and hypotenuse cLeg aSinea = c sin A
Angle A and hypotenuse cLeg bCosineb = c cos A
Angle A and leg bLeg aTangenta = b tan A
Angle A and leg bHypotenuse cCosinec = b / cos A
Angle A and leg aHypotenuse cSinec = a / sin A
Legs a and bAngle ATangentA = arctan(a / b)

Rows that share an angle and one leg come in pairs: the sine and tangent forms cover the opposite leg, while the cosine form covers the adjacent leg and the hypotenuse. When only sides are known, the tangent row gives an angle and the Pythagorean theorem gives the third side. The widget on this page follows exactly this mapping.

From ratios to the unit circle

Right triangle trigonometry describes acute angles from 0 to 90 degrees. Larger angles, and the periodic behavior that makes sine and cosine useful in physics and engineering, need a wider setting. The unit circle places a point at angle A on a circle of radius 1 and reads the cosine as its horizontal coordinate and the sine as its vertical coordinate.

For acute angles the two views agree exactly, since a right triangle fits inside the first quadrant of that circle. Beyond 90 degrees the coordinates go negative while a triangle cannot, which is why the triangle ratios alone run out. Reading values off the circle also explains the signs seen in the second quadrant, where sine stays positive and cosine turns negative.

The widget on this page stays inside the right triangle case and rejects angles at or beyond 90 degrees. For the wider view, the unit circle calculator evaluates the functions at any angle and shows the coordinates directly.

A reliable problem solving routine

Start by drawing or reading the right angle marker. Circle the acute angle you are solving for and label each side from that angle. Write known values with units, then choose SOH, CAH or TOA. Rearrange the equation with ordinary algebra before using a calculator. Keep the calculator in degree mode if the problem gives degrees. After solving, ask whether the hypotenuse is the longest side, whether the two acute angles total 90 degrees, and whether the result has a sensible scale.

For a side-only problem, the Pythagorean theorem is often the shortest path: c^2 = a^2 + b^2 when the unknown is c, or a = sqrt(c^2 - b^2) when a leg is unknown. The widget supports these cases through the two-side choices. It rejects a hypotenuse that is no longer than a leg because that cannot describe a nonzero right triangle. For a side and angle, it uses the ratio containing those two known quantities and derives the remaining values.

In applied work, state what the result represents. A roof pitch, a ladder angle and a survey line may use different units for length, but ratios are unitless when both sides use the same unit. Round only at the end. The NCTM mathematics standards describe defining trigonometric ratios through similarity and using them with the Pythagorean theorem in right triangle problems.

SOHCAHTOA applies directly to right triangles and acute angles. It does not solve an arbitrary triangle with no right angle. For a non-right triangle, use a law of sines or law of cosines page, and make sure the given sides and angles fit the selected law. The three ratios also do not replace a physical measurement plan: a ladder can slip, a roof can flex, and a measured drawing can contain scale or instrument error.

The widget rounds lengths to three decimal places and area and perimeter to two places for readable output. Its internal trigonometric functions use radians after converting an entered degree value. This is why a displayed 8.660 should not be re-entered as the only source for a high precision calculation. Use the Pythagorean theorem calculator for a focused side relationship, or compare with the sine, cosine and angle tools linked below when studying one function at a time.

For a final check, substitute the displayed values back into the selected ratio. A difference of a few thousandths is expected after formatting. A negative side, an angle at or beyond 90 degrees, or a hypotenuse shorter than a leg signals an input or diagram problem rather than a rounding issue.

Common values are worth knowing without a calculator, because they flag wrong answers fast. A 30 degree triangle has legs in a fixed 1 to 1.732 ratio, a 45 degree triangle has equal legs, and a 60 degree triangle mirrors the 30 degree case.

Anglesincostan
30 degrees0.50.86600.5774
45 degrees0.70710.70711.0000
60 degrees0.86600.51.7321

Each row obeys the identity that the square of the sine plus the square of the cosine equals 1, which is one more check available in a few seconds. The tangent column is the sine column divided by the cosine column in every row.

The widget also makes the error paths explicit, so a drawing problem surfaces as a message instead of a number that looks plausible.

InputWidget response
Legs 3 and 4Solved: c = 5.000, A = 36.87 degrees, area 6.00
Leg a 6 with hypotenuse c 5Error: the hypotenuse must be longer than leg a
Hypotenuse 10 with angle 90Error: the angle must be between 0 and 90 degrees
Leg a 3 with angle B 53.13Solved: A = 36.87 degrees, b = 4.000, c = 5.000

Frequently asked questions

What does SOHCAHTOA stand for?

It means Sine equals Opposite over Hypotenuse, Cosine equals Adjacent over Hypotenuse, and Tangent equals Opposite over Adjacent.

Can this calculator solve a triangle from two legs?

Yes. Choose Two legs, enter positive values such as 3 and 4, and it returns 5.000 for the hypotenuse plus the angles, area and perimeter.

Which side is the hypotenuse?

It is the side opposite the 90 degree angle. It is also the longest side in a valid right triangle.

What are the 3, 4, 5 triangle angles?

With leg a = 3 and leg b = 4, the widget returns angle A = 36.87 degrees and angle B = 53.13 degrees.

Can I enter one side and an angle?

Yes. The widget supports leg a, leg b or hypotenuse c with angle A or angle B, as long as the angle is between 0 and 90 degrees.

Why do opposite and adjacent change?

Those labels depend on the reference angle. When you move from angle A to angle B, the two legs exchange opposite and adjacent roles.

Does the calculator use degrees or radians?

Enter degrees. The widget converts the degree input to radians internally before calling the browser trigonometric functions.

What is the area of a 6 by 8 right triangle?

The area is (6 x 8) / 2 = 24.00 square units, and the hypotenuse is 10.000 units.

What if my hypotenuse is shorter than a leg?

That input cannot describe a right triangle. The hypotenuse must be longer than either positive leg, so the widget shows an error.

Can I use SOHCAHTOA for a non-right triangle?

Not directly. Use a law of sines or law of cosines method for a non-right triangle, or split it into right triangles when the diagram allows it.

How should I round the answer?

Keep extra digits during the calculation and round at the end. This widget displays sides to 3 decimal places and area and perimeter to 2 places.

Are trigonometric ratios unitless?

Yes, when both lengths in a ratio use the same unit. The resulting side still carries the length unit you used.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.