Law of Cosines Calculator
Calculate triangle sides and angles using the law of cosines formula
Triangle Sides
Triangle Angles
Results
Law of Cosines Formulas
The law of cosines relates the lengths of the sides of a triangle to the cosine of one of its angles[1][2].
Finding Side a
Use when you know sides b, c and angle A (opposite to side a).
Finding Side b
Use when you know sides a, c and angle B (opposite to side b).
Finding Side c
Use when you know sides a, b and angle C (opposite to side c).
Finding Angle A
Use when you know all three sides to find angle A[2].
Finding Angle B
Use when you know all three sides to find angle B.
Finding Angle C
Use when you know all three sides to find angle C.
Calculation Examples
Example 1: Finding a Missing Side (SAS)
Given: sides a = 8, b = 6, and angle C = 60°
Find: side c
- Apply the formula: c² = a² + b² – 2ab cos(C)
- Substitute values: c² = 8² + 6² – 2(8)(6) cos(60°)
- Calculate: c² = 64 + 36 – 96(0.5) = 100 – 48 = 52
- Result: c = √52 ≈ 7.21
Example 2: Finding a Missing Angle (SSS)
Given: sides a = 2, b = 3, c = 4
Find: angle A
- Apply the formula: A = arccos[(b² + c² – a²)/(2bc)]
- Substitute values: A = arccos[(3² + 4² – 2²)/(2×3×4)]
- Calculate: A = arccos[(9 + 16 – 4)/24] = arccos[21/24]
- Result: A = arccos(0.875) ≈ 28.96°[6]
Real-World Applications
Navigation and Surveying
The law of cosines is essential in GPS systems and land surveying to calculate distances and positions when direct measurement isn’t possible[4].
Architecture and Construction
Architects use the law of cosines to calculate structural angles and distances in complex building designs, ensuring proper load distribution.
Physics and Engineering
Engineers apply this law in force analysis, calculating resultant forces when multiple forces act at angles to each other.
Astronomy
Astronomers use the law of cosines to calculate distances between celestial objects and determine orbital parameters.
Computer Graphics
Game developers and 3D graphics programmers use this law for collision detection and calculating angles between objects in 3D space.
Sports Analytics
Sports analysts use the law of cosines to calculate optimal trajectories in golf, basketball, and other sports involving projectile motion.
Key Features
Multiple Input Methods
Calculate triangles using SAS (Side-Angle-Side) or SSS (Side-Side-Side) configurations with instant results[2].
Angle Unit Flexibility
Work with both degrees and radians, with automatic conversion and precise calculations for any unit preference.
Precise Calculations
Get accurate results with up to 6 decimal places, suitable for professional applications and academic work[5].
Error Validation
Built-in triangle inequality checks ensure all calculations are mathematically valid and physically possible.