Triangle Calculator
Solve any triangle from three known parts (SSS, SAS, ASA, AAS or SSA) by the laws of sines and cosines: every side and angle, the area and the perimeter, with the triangle drawn.
Result…
How it's calculated
Law of cosines: c² = a² + b² − 2ab cos C Law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C A + B + C = 180° Area = ½ab sin C
Side a is opposite angle A, b opposite B and c opposite C. Three sides (SSS) or two sides and the angle between them (SAS) are solved with the law of cosines; two angles and a side (ASA, AAS) with the angle sum and the law of sines. Two sides and an angle that is not between them (SSA) is the ambiguous case: if side a is shorter than the height b × sin A there is no triangle, if it equals it there is one right triangle, if it lies between the height and side b there are two, and if it is at least side b there is one. Three angles alone (AAA) fix only the shape, not the size, so they are not enough. Answers are rounded to 7 significant figures.
Your numbers, step by step
About the Triangle calculator
This triangle calculator solves a whole triangle from any three parts that fix it: three sides (SSS), two sides and the angle between them (SAS), two angles and the side between them (ASA), two angles and another side (AAS), or two sides and an angle that is not between them (SSA). It returns every missing side and angle, the area, the perimeter and what kind of triangle it is, and draws it. Students use it to check law of sines and law of cosines homework; surveyors, builders and designers use it to find a length or angle they cannot measure directly. Each step is written out with your numbers, so you can follow the working. SSA is the tricky case: the same three parts can give no triangle, one or two, and the calculator tells you which. For area alone, the triangle area calculator is quicker; for right triangles, see the Pythagorean theorem calculator.
How to use it
- Choose what you know under “I know”: SSS, SAS, ASA, AAS or SSA. S stands for a side and A for an angle.
- Pick degrees or radians in “Angles in”, and a “Length unit” if you want the answers labelled.
- Enter the parts. Side a is opposite angle A, side b opposite angle B and side c opposite angle C.
- Read the missing parts, the area and the perimeter. In SSA, check whether the result says no triangle, one triangle or two triangles fit.
Worked example
Two fence lines of 8 m and 11 m meet at 37° (SAS). The law of cosines gives the third side: c = √(8² + 11² − 2 × 8 × 11 × cos 37°) = 6.666345 m. Then A = 46.23749°, B = 96.76251°, the area is ½ × 8 × 11 × sin 37° = 26.48 m² and the perimeter 25.67 m. In SSA, a = 7 cm, b = 9 cm and A = 40° give two triangles: B = 55.73488° with c = 10.83556 cm, or B = 124.2651° with c = 2.953239 cm.
Updated
Questions people ask
How do I solve a triangle with three sides?
Use the law of cosines for each angle: cos A = (b² + c² − a²) ÷ 2bc, and the same pattern for B. The third angle is 180° minus the other two. The sides only make a triangle if each is shorter than the other two together.
When do I use the law of sines and when the law of cosines?
Use the law of cosines when you know three sides, or two sides and the angle between them. Use the law of sines, a ÷ sin A = b ÷ sin B = c ÷ sin C, when you know two angles and a side, or a side and its opposite angle.
What is the ambiguous case (SSA)?
With two sides and an angle that is not between them, side a can swing to meet the third side in two places, one place or none. If a is shorter than the height b × sin A there is no triangle; between that height and b there are two; equal to the height or at least b, there is one.
Can I solve a triangle from three angles?
No. Three angles fix the shape but not the size: every enlargement of the triangle has the same angles. You need at least one side.
Why does my answer differ slightly from my textbook?
Usually because of rounding along the way. The calculator keeps full precision until the end and shows 7 significant figures; rounding an angle to one decimal place halfway through changes the later sides a little.
Does it work in radians?
Yes. Choose radians under “Angles in” and enter the angles in radians; each must be more than 0 and less than π. The answers come out in the same unit.