Math Calculator

Law of Cosines Calculator

Choose SSS to find angle C from three sides, or SAS to find side c from a, b, and C.

Choose SSS or SAS

Fill the fields required by the selected mode.

Clear

About this calculator

How to use Law of Cosines Calculator, plus the formulas and logic behind the results.

Tool description

Generalizes the Pythagorean theorem to any triangle via cosines of included or opposite angles.

How to use

  1. Review the input fields and choose degrees or radians when asked.
  2. Enter the known values using consistent units.
  3. Select Calculate to view results.
  4. Adjust inputs and recalculate as needed.

Formulas & reference

  • c² = a² + b² − 2ab cos C
  • cos C = (a² + b² − c²) / (2ab)

Trig tips

  • Confirm angle mode (degrees vs radians) before evaluating sin, cos, tan.
  • Right-triangle tools assume a 90° angle between legs a and b.
  • Triangle inequality: each side must be shorter than the sum of the other two.

Calculation logic

SAS computes side c; SSS computes angle C when the triangle inequality holds.

Educational calculator. Floating-point rounding may differ slightly from textbook answers.

Law of Cosines Calculator FAQ

Common questions about this calculator and how to use the results.

What is the Law of Cosines Calculator?

An online math tool on LeCalculators that solves law of cosines calculator problems with clear numeric results for study and everyday use.

Do I use degrees or radians?

Many trig tools include an angle mode selector. Match the mode to how your angle is written—degrees (°) or radians.

Why is my answer undefined or invalid?

Trig functions have domain limits (for example arcsin needs −1…1). Triangle tools also reject sides that violate the triangle inequality.

How precise are the results?

Results use floating-point math and are rounded for display with mathFormat. Tiny rounding differences vs hand calculation are normal.

Is this calculator free?

Yes. LeCalculators trigonometry tools are free to use in your browser with guides and FAQs on each page.

Can I use this for homework?

Yes—use it to check work. Always show your own steps when your teacher requires a written solution.