Law of Cosines Calculator
Computed Results
The law of cosines calculator determines the interior angles of a triangle when the lengths of all three sides are known. It also calculates key geometric properties, including the perimeter, area, inradius, and circumradius, providing a complete mathematical profile of the triangle.
Verified Calculation Examples
The following examples demonstrate how the calculator processes different side lengths and unit settings to determine triangle properties.
Small Triangle with Integer Sides
For a triangle with side lengths of 3, 4, and 5 centimeters, calculating to 3 significant figures in degrees yields:
- Angle A: 36.9 degrees
- Angle B: 53.1 degrees
- Angle C: 90 degrees
- Area: 6
- Perimeter: 12
Large Scalene Triangle in Radians
Given side lengths of 150.5, 200.2, and 250.8 meters, calculating to 5 significant figures in radians results in:
- Angle A: 0.6436 radians
- Angle B: 0.92437 radians
- Angle C: 1.5736 radians
- Area: 15,065
- Circumradius: 125.4
Equilateral Triangle with Imperial Units
For an equilateral triangle where all sides are 12 feet, calculating to 4 significant figures in degrees produces:
- Angles A, B, and C: 60 degrees each
- Area: 62.35
- Inradius: 3.464
Formulas and Explanation
The calculator uses the Law of Cosines to find the angles of a triangle when all three sides (SSS) are known. The standard formula is:
To solve for the angles, the formula is rearranged as follows:
The calculator also determines the area using Heron's formula, where s is the semiperimeter:
How to Use the Calculator
Follow these steps to calculate the angles and properties of your triangle:
- Enter the lengths of side a, side b, and side c.
- Select your preferred Angle Units (degrees or radians).
- Choose the Length Units that correspond to your measurements.
- Select the number of Significant Figures required for your results.
- Review the calculated angles, perimeter, area, inradius, and circumradius.
Inputs and Outputs
| Field | Type | Description |
|---|---|---|
| side a, b, c | Input | The lengths of the three sides of the triangle. |
| Angle Units | Input | The unit of measurement for the resulting angles (degrees or radians). |
| Significant Figures | Input | The precision level for the calculated outputs. |
| Angle A, B, C | Output | The interior angles opposite to sides a, b, and c, respectively. |
| Perimeter (P) | Output | The total length of the triangle's boundary. |
| Semiperimeter (s) | Output | Half of the perimeter, used in Heron's formula. |
| Area (K) | Output | The total enclosed space of the triangle. |
| Inradius (r) | Output | The radius of the largest circle that can fit inside the triangle. |
| Circumradius (R) | Output | The radius of the circle that passes through all three vertices of the triangle. |
Practical Use Cases
The Law of Cosines is frequently used in fields that require precise spatial calculations. Surveyors and engineers use it to determine unknown angles when measuring land parcels or structural components. In navigation, it helps calculate directional headings when distances between waypoints are known. It is also a fundamental tool in physics and computer graphics for resolving vectors and rendering 3D geometry.
Frequently Asked Questions
Can the Law of Cosines be used for any triangle?
Yes, the Law of Cosines applies to all triangles, including acute, obtuse, and right triangles. For right triangles, it simplifies to the Pythagorean theorem.
What happens if the side lengths cannot form a triangle?
According to the triangle inequality theorem, the sum of the lengths of any two sides must be greater than the length of the third side. If this condition is not met, the inputs do not form a valid triangle, and the calculator will not be able to compute real angles.