Math Solver Free

Triangle Calculator

Solve SSS, SAS, or ASA — every side, angle, area, and perimeter.

Side a
3
Side b
4
Side c
5
∠A
36.87°
∠B
53.13°
∠C
90°
Area
6
Perimeter
12

Step 1: Angle A (opposite side a) via law of cosines: cos A = (b² + c² − a²) / 2bc = 36.87°

Step 2: Angle B similarly = 53.13°, then C = 180° − A − B = 90°

Step 3: Semi-perimeter s = (a + b + c) / 2 = 6; area = √[s(s−a)(s−b)(s−c)] = 6

How to Solve a Triangle

“Solving” a triangle means finding every unknown side and angle from the ones you know. You always need three pieces of data, and at least one of them must be a side — three angles alone only fix the shape, not the size. This calculator takes the three values you have, under the SSS, SAS or ASA pattern they match, and returns the complete picture: the remaining sides and angles, the area and the perimeter, with the law-of-cosines, law-of-sines and Heron steps written out beneath the results. It also refuses impossible data, such as sides that cannot meet, instead of dressing up nonsense as an answer.

The Laws and Their Symbols

The labelling convention pairs each side with the angle opposite it: side a lies opposite angle A, side b opposite B, and side c opposite C. The law of cosines, c² = a² + b² − 2ab·cos C, connects all three sides with one angle: a and b are the sides forming angle C, c is the side across from it, and cos C is the cosine of that included angle — set C = 90° and cos C = 0, collapsing the law into Pythagoras. The law of sines states a plain proportion, a ⁄ sin A = b ⁄ sin B = c ⁄ sin C: each side divided by the sine of its opposite angle gives the same number. Heron’s formula uses one extra symbol, s, the semi-perimeter (a + b + c)/2, and gives area = √[s(s−a)(s−b)(s−c)].

How to Use This Triangle Calculator

  1. Pick the tab matching your data: SSS for three sides, SAS for two sides and the included angle, or ASA for two angles and the side between them. The three input labels change with the tab — SAS asks for Side a, Side b and Included angle C, while ASA asks for Angle A, Side c and Angle B.
  2. Type your three values, remembering that angles are in degrees and every entry must be positive. The solver recalculates as you type; there is no solve button.
  3. Read the dark results grid: Side a, b and c, angles A, B and C, Area and Perimeter, followed by the numbered working steps. An amber message instead means the values are incomplete or cannot form a triangle.

The Three Cases

  • SSS (three sides): angles come from the law of cosines, e.g. cos A = (b² + c² − a²) / 2bc.
  • SAS (two sides + included angle): the third side comes from the law of cosines, then the law of sines finishes the angles.
  • ASA (two angles + included side): the third angle is 180° minus the other two, then the law of sines gives the remaining sides.

Watch Out For

Not every trio of numbers makes a triangle: sides 2, 3, 10 violate the triangle inequality. And SSA (two sides and a non-included angle) is the famous ambiguous case that can yield zero, one, or two valid triangles — a deeper topic for another day.

Worked Example 1: SSS With Sides 3, 4 and 5

Enter a = 3, b = 4 and c = 5 on the SSS tab. With all sides known, each angle comes from rearranging the law of cosines, starting with the angle opposite side a.

  1. Angle A: cos A = (b² + c² − a²) / 2bc = (16 + 25 − 9) / 40 = 0.8, so A = cos⁻¹(0.8) ≈ 36.87°.
  2. Angle B: cos B = (a² + c² − b²) / 2ac = (9 + 25 − 16) / 30 = 0.6, so B = cos⁻¹(0.6) ≈ 53.13°.
  3. Angle C: C = 180° − 36.87° − 53.13° = 90° — the familiar right angle of the 3-4-5 triangle.
  4. Area: s = (3 + 4 + 5)/2 = 6, so area = √(6 × 3 × 2 × 1) = √36 = 6, and the perimeter is 12.

The angles total 36.87° + 53.13° + 90° = 180°, exactly as every triangle demands, and Heron’s area of 6 agrees with ½ × 3 × 4 for a right triangle with legs 3 and 4.

Worked Example 2: SAS With a = 8, b = 5 and C = 60°

