Triangle Calculator

The tool below solves a triangle — fills in every unknown side and angle from whatever values you already know. Enter any 3 of the 6 values (sides or angles) and the calculator picks the right technique (Pythagorean theorem, Law of Sines, or Law of Cosines) and shows the work step by step.

A B C a b c

Lowercase letters (a, b, c) are side lengths. Uppercase letters (A, B, C) are angles in degrees. Each angle is opposite the side with the matching letter.

Sides

Angles (degrees)

Fill in any 3 of these 6 values, then click Solve.

To solve a triangle is to find every unknown side and angle from the values you already know. You need at least three pieces of information, and at least one of them has to be a side length. Different combinations call for different tools: the Pythagorean theorem for right triangles, the Law of Sines when you have a side and its opposite angle, and the Law of Cosines when you have three sides or two sides with the included angle.

Worked Examples

Three examples worked by hand — the same logic the calculator uses, just spelled out so you can follow it on paper.

Example 1: Right triangle — find c given \(a = 3\), \(b = 4\), \(C = 90°\)

Because angle \(C\) is a right angle, the Pythagorean theorem applies directly:

\[c^2 = a^2 + b^2 = 9 + 16 = 25\] \[c = 5\]

For the remaining angles, use basic trigonometry:

\[\tan A = \dfrac{a}{b} = \dfrac{3}{4} \quad \Rightarrow \quad A = \arctan(0.75) \approx 36.87°\] \[B = 180° - A - C = 180° - 36.87° - 90° = 53.13°\]

Example 2: SAS — find c given \(a = 5\), \(b = 7\), \(C = 60°\)

Two sides and the included angle — use the Law of Cosines:

\[c^2 = a^2 + b^2 - 2ab\cos C = 25 + 49 - 2(5)(7)\cos 60°\] \[c^2 = 74 - 70 \cdot 0.5 = 74 - 35 = 39\] \[c = \sqrt{39} \approx 6.24\]

Then use the Law of Sines to find another angle:

\[\dfrac{\sin A}{a} = \dfrac{\sin C}{c} \quad \Rightarrow \quad \sin A = \dfrac{5 \sin 60°}{6.24} \approx 0.6939\] \[A \approx 43.90° \quad \text{and} \quad B = 180° - A - C \approx 76.10°\]

Example 3: ASA — find a and b given \(A = 30°\), \(B = 45°\), \(c = 10\)

The third angle comes from the angle sum:

\[C = 180° - A - B = 180° - 30° - 45° = 105°\]

Now apply the Law of Sines to find each missing side:

\[\dfrac{a}{\sin A} = \dfrac{c}{\sin C} \quad \Rightarrow \quad a = \dfrac{10 \sin 30°}{\sin 105°} \approx 5.18\] \[b = \dfrac{10 \sin 45°}{\sin 105°} \approx 7.32\]

Solving Strategies by Case

A quick reference for the cases this calculator handles:

You know The case is What to use first
3 sides SSS Law of Cosines
2 sides + included angle SAS Law of Cosines
2 angles + included side ASA Angle sum, then Law of Sines
2 angles + non-included side AAS Angle sum, then Law of Sines
2 sides + non-included angle SSA Law of Sines (ambiguous case — may have 0, 1, or 2 solutions)
One angle = 90° + any other 2 values Right triangle Pythagorean theorem and basic trig
3 angles only AAA Cannot be solved — infinitely many similar triangles

Every valid triangle satisfies the angle sum \(A + B + C = 180°\) and the triangle inequality: each side must be less than the sum of the other two.

Tips for Using the Calculator

  • Enter angles in degrees, not radians
  • Leave any field blank for an unknown
  • You need at least 3 filled fields, and at least one must be a side
  • If you have a right triangle, enter \(90\) for one of the angles (typically \(C\))
  • The SSA combination is the ambiguous case — the calculator reports all valid triangles, not just one

If your problem is specifically about the Pythagorean theorem in a right triangle, the lesson on the Pythagorean Theorem walks through it in detail.

Frequently Asked Questions

What do the lowercase and uppercase letters mean?

The convention is uppercase letters for angles and lowercase letters for sides. Each side is named for the angle directly opposite it: side \(a\) is opposite angle \(A\), side \(b\) is opposite angle \(B\), and side \(c\) is opposite angle \(C\). Once you internalize this pairing, the formulas (especially the Law of Sines) become much easier to read.

When do I use Law of Sines vs. Law of Cosines?

Use the Law of Sines when you have a side and its opposite angle — that pair gives you the ratio \(\dfrac{a}{\sin A}\), and you can transfer it to any other side-angle pair. Use the Law of Cosines when you have three sides (SSS) or two sides with the angle between them (SAS) — those are the situations where no side-angle pair is yet known. A common pattern: use Law of Cosines to crack one missing piece, then Law of Sines for the rest.

What's the "ambiguous case" (SSA)?

When you know two sides and an angle that isn't between them, there may be 0, 1, or 2 valid triangles. The Law of Sines gives \(\sin B\); since \(\sin B = \sin(180° - B)\), two angles can satisfy the equation. The calculator checks each possibility against the triangle inequality and the angle sum, and reports every valid triangle.

Why can't I solve a triangle from just three angles?

Three angles (AAA) determine the shape of a triangle but not its size. A tiny triangle with angles 30°, 60°, and 90° has the same shape as a huge one with those same angles — they are similar but not congruent. To pin down the actual size, you need at least one side length.

Do I need 3 values for a right triangle too?

Yes. The right angle (90°) counts as one of those three. With the right angle and any two other values — two sides, or one side and one acute angle — the triangle is fully determined. The Pythagorean theorem handles side-side combinations; basic trigonometry (sine, cosine, tangent) handles side-angle combinations.