Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Triangle Calculator

Enter any three of the sides a, b, c and the angles A, B, C, including at least one side. The calculator identifies the case, applies the law of sines or cosines, and reports every side, angle, the area and the perimeter.

Enter exactly three values, including at least one side.

Examples

About the Triangle Calculator

Solving a triangle means finding all three sides and all three angles from the parts you are given. It is a core skill in trigonometry, used in surveying, navigation, engineering drawings and physics problems with forces at angles. The difficulty lies in recognising which case you have and which law to apply first.

This calculator handles every case taught in school and university courses. It names the case, shows the formula used for each unknown, and checks that the angles sum to 180° and that the law of sines ratios agree. For the famous ambiguous case, two sides and an angle that is not between them, it finds whether there are zero, one or two possible triangles and lists each one.

What does it mean to solve a triangle?

Label the triangle so that side aa is opposite angle AA, side bb opposite BB and side cc opposite CC. Solving the triangle means finding all six of these values. Three independent values that include at least one side are usually enough, because three angles alone fix the shape but not the size.

The cases are named by the given parts in order around the triangle: SSS (three sides), SAS (two sides and the angle between them), ASA (two angles and the side between them), AAS (two angles and a side not between them) and SSA (two sides and an angle not between them).

How to use the Triangle Calculator

  1. Label your triangle so each side letter matches the opposite angle letter.
  2. Enter exactly three known values; angles are in degrees.
  3. Leave the other three boxes empty.
  4. Press Solve triangle.
  5. Read the case, the steps, and every side, angle, the area and perimeter; for SSA, check whether two triangles are listed.

Formulas

Angle sum

A+B+C=180∘A + B + C = 180^\circ

Law of sines

asin⁡A=bsin⁡B=csin⁡C\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}

Law of cosines

c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C

Area

Area=12absin⁡C\text{Area} = \tfrac12 ab \sin C

Worked example: SSS: 3, 4, 5

The first example is the 3-4-5 triangle, an SSS case. The law of cosines gives cos⁡C=9+16−2524=0\cos C = \frac{9 + 16 - 25}{24} = 0, so C=90°C = 90°, and similarly A≈36.870°A \approx 36.870° and B≈53.130°B \approx 53.130°. The area is 12×3×4=6\frac12 \times 3 \times 4 = 6 and the perimeter is 12.

An SAS example has a=7a = 7, b=10b = 10 and C=60°C = 60°. Then c2=49+100−140cos⁡60°=79c^2 = 49 + 100 - 140\cos 60° = 79, so c≈8.888c \approx 8.888, and the area is 12×7×10×sin⁡60°≈30.311\frac12 \times 7 \times 10 \times \sin 60° \approx 30.311.

The solution below is generated by the same engine that powers the calculator above.

Final answer

Area≈6\text{Area} \approx 6

How we read your problem

Side a is opposite angle A, b opposite B and c opposite C. This is the SSS case.

SSS\text{SSS}

Step-by-step solution

  1. Each angle from the law of cosines

    cos⁡A=b2+c2−a22bc⇒A≈36.86989765∘, B≈53.13010235∘, C≈90∘\cos A = \frac{b^2 + c^2 - a^2}{2bc} \Rightarrow A \approx 36.86989765^\circ,\ B \approx 53.13010235^\circ,\ C \approx 90^\circ
  2. Area and perimeter

    Area=12absin⁡C≈6, P≈12\text{Area} = \tfrac12ab\sin C \approx 6,\ P \approx 12

Formulas used

  • Law of sines

    asin⁡A=bsin⁡B=csin⁡C\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}
  • Law of cosines

    c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C
  • Area

    Area=12absin⁡C\text{Area} = \tfrac12 ab\sin C

Three measurements including a side normally fix a triangle. Two sides with a non-included angle (SSA) can give zero, one or two triangles.

Verification

  • Triangle 1: angles sum to 180°; a/sin A = 5 = c/sin C = 5.

Detailed explanation

