Math Tools

Triangle Calculator: Solve Any Triangle From 3 Values

Enter any three values of a triangle, with at least one side, and the calculator finds the missing sides and angles, the area, the perimeter and the height. It handles SSS, SAS, ASA, AAS and the ambiguous SSA case, where two different triangles can fit.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use the Triangle Calculator

Fill in exactly three of the six boxes and leave the rest empty. Angle A sits opposite side a, B opposite b and C opposite c. Press Calculate.

Read more: How to Use the Triangle Calculator: Steps and a Worked Example

Which rule is used

With three sides (SSS) the law of cosines gives each angle. With two sides and the angle between them (SAS) the law of cosines gives the third side. With two angles and a side (ASA or AAS) the third angle is 180° minus the other two and the law of sines gives the sides.

The ambiguous SSA case

Two sides and an angle that is not between them can fit zero, one or two triangles. With a = 6, b = 8 and A = 40°, angle B can be 58.987° or 121.013°, giving a third side of 9.2198 or 3.037. The calculator shows both triangles when that happens.

Area and height

The area comes from Heron's formula, √(s(s − a)(s − b)(s − c)), where s is half the perimeter. For sides 5, 7 and 9, s = 10.5 and the area is 17.4123. The height on a side is twice the area divided by that side.

Checking your values

Any two sides must add up to more than the third, and the angles must add up to 180°. Three angles alone fix the shape but not the size, so at least one side is needed.

The formula

Law of cosines: c² = a² + b² − 2ab·cos C. Law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C. Area by Heron: √(s(s − a)(s − b)(s − c)), s = half the perimeter.

Examples

  • With the default values
    Side a: 5
    Side b: 7
    Side c: 9
    Angle A: 33.5573°
  • With side a set to 10
    Side a: 10
    Side b: 7
    Side c: 9
    Angle A: 76.2259°

Limitations and assumptions

Angle A is opposite side a, B opposite b and C opposite c. Results are rounded to 4 decimal places.

Frequently asked questions

How do I solve a right triangle?

Enter the two known sides and 90 in the angle opposite the longest side. For legs 3 and 4 with C = 90°, the hypotenuse c is 5.

Why do I get two answers?

Two sides and a non-included angle (SSA) can make two different triangles. Both are valid unless your drawing rules one out.

Are angles in degrees?

Yes. Enter and read all angles in degrees.