Law of Cosines Calculator

Find the third side of a triangle from two sides and the included angle.

Side c 6.245

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

Step-by-step with your numbers:
1. Values used:
2. Side a = 5
3. Side b = 7
4. Included angle C = 60 degrees
5.
6. Side c = 6.245
Did we solve your problem today?

Solve any triangle given two sides and the angle between them.

How the Math Works

The Law of Cosines extends the Pythagorean theorem to any triangle, not just right-angled ones. The formula c² = a² + b² − 2ab·cos(C) relates the lengths of the three sides of a triangle (a, b, c) to the cosine of one of its angles (C). When the angle C is 90°, the cosine term becomes zero, simplifying the equation to the familiar a² + b² = c². This formula allows you to calculate the third side of a triangle when you know two sides and the included angle between them, effectively balancing the geometric influence of the angle on the triangle's shape.

Practical Applications

This calculation is essential in fields like surveying, engineering, and physics where direct measurement of distances is impractical. For example, if you need to determine the length of a roof rafter when you know the horizontal distance between two walls (side a) and the vertical rise (side b) along with the angle of inclination (angle C), the Law of Cosines provides the exact rafter length (side c). It also helps in navigation systems to calculate distances between points when partial GPS coordinates and angles are known, ensuring precision in construction projects or celestial navigation calculations.

Day-to-Day Use

In everyday scenarios, the Law of Cosines aids in estimating distances or angles when direct measurement isn't feasible. For instance, hikers might use it to approximate the distance between two landmarks when they know the path length of two segments connecting the landmarks and the angle between them. It's also useful in home improvement projects, like determining the length of a diagonal brace for a shelf when the shelf's dimensions and the desired angle of the brace are known. Even in sports, athletes might apply this principle to calculate optimal throwing angles or trajectories when aiming for a target at a known distance and elevation.

Worked example

a 5, b 7, C 60° → c = 6.24.

FAQ

Find an angle?

Rearrange to cos(C) = (a² + b² − c²) ÷ 2ab.