Which law to use

Use the law of cosines when you know all three sides (SSS) or two sides and the angle between them (SAS). In both cases the law of sines has no complete ratio to start from. Using the law of cosines for the remaining angles also avoids a pitfall: an angle's sine cannot tell an acute angle from its obtuse partner, but its cosine can.

Use the law of sines when you know two angles and a side (ASA or AAS). First find the third angle from the angle sum, then each unknown side from a complete ratio. With A=40°A = 40°, B=60°B = 60° and c=10c = 10, the third angle is C=80°C = 80° and a=10sin⁡40°/sin⁡80°≈6.527a = 10\sin 40° / \sin 80° \approx 6.527.

The ambiguous case (SSA)

Given a=6a = 6, b=8b = 8 and A=35°A = 35°, the law of sines gives sin⁡B=8sin⁡35°/6≈0.765\sin B = 8\sin 35° / 6 \approx 0.765. Two angles have this sine: about 49.886° and its supplement, about 130.114°. Both leave room for a positive third angle, so two different triangles fit the data, one with c≈10.419c \approx 10.419 and one with c≈2.687c \approx 2.687.

If the side opposite the given angle is too short, sin⁡B\sin B comes out greater than 1 and no triangle exists; with a=3a = 3, b=8b = 8 and A=35°A = 35°, it would be about 1.53. If the side is long enough, as with a=10a = 10, b=8b = 8 and A=35°A = 35°, the obtuse candidate makes the angles exceed 180°, so exactly one triangle exists.

Checking a solution

A correct solution satisfies several checks. The angles add to 180°, the largest side is opposite the largest angle, and the three ratios a/sin⁡Aa/\sin A, b/sin⁡Bb/\sin B and c/sin⁡Cc/\sin C are equal; that common ratio is the diameter of the circumscribed circle.

For SSS input, the triangle inequality must hold: each side must be shorter than the sum of the other two. Lengths 1, 2 and 3 fail because the two short sides lie flat along the long one, so the calculator reports that no triangle exists.

Common mistakes

  • Mislabelling sides so that a is not opposite A.
  • Using the law of sines to find an obtuse angle and getting its acute partner instead.
  • Forgetting the second solution in the ambiguous SSA case.
  • Leaving a handheld calculator in radian mode.
  • Rounding an intermediate side before using it to find the next angle.

Tips

  • Sketch the triangle roughly to scale before calculating.
  • Find the largest angle first with the law of cosines when you have SSS.
  • In SSA problems, compare the side opposite the given angle with the other given side to anticipate the number of triangles.
  • For right triangles, the Pythagorean theorem calculator gives exact radical answers.
  • The area formula ½ab sin C works with any two sides and the angle between them.

Frequently asked questions

How many values do I need to solve a triangle?

Three, including at least one side. Three angles alone describe the shape but allow triangles of any size.

When should I use the law of sines instead of the law of cosines?

Use the law of sines when you know an angle and its opposite side, as in ASA, AAS and SSA. Use the law of cosines for SSS and SAS, where no such pair is known.

What is the ambiguous case in trigonometry?

It is the SSA case, two sides and a non-included angle. The data can describe no triangle, one triangle or two different triangles, because an acute angle and its supplement share the same sine.

How do I find the area of a triangle without the height?

Use Area = ½ab sin C with two sides and the angle between them, or Heron's formula when you know all three sides.

Why does the calculator say no triangle exists?

Either the sides break the triangle inequality, the given angles already add to 180° or more, or in SSA the side opposite the angle is too short to reach the third side.

Can the triangle calculator handle obtuse triangles?

Yes. It uses the law of cosines wherever an angle could be obtuse, so angles larger than 90° are found correctly.

What is the common ratio in the law of sines?

The ratio a/sin A equals the diameter of the triangle's circumscribed circle, so it is the same for all three side–angle pairs.

Solve your triangle

Enter any three sides or angles above, including at least one side, to get the complete triangle.

More math calculators