Math

Triangle Solver

Solve a triangle from any valid combination of sides and angles using the sine and cosine rules, with the ambiguous case detected and both solutions given when two exist.

Last reviewed by the Radiatus Cloud team

Solution appears here.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

Three measurements determine a triangle, with one exception

Given three sides, two sides and the angle between them, or two angles and any side, the triangle is fixed and every remaining measurement follows. Three angles are not enough, because they fix the shape and leave the size free: infinitely many similar triangles share them. The one genuinely awkward case is two sides and an angle not between them, which can produce two different valid triangles, one, or none at all.

The ambiguous case is a real ambiguity

With two sides and a non included angle, swinging the second side from the end of the first can meet the base line in two places, one, or neither, depending on whether it is long enough to reach and short enough to cross twice. A solver that silently returns one answer here is discarding a genuine solution. Both are reported below when both exist, because the input does not contain the information needed to choose between them.

Which rule to use, and why it matters

The cosine rule is numerically stable everywhere and is the right choice for finding an angle from three sides. The sine rule is simpler and has a trap: the inverse sine always returns an acute angle, so an obtuse angle computed that way comes out wrong without a separate check. Deriving the largest angle with the cosine rule first, then using the sine rule for the rest, avoids the problem entirely, which is what this solver does.

Related tools

  • Percentage Calculator — Calculate percentages, percentage change, increase and decrease, and reverse percentages, with the working shown for each result.
  • Statistical Calculator — Calculate mean, median, mode, standard deviation, and more.
  • Probability Calculator — Calculate probabilities for single and combined events, including conditional probability and Bayes' theorem.
  • Scientific Calculator — Perform advanced mathematical operations including trig, log, and exponents.

Frequently Asked Questions

Why can three angles not determine a triangle?

Because they fix only the shape, not the size. Every triangle with those angles is a scaled copy of every other, so at least one side length is needed to pin down which one.

What is the ambiguous case?

Two sides and an angle not between them, which can produce two valid triangles, one, or none. The second side swings from the end of the first and may cross the base line twice. Both solutions are shown here, because the input genuinely does not distinguish them.

Why prefer the cosine rule for angles?

Because the inverse sine always returns an acute angle, so an obtuse angle found with the sine rule comes out wrong unless it is separately checked. The cosine rule returns the correct angle across the whole range with no extra case analysis.

What makes a set of sides invalid?

Any side longer than the sum of the other two. There is no triangle with sides 1, 2 and 10, because the two short sides cannot reach across the long one. Angles must also sum to exactly 180 degrees.

How is the area calculated?

From Heron's formula when three sides are known, and from half the product of two sides and the sine of the included angle otherwise. For a very thin triangle, Heron's formula in its textbook form loses accuracy, and a stable rearrangement is used here.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Enter any three measurements including at least one side to solve the whole triangle.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.