Updated: 2026-03-30

Cosine Rule Calculator - Solve Triangles Easily

Overview: Calc-Tools Online Calculator offers a free platform for various scientific calculations and mathematical tools. This article highlights its Cosine Rule Calculator, a powerful tool for solving a wide range of triangle problems. It explains the law of cosines, a fundamental rule describing the relationship between a triangle's sides and the cosine of its angles, applicable to all triangle types.

The core formulas are presented, demonstrating how this law generalizes the Pythagorean theorem for non-right triangles. The calculator enables users to quickly find the properties of any triangle, making complex trigonometric calculations straightforward and accessible.

Master Triangle Problems with Our Free Online Cosine Rule Calculator

Our advanced law of cosines calculator is your ultimate solution for tackling a wide array of triangle-related challenges. This guide will teach you the fundamentals of the cosine rule, its essential formula, and its practical applications. Discover the optimal scenarios for applying this theorem, explore its historical proofs, and learn how our powerful triangle calculator can deliver rapid solutions for any triangle's properties.

Understanding the Cosine Rule Formula

The law of cosines establishes precise relationships between a triangle's sides and angles. Represented with standard geometric notation, the formulas are:

a² = b² + c² - 2bc × cos(α)
b² = a² + c² - 2ac × cos(β)
c² = a² + b² - 2ab × cos(γ)
cos(α) = (b² + c² - a²) / (2bc)

When the included angle (α) is 90°, the cosine value becomes zero. This simplifies the formula to the familiar Pythagorean theorem: a² = b² + c², demonstrating how the cosine rule encompasses this fundamental principle.

Defining the Law of Cosines

Commonly called the cosine formula or cosine rule, this mathematical law connects a triangle's side lengths with the cosines of its corresponding angles. Unlike the Pythagorean theorem, it applies universally to all triangle types, including oblique triangles. Its primary function is determining an unknown side length when you know the other two sides and their included angle.

Historical Development of the Theorem

Early foundations of this principle appeared in Euclid's Elements, though contemporary cosine terminology was absent. Euclid presented geometric relationships that modern notation translates to: c² = a² + b² - 2ab × cos(γ). The Persian mathematician Al-Kashi produced the first explicit cosine rule equation during the 15th century. French mathematician Viète later popularized it in the 16th century, with the rule achieving its modern form in the 19th century.

Practical Applications of the Cosine Rule

This versatile law solves numerous triangulation problems. You can determine:

The third side when two sides and their included angle are known (SAS):

a = √[b² + c² - 2bc × cos(α)]
b = √[a² + c² - 2ac × cos(β)]
c = √[a² + b² - 2ab × cos(γ)]

All three angles when three sides are known (SSS):

α = arccos[(b² + c² - a²) / (2bc)]
β = arccos[(a² + c² - b²) / (2ac)]
γ = arccos[(a² + b² - c²) / (2ab)]

Important consideration: The SSA case can produce two possible triangles, one triangle, or no valid triangle depending on measurements. Our calculator implements SAS and SSS configurations for reliable results.

This fundamental geometric law supports numerous calculations and integrates seamlessly with other mathematical tools for comprehensive problem-solving. Combining the cosine rule with the law of sines enables solutions for AAS and ASA triangle configurations.

Exploring Proofs of the Cosine Rule

Multiple methods establish the law of cosines' validity. Beyond Euclid's geometric approach combined with Pythagorean theorem applications, three particularly insightful proofs exist:

Trigonometric Proof:

By constructing altitude lines and applying sine/cosine definitions to triangle segments, algebraic manipulation yields the standard formula: c² = a² + b² - 2ab × cos(γ).

Distance Formula Proof:

Placing a triangle within a coordinate system and applying the distance formula between vertices, combined with the fundamental trigonometric identity sin²(θ) + cos²(θ) = 1, produces the cosine rule.

Ptolemy's Theorem Proof:

Utilizing cyclic quadrilaterals and Ptolemy's theorem about opposite sides and diagonals, along with cosine definitions, derives the same equation.

These three demonstrations work effectively for acute, right, and obtuse triangles without modification. Other proofs exist but often require case distinctions or more advanced mathematical concepts.

Utilizing Our Cosine Rule Calculator

Begin by clearly defining your known values. For instance, you might know two side lengths and their included angle while seeking the third side.

Enter your known measurements into the appropriate calculator fields, ensuring your side and angle labels match standard triangle diagrams.

Our intelligent calculator instantly processes all computations, delivering accurate results for your triangle problems.

SSS Calculation Example

To determine all angles when three sides are known, apply these transformed formulas:

α = arccos[(b² + c² - a²) / (2bc)]

Consider a triangle with sides a=4 inches, b=5 inches, and c=6 inches. Calculating α:

α = arccos[(5² + 6² - 4²) / (2 × 5 × 6)]
α = arccos[(25 + 36 - 16) / 60] = arccos(45/60) = arccos(0.75)

α ≈ 41.41°

You could similarly calculate β, then determine γ knowing triangle angles sum to 180°. Our calculator automates this process: select "SSS (3 sides)," input your values, and receive immediate results: α ≈ 41.41°, β ≈ 55.77°, γ ≈ 82.82°.

Frequently Asked Questions

When should I apply the law of cosines?

Use it to calculate: any triangle side given two sides and their included angle; all three angles given three side lengths; or a side given two sides and a non-included angle (with caution for ambiguous cases).

How does the law of cosines relate to the Pythagorean theorem?

The cosine rule generalizes the Pythagorean theorem. While the Pythagorean theorem works exclusively for right triangles, the law of cosines applies to all triangles and reduces to Pythagoras' theorem when the included angle is 90°.

Does the law of cosines work for non-right triangles?

Absolutely. This law is universally valid for all triangle classifications. When applied to right triangles, it simplifies to the standard Pythagorean relationship.

What is the third side if two sides measure 5 and 6 units with a 60° angle between them?

Apply c² = a² + b² - 2ab × cos(γ) with a=5, b=6, γ=60°. Calculation gives c² = 25 + 36 - 60 × 0.5 = 31, so c ≈ √31 ≈ 5.57 units. Always preserve measurement units when provided.

Other calculators:

Multilingual calculator