ThisCalculator

Math

Find X on Triangle Calculator: Solve for Any Side or Angle

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Find X on Triangle Calculator: Solve for Any Side or Angle

This calculator solves for the unknown side or angle, labeled “x,” in a triangle. You enter the known sides and angles you have, choose which value you want to find, and the calculator applies the correct trigonometric formula to return the missing measurement. The result is given in the same units as your inputs for sides and in degrees for angles.

Formula

The calculator uses the Law of Sines when you know two angles and one side (AAS or ASA) or two sides and a non-included angle (SSA). The formula is:

a / sin(A) = b / sin(B) = c / sin(C)

Where:

  • a, b, c are the side lengths (in any consistent unit, e.g., cm, m, ft)
  • A, B, C are the angles opposite those sides, in degrees

To find an unknown side, rearrange: x = (known side × sin(opposite angle)) / sin(known angle). To find an unknown angle, use: x = arcsin((opposite side × sin(known angle)) / known side).

Worked Example

Using the default values: side a = 5, side b = 7, angle A = 35°, angle B = 50°. We want to find side b (labeled x).

  1. Write the Law of Sines: 5 / sin(35°) = x / sin(50°)
  2. Calculate sin(35°) ≈ 0.5736 and sin(50°) ≈ 0.7660
  3. Rearrange: x = 5 × 0.7660 / 0.5736
  4. x ≈ 3.830 / 0.5736 ≈ 6.68

The calculator returns x ≈ 6.68, matching the manual calculation.

When to Use This Calculator

Use this tool when you have a triangle with at least three known measurements and at least one side. It works for any triangle—right, acute, or obtuse—as long as you have enough information. Common situations include:

  • You know two angles and one side (AAS or ASA)
  • You know two sides and a non-included angle (SSA, but beware of the ambiguous case)
  • You need to find a missing angle when you know two sides and one angle

If you have two sides and the included angle (SAS), you need the Law of Cosines instead. If you have all three sides (SSS), use the Law of Cosines to find angles.

How to Read the Result

The output is the value of x—either a side length or an angle in degrees. For side lengths, the unit matches whatever you entered (cm, m, ft, etc.). For angles, the result is in degrees, not radians. If you need radians, divide by 180 and multiply by π.

Check whether your result is plausible: a triangle’s angles sum to 180°, and the largest side is opposite the largest angle. If your answer violates these, you likely entered the wrong values or used the wrong mode (degrees vs. radians).

Common Mistakes and Pitfalls

  • Degrees vs. radians: This calculator uses degrees. If you enter angles in radians, the result will be wrong.
  • SSA ambiguous case: When you know two sides and a non-included angle, there can be zero, one, or two possible triangles. The Law of Sines may give an acute angle, but the obtuse supplement (180° − that angle) may also be valid. Check if both satisfy the triangle angle sum.
  • Unit mix-ups: All side lengths must be in the same unit. Mixing cm and m will give a nonsense answer.
  • Angle sum check: If you find two angles, subtract their sum from 180° to get the third. If the sum exceeds 180°, you made an error.

Limitations of the Law of Sines

The Law of Sines is not universal. It fails when you have:

  • SAS (two sides and the included angle): Use the Law of Cosines: c² = a² + b² − 2ab·cos(C)
  • SSS (three sides): Use the Law of Cosines to find any angle: cos(A) = (b² + c² − a²) / (2bc)
  • Right triangles: You can use SOH-CAH-TOA, but the Law of Sines also works if you have the right angle.

For these cases, you need a different calculator or formula. This calculator assumes you have a valid AAS, ASA, or SSA configuration.

Frequently Asked Questions

What does “x” mean in a triangle problem?

“X” is just a placeholder for the unknown side or angle you’re asked to find. It could be any side length or any angle. The problem usually labels the known values and leaves x for the one you must compute.

Can I use this for right triangles?

Yes, but you might not need the Law of Sines. For right triangles, you can use simpler ratios: sine = opposite/hypotenuse, cosine = adjacent/hypotenuse, tangent = opposite/adjacent. This calculator still works if you enter the right angle (90°) and one other angle, plus one side.

How do I solve for x if I only know two sides and the included angle?

That’s a SAS case—use the Law of Cosines: x² = a² + b² − 2ab·cos(C). Take the square root to get the missing side. This calculator doesn’t handle that case, so you’d need a different tool or do it manually.

Why does my calculator give a different answer when I use radians?

Because the sine function gives different values for radians vs. degrees. For example, sin(30°) = 0.5, but sin(30 radians) ≈ −0.988. Always ensure your calculator or tool is in degree mode when working with degrees.

What is the ambiguous case in the Law of Sines?

When you know two sides and a non-included angle (SSA), there may be two possible triangles. The sine function is positive for both an acute angle and its supplement. If the given angle is acute, the unknown angle could be acute or obtuse. Check both possibilities against the angle sum rule.

Can I find x if I only know all three angles?

No. Knowing all three angles only tells you the shape, not the size. You need at least one side length to determine the scale. Infinite triangles have the same angles but different side lengths.

Related

Formula used
in a | Side a | - | 5 | 0
in b | Side b | - | 7 | 0
in A | Angle A (opposite a) | deg | 35 | 0
in B | Angle B (opposite b) | deg | 50 | 0
out x | Unknown side or angle | - | (a / sin(A * pi / 180)) * sin(B * pi / 180) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.