Law Of Cosines
Calculator

Inputs

Side c
6.666344

Results

Side c
6.666344
Angle A (degrees)
46.237486
Angle B (degrees)
96.762513
Area
26.479861

Results

Side c6.666344
Angle A (degrees)46.237486
Angle B (degrees)96.762513
Area26.479861

formula-map diagram

Side c
6.666344
Angle A (degrees)
46.237486
Angle B (degrees)
96.762513
Area
26.479861

Formula map

Formula

c = √(a² + b² − 2ab·cos C)

= 6.6663445929292

Note

Simplified model: these are the exact results of the stated idealised geometric formulas, assuming perfect shapes, exact inputs and consistent units. Real measurements carry error, and results such as the cyclic-quadrilateral area only hold when the figure truly satisfies the stated condition. Verify independently before relying on these figures.

More in Advanced geometry

See all →

Frequently asked questions

When should I use the law of cosines instead of the law of sines to solve a triangle?+

Use the law of cosines when you know either three sides (SSS) or two sides and the included angle (SAS), situations where the law of sines can't be set up directly because you lack a matching angle-side pair. The law of sines instead requires knowing at least one complete angle-side pair.

What is the law of cosines formula, and how does it relate to the Pythagorean theorem?+

The formula is c² = a² + b² − 2ab·cos(C), where C is the angle opposite side c. It's a direct generalization of the Pythagorean theorem: when C = 90°, cos(90°) = 0, and the formula reduces exactly to c² = a² + b².

How do I find an unknown angle if I already know all three side lengths?+

Rearrange the formula to solve for the cosine of the angle: cos(C) = (a² + b² − c²)/(2ab), then take the inverse cosine (arccos) of that result to get the angle itself. This SSS-to-angle version is one of the most common practical uses of the law of cosines.

Why does a negative cosine result mean the angle is obtuse?+

Cosine is negative for any angle between 90° and 180°, so if the calculation cos(C) = (a²+b²−c²)/(2ab) yields a negative number, the angle C must be obtuse. This happens specifically when c² > a² + b², the reverse of the Pythagorean relationship for an acute or right triangle.

What does it mean if the three side lengths I enter don't produce a valid triangle?+

If one side is longer than or equal to the sum of the other two, the triangle inequality is violated and no real triangle can be formed with those lengths, no matter the angles. In that case, the law of cosines calculation for any angle will produce a cosine value outside the valid range of −1 to 1, signaling an invalid input.