Cosine Rule Calculator
Input Parameters
Computed Results
The cosine rule calculator helps you solve for unknown sides and angles of a triangle using the Law of Cosines. By entering known side lengths and angles, you can determine the remaining dimensions, as well as the triangle's area, perimeter, inradius, and circumradius.
How to Use the Cosine Rule Calculator
This tool allows you to solve a triangle when you know either three sides (SSS) or two sides and the included angle (SAS). Follow these steps to find the missing values:
- Select what to calculate: Choose whether you are solving for an angle (given three sides) or a specific side (given two sides and the included angle).
- Enter the known values: Input the lengths of the sides and the known angle. Ensure you match the side or angle to the correct input field based on your selection.
- Choose your units: Select whether your angles are measured in degrees or radians.
- Set significant figures: Adjust the precision of your results by selecting the desired number of significant figures.
- Review the results: The calculator will display all three angles, all three sides, the perimeter, semi-perimeter, area, inradius, and circumradius.
Formula & Explanation
The Law of Cosines relates the lengths of the sides of a triangle to the cosine of one of its angles. It is a generalization of the Pythagorean theorem for non-right triangles. The standard formulas are:
To solve for an angle when all three sides are known, the formula is rearranged. For example, to find angle C:
The calculator also determines the area using Heron's formula, where s is the semi-perimeter:
Inputs & Outputs
Here is a breakdown of the data you can enter and the results the calculator provides.
| Input/Output | Description |
|---|---|
| Calculate | The specific side or angle you want to solve for based on your known data. |
| Side a (or Angle A) | The length of side a, or the measure of angle A if solving for side a. |
| Side b (or Angle B) | The length of side b, or the measure of angle B if solving for side b. |
| Side c (or Angle C) | The length of side c, or the measure of angle C if solving for side c. |
| Angle Units | The unit of measurement for angles (degrees or radians). |
| Significant Figures | The level of precision for the calculated results. |
| Angles (A, B, C) | The calculated measures of the triangle's three interior angles. |
| Sides (a, b, c) | The calculated lengths of the triangle's three sides. |
| Perimeter (P) & Semi-perimeter (s) | The total distance around the triangle and half of that distance. |
| Area (K) | The total surface area enclosed by the triangle. |
| Inradius (r) & Circumradius (R) | The radius of the inscribed circle and the circumscribed circle, respectively. |
Verified Scenario Walkthroughs
Below are examples of how the calculator processes different sets of inputs.
Example 1: Calculating Angles from Three Known Sides
If you have a triangle with sides measuring 3, 4, and 5, and you want to find the angles in degrees (rounded to 4 significant figures):
- Inputs: Calculate: aa, Side a: 3, Side b: 4, Side c: 5, Units: deg, Sig Figs: 4
- Results: Angle A: 36.87°, Angle B: 53.13°, Angle C: 90°, Area: 6, Perimeter: 12
Example 2: Solving for Side A using SAS
If you know Angle A is 60°, Side b is 10, and Side c is 10, and you want to find Side a (rounded to 5 significant figures):
- Inputs: Calculate: sa, Angle A: 60, Side b: 10, Side c: 10, Units: deg, Sig Figs: 5
- Results: Side a: 10, Angle B: 60°, Angle C: 60°, Area: 43.301, Perimeter: 30
Example 3: Solving for Side B using Radians
If you know Side a is 5, Angle B is 1.5708 radians, and Side c is 5 (rounded to 3 significant figures):
- Inputs: Calculate: sb, Side a: 5, Angle B: 1.5708, Side c: 5, Units: rad, Sig Figs: 3
- Results: Side b: 7.07, Angle A: 0.785 rad, Angle C: 0.785 rad, Area: 12.5, Perimeter: 17.1
Practical Use Cases
The Law of Cosines is frequently used in geometry and trigonometry to solve triangles that do not have a right angle. It is particularly useful when you know the lengths of all three sides and need to find the angles, or when you know two sides and the angle between them and need to find the third side. This mathematical principle is applied in fields such as surveying, navigation, and physics to determine distances and angles that cannot be measured directly.
Frequently Asked Questions
When should I use the Law of Cosines instead of the Law of Sines?
Use the Law of Cosines when you know all three sides of a triangle (SSS) or two sides and the included angle (SAS). The Law of Sines is used when you know two angles and one side (AAS or ASA), or two sides and a non-included angle (SSA).
Can the Law of Cosines be used on right triangles?
Yes. If the angle is 90 degrees, the cosine of 90 degrees is zero. The term −2ab × cos(90°) becomes zero, and the formula simplifies to the Pythagorean theorem (c² = a² + b²).