Home

Law of Cosines Calculator

Online Law of Cosines calculator: given two sides and the included angle, find the third side via c²=a²+b²−2ab·cosC; the Pythagorean theorem is its right-angle case.

展开更多 ▾
c²=a²+b²−2ab·cosC
ABCabc
C is between a and b
C is between a and b
Included angle

📖 Tutorial | Law of Cosines

1. Definition
A side squared equals the sum of the other squares minus twice their product times the included cosine: c²=a²+b²−2ab·cosC.
2. Formula & Notation
a,bKnown sides
CIncluded angle
3. Properties & Laws
  • c²=a²+b²−2ab·cosC;
  • C=90° gives the Pythagorean theorem;
  • cosC=(a²+b²−c²)/(2ab);
  • Used for SAS, SSS.
4. Steps
  1. Enter a, b, included angle C;
  2. Click "Calculate" for c;
  3. Or click "Load Example".
5. Worked Examples
Example: 3, 4, 90° gives c=5.
6. Common Pitfalls
C must be between a and b;
Keep the factor 2ab;
arccos ranges 0–180°.

❓ FAQ | Law of Cosines

Formula?
c²=a²+b²−2ab·cosC.
Pythagorean link?
C=90° case.
When?
SAS or SSS.
Find angle?
cosC=(a²+b²−c²)/(2ab).
Which angle C?
Between a and b.
Factor?
2ab.
Applies to?
Any triangle.