THE NUMORIX GUIDE
How to use the Law of Cosines Calculator
Last reviewed September 14, 2026
What this calculator does
Convert angle C to radians and use c^2=a^2+b^2-2ab*cos(C), then calculate area = 0.
Formula and method
Convert angle C to radians and use c^2=a^2+b^2-2ab*cos(C), then calculate area = 0.5*a*b*sin(C). This is the SAS form of the law of cosines.
Variables and inputs
Side a defaults to 5, side b to 7, and included angle C to 60 degrees. Inputs should describe two sides and their included angle.
Worked example
For a=5,b=7,C=60 degrees: cos(C)=0.5; c^2=25+49-2*5*7*0.5=39; c=sqrt(39)=6.2450; area=0.5*5*7*sin60=15.1554 square units.
How to interpret the result
The law of cosines generalizes the Pythagorean theorem to non-right triangles; when C=90 degrees, the cosine term vanishes.
Common mistakes to avoid
Use the included angle between a and b, and square c only after evaluating the complete right side. Keep degree input distinct from radian calculation.
Assumptions and limitations
The UI exposes only the SAS side-and-angle form, not the inverse form for finding an angle. Invalid side/angle combinations can throw an error.
Practical use and checks
The Law of Cosines Calculator finds the third side and included-angle area from side a, side b, and angle C. Enter a = 5, b = 7, and C = 60 degrees as a check; c squared is 25 + 49 - 2(5)(7)cos(60), or 39, so c should be about 6.2450. The area should be one-half times 5 times 7 times sin(60), about 15.1554 square units. For C = 90 degrees, the formula reduces to the Pythagorean theorem. Use this method when two sides and their included angle are known, and make sure the angle is between those two sides rather than opposite the unknown side. The angle field is in degrees, while the trigonometric calculation uses radians internally. A side or angle set that violates triangle geometry can make c squared negative or produce a result that is not meaningful; the engine throws for the negative case but cannot prove every measurement is physically sensible. Rounding is more consequential when the included angle is close to 0 or 180 degrees. The result describes an ideal planar triangle and does not include thickness, surveying uncertainty, or a different angle convention. Check the returned side against the triangle inequality before using it in a layout or material estimate.