Law of Cosines Triangle Solver — SAS & SSS Calculator

Solve any triangle using the Law of Cosines. Enter two sides and the included angle (SAS) or three sides (SSS) to find all angles, area, perimeter, and more.

cm
cm
°
Side a
5.00 cm
Given or computed first side
Side b
8.00 cm
Given or computed second side
Side c
7.00 cm
Computed via Law of Cosines
Angle A
38.21°
Opposite side a (0.6669 rad)
Angle B
81.79°
Opposite side b (1.4274 rad)
Angle C
60.00°
Opposite side c (1.0472 rad)
Area
17.32 cm²
Computed as ½·a·b·sin(C)
Perimeter
20.00 cm
Sum of all three sides
Semi-perimeter
10.00 cm
Half of perimeter, used in Heron's formula
Inradius
1.73 cm
Radius of inscribed circle = Area / s
Circumradius
4.04 cm
Radius of circumscribed circle
Height to a
6.93 cm
Altitude from vertex A = 2·Area / a
Height to b
4.33 cm
Altitude from vertex B = 2·Area / b
Height to c
4.95 cm
Altitude from vertex C = 2·Area / c
Classification
Acute Scalene
Based on sides and angles

Side Comparison

Side a
5.00 cm
Side b
8.00 cm
Side c
7.00 cm

Angle Comparison

A
38.21°
B
81.79°
C
60.00°

Step-by-Step Solution

#StepFormulaCalculationResult
1Apply Law of Cosines for side cc² = a² + b² − 2ab·cos(C)c² = 5.00² + 8.00² − 2·5.00·8.00·cos(60.00°) = 49.00c = 7.00
2Find angle AA = arccos((b²+c²−a²) / 2bc)A = arccos((88.00) / 112.00)A = 38.21°
3Find angle BB = 180° − A − CB = 180° − 38.21° − 60.00°B = 81.79°
4Compute areaArea = ½·a·b·sin(C)Area = ½·5.00·8.00·sin(60.00°)Area = 17.32 cm²

Triangle Type Reference

TypeSidesAnglesExample
EquilateralAll equalAll 60°5, 5, 5
IsoscelesTwo equalTwo equal5, 5, 8
ScaleneAll differentAll different3, 4, 5
Righta² + b² = c²One 90°3, 4, 5
Acutea² + b² > c²All < 90°5, 6, 7
Obtusea² + b² < c²One > 90°3, 4, 6
Planning notes, formulas, and examples

About the Law of Cosines Triangle Solver — SAS & SSS Calculator

The Law of Cosines is one of the two fundamental tools for solving oblique triangles — triangles that do not have a right angle. It states that for any triangle with sides a, b, c opposite to angles A, B, C respectively: c² = a² + b² − 2ab cos C. This generalises the Pythagorean theorem: when angle C is 90°, cos 90° = 0, and the formula reduces to c² = a² + b².

The Law of Cosines is used in two main configurations. In the SAS (side-angle-side) case, you know two sides and their included angle and need the third side and remaining angles. In the SSS (side-side-side) case, you know all three sides and need all three angles. Once you have the sides and angles, you can compute the area (using ½ab sin C or Heron's formula), the perimeter, the inradius and circumradius, and the three altitudes.

Applications are everywhere — from surveying and navigation (computing distances to unreachable points) to structural engineering (truss analysis) and computer graphics (mesh calculations). This calculator handles both SAS and SSS modes, displays step-by-step solutions, and provides a comprehensive set of derived properties.

When This Page Helps

Use this when you have SAS or SSS data and need a complete triangle solution without manually chaining the Law of Cosines, Heron's formula, and radius formulas. It is practical for surveying, truss checks, navigation problems, and coursework because the sides, angles, area, and derived radii all come from the same solved triangle.

How to Use the Inputs

  1. Select the solution mode: SAS (two sides + included angle) or SSS (three sides).
  2. For SAS mode, enter sides a and b and the included angle C (in degrees).
  3. For SSS mode, enter all three sides a, b, and c.
  4. Click a preset to load common triangle configurations.
  5. Review computed properties: all sides, angles, area, perimeter, inradius, circumradius, and heights.
  6. Study the step-by-step solution table and comparison bars.
Formula used
Law of Cosines: c² = a² + b² − 2ab cos C Angle from sides: C = arccos((a² + b² − c²) / (2ab)) Area (SAS): K = ½ab sin C Area (Heron): K = √(s(s−a)(s−b)(s−c)), s = (a+b+c)/2 Inradius: r = K / s Circumradius: R = abc / (4K)

Example Calculation

Result: For mode=sss, a=3, b=4, the tool returns the solved law of cosines triangle solver — sas & sss outputs shown in the result cards.

This example uses a realistic input set from the calculator workflow. After entry, the calculator applies the built-in law of cosines triangle solver — sas & sss formulas and reports derived values, checks, and classifications automatically.

Tips & Best Practices

  • SAS is the most common use of the Law of Cosines — you start with it, then switch to the Law of Sines for the remaining angles.
  • In SSS mode the formula is rearranged to solve for each angle: cos A = (b²+c²−a²)/(2bc).
  • If the cosine of an angle is negative, the angle is obtuse (> 90°).
  • Check the triangle inequality: each side must be less than the sum of the other two.
  • For angles close to 0° or 180°, numerical precision matters — use high-precision arithmetic when possible.

When To Use This Calculator

Solve any triangle using the Law of Cosines. Enter two sides and the included angle (SAS) or three sides (SSS) to find all angles, area, perimeter, and more. Use it when you need a repeatable calculation in the math / geometry category and want the setup, result, and supporting values kept together. This is especially helpful when small input changes, unit choices, or rounding decisions can change the final number.

How To Check The Result

Start by confirming that the inputs match the formula shown on the page. Then compare the main output with the worked example and any secondary values shown by the calculator. If the result will be used in another calculation, keep extra precision until the final step and record the assumptions beside the number.

Practical Notes

Treat the result as a calculation aid rather than a substitute for context. For schoolwork, include the formula and substitution steps. For planning, technical, financial, or health-related decisions, verify important numbers against primary records, current rules, or a qualified professional before acting on them.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • It relates the three sides of a triangle to one of its angles: c² = a² + b² − 2ab cos C. It is a generalisation of the Pythagorean theorem.