Law of Cosines Calculator

Enter known triangle values and choose the unknown. Review steps, checks, tables, and charts today. Use exports for class, surveying, and design project records.

Calculator Inputs

Choose the known values you have.
Opposite angle A.
Opposite angle B.
Opposite angle C. Required for SSS or angle mode.
Required for SAS or side mode.
Used only in labels and exports.
Choose 0 to 8 places.
Tip: In this page, side c is opposite angle C. In SAS mode, C is the included angle between sides a and b.

Formula Used

Find a missing side: c² = a² + b² - 2ab cos(C)
Find an included angle: C = cos⁻¹((a² + b² - c²) / 2ab)
Area from SAS: Area = 1/2 × a × b × sin(C)
Area from SSS: s = (a + b + c) / 2, Area = √(s(s-a)(s-b)(s-c))

The calculator also applies related triangle formulas for perimeter, heights, medians, inradius, circumradius, and classification.

How to Use This Calculator

  1. Select the mode that matches your known data.
  2. Enter side lengths using one consistent unit.
  3. Enter angle C in degrees when using a SAS mode.
  4. Set a decimal precision for the result display.
  5. Press Calculate to show the result above the form.
  6. Review the chart, steps, and validation details.
  7. Use the CSV or PDF buttons to save the report.

Example Data Table

Case Known values Mode Main result Use case
1 a = 7, b = 9, C = 60° Find side c c ≈ 8.1854 Diagonal distance estimate
2 a = 5, b = 6, c = 7 Find angle C C ≈ 78.4630° Angle verification
3 a = 8, b = 10, c = 12 Solve SSS C ≈ 82.8192° Full triangle analysis
4 a = 15, b = 22, C = 110° Solve SAS c ≈ 30.4448 Obtuse layout check

What This Calculator Does

The law of cosines links three sides of a triangle with one included angle. It works for right, acute, and obtuse triangles. This calculator solves missing sides, missing angles, and full triangle cases. It also checks whether the entered sides can form a valid triangle. That helps reduce common geometry errors before a result is used.

Why The Method Matters

Many triangles are not right triangles. The Pythagorean theorem is limited in those cases. The cosine rule extends that idea by adding the cosine of the included angle. It is useful when two sides and the included angle are known. It is also useful when all three sides are known and an angle is needed.

Practical Uses

Students use it for homework and exams. Surveyors use it for indirect distance checks. Designers use it when diagonal lengths matter. Builders can estimate braces, roof members, or layout distances. Engineers can compare geometric options before drawing final plans. The calculator keeps the workflow simple, while still giving detailed outputs.

Reading The Results

The main result gives the requested side or angle. The extended panel adds area, perimeter, semi perimeter, heights, medians, inradius, and circumradius. Angle and side classifications help explain the triangle type. The chart gives a quick shape preview. It is not a scaled construction drawing for legal measurement, but it is helpful for checking proportions.

Accuracy Tips

Use the same unit for all side lengths. Enter angles in degrees. Avoid rounded input when exact values are available. Very small angles can magnify rounding differences. For best results, keep at least four decimals in technical work. Review the validation notes before downloading the CSV or PDF report.

Good Input Choices

Choose the mode that matches your known values. For two sides and an included angle, use a side solving mode or the full SAS mode. For three sides, use the SSS mode. Do not mix opposite and included angles. Label the triangle before typing values. This small step prevents swapped sides. After calculation, compare the angle sum with 180 degrees. A small difference may appear because displayed values are rounded. Always keep the original measurements for reference.

FAQs

1. What is the law of cosines?

It is a triangle formula that relates two sides, their included angle, and the opposite third side. It also rearranges to find an angle from three sides.

2. When should I use this calculator?

Use it when the triangle is not necessarily right angled. It is ideal for SAS and SSS cases where the Pythagorean theorem is not enough.

3. What does side c mean?

Side c is opposite angle C. In the common cosine rule setup, angle C is the included angle between side a and side b.

4. Can it solve all angles?

Yes. Once three sides are known, the calculator applies inverse cosine formulas to find angles A, B, and C.

5. Why did I get a triangle inequality error?

The entered sides cannot form a real triangle. The sum of any two sides must be greater than the remaining side.

6. Are angle values entered in degrees?

Yes. Enter angle C in degrees. The calculator converts degrees internally when applying cosine and sine calculations.

7. What is the chart for?

The chart gives a visual triangle preview based on the solved measurements. It helps check whether the shape looks reasonable.

8. Can I export my result?

Yes. Use the CSV button for spreadsheet records. Use the PDF button for a simple printable report.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.