On the SAS tab, enter Side a = 8, Side b = 5 and Included angle C = 60°. Because the angle sits between the two known sides, the law of cosines reaches straight across it to the missing side c.

  1. Missing side: c² = a² + b² − 2ab·cos C = 64 + 25 − 80 × 0.5 = 49, so c = 7.
  2. Angle A by the law of sines: sin A = a·sin C / c = 8 × sin 60° / 7 ≈ 0.9897, so A ≈ 81.79°.
  3. Angle B: B = 180° − 81.79° − 60° = 38.21°.
  4. Area and perimeter: area = ½ab·sin C = ½ × 8 × 5 × sin 60° ≈ 17.32, and the perimeter is 8 + 5 + 7 = 20.

Check the angle sum: 81.79° + 38.21° + 60° = 180°. The law of cosines can cross-check angle A as well: cos A = (25 + 49 − 64) / 70 ≈ 0.1429, giving the same 81.79°.

When Solving a Triangle Solves a Real Problem

A builder cutting a triangular gable knows two wall lengths and the pitch angle between them, and needs the rafter length — a pure SAS job. A landowner with three measured boundary lengths gets the plot’s corner angles and its area for fencing and records from SSS. A navigator who sights two landmarks at known angles from the ends of a measured baseline fixes both distances by ASA. Gardeners pricing turf for a triangular lawn, and carpenters bracing a gate with a diagonal, are solving the same three cases in work clothes.

Three Mistakes Triangle Solvers Punish

  • Feeding SAS a non-included angle: the SAS tab treats its third input as angle C, the angle between sides a and b. Enter an angle from elsewhere in the triangle and every result that follows is quietly wrong, however neat it looks.
  • Letting ASA angles total 180° or more: two angles of 100° and 85° leave nothing for the third angle, so no triangle exists. The two entered angles must sum to less than 180°, with the difference becoming angle C.
  • Breaking the side–angle pairing: side c in ASA must be the side between angles A and B, and in SSS each computed angle sits opposite its named side. Relabelling the diagram midway swaps answers between corners.

Solving the equations behind these laws by hand? Try our equation solver or the scientific calculator.

Frequently Asked Questions

What information do I need to solve a triangle?

You need any three pieces of information that include at least one side: three sides (SSS), two sides with the angle between them (SAS), or two angles with the side between them (ASA). Three angles alone are not enough, because they fix the shape but not the scale — triangles of every size share the same angles. Choose the matching tab above and enter your three values.

How is the area of a triangle calculated here?

Once all three sides are known, the calculator uses Heron's formula: area = √[s(s−a)(s−b)(s−c)], where s is the semi-perimeter, half of a + b + c. For the 3-4-5 triangle, s = 6 and the area is √(6 × 3 × 2 × 1) = √36 = 6 square units. With SAS input, the completed third side feeds the same formula, agreeing with ½ab·sin(C).

How does the calculator decide which law to use?

It follows the data you give it. With three sides, it applies the law of cosines, cos A = (b² + c² − a²)/2bc, to recover the angles. With SAS it finds the missing side by the law of cosines, then an angle by the law of sines. With ASA it subtracts the two angles from 180°, then scales that side with the law of sines to find the others.

Why is there no SSA mode?

SSA — two sides and an angle that is not between them — is deliberately not offered, because it is the ambiguous case: the same data can describe no triangle, one triangle, or two triangles, depending on how the loose side lands. A single-answer tool would have to hide that ambiguity. If your angle sits between the two known sides, your data is SAS and the tab above solves it.

What if my sides cannot form a triangle?

The calculator checks the triangle inequality before solving: each pair of sides must add up to more than the third side, because the direct route between two corners is always the shortest. Sides of 2, 3 and 10 fail, since 2 + 3 falls short of 10, and you will see an error message instead of impossible angles. The same check catches most typing slips, such as an extra zero.

Is this triangle calculator free?

Yes. The triangle calculator is completely free, needs no sign-up, and solves instantly in your browser as you type. Switch freely between the SSS, SAS and ASA tabs, and every result — all three sides, all three angles, area and perimeter — arrives with the law-of-cosines and Heron steps printed underneath, so you can follow, copy or check the working behind the numbers.

Related Tools & Guides

About the MathSolverFree Team

The MathSolverFree Team builds and maintains the calculators and step-by-step solvers on this site. Every tool is checked against worked textbook examples before it is published, and the method behind each solver is written out in full — in the worked examples on the page and in our guides — so you can see exactly how an answer is reached, not just the answer itself.

How we build and test our tools·More about the team