Law of Cosines Calculator
Law of Cosines is evaluated from Side a, Side b and Side c. The calculation reports Side a, Side b and Side c.
Results
About the Law of Cosines Calculator
The calculator uses a multi formula configuration. Each reported value is read as a direct evaluation of the stored rules with the declared field formats and units.
Formula basis:
c^2 = a^2 + b^2 - 2ab·cos(C)
C = arccos((a^2+b^2 - c^2)/(2ab))
Area = sqrt(s(s - a)(s - b)(s - c))
Interpret the outputs in the order shown by the result fields. Optional inputs affect only the outputs that depend on those variables.
Formula & How It Works
The calculation applies the following relations exactly as recorded in the metadata: c^2 = a^2 + b^2 - 2ab·cos(C) C = arccos((a^2+b^2 - c^2)/(2ab)) Area = sqrt(s(s - a)(s - b)(s - c)) Each output field is produced by substituting the supplied inputs into the relevant relation and then applying the declared rounding or text format.
Worked Examples
Example 1: SAS — Diagonal Brace Length
Inputs
With Side a = 8, Side b = 6 and Angle C = 120 as the stated inputs, the result is Side a = 8, Side b = 6 and Side c = 12.165525. Each value corresponds to the declared output fields.
Example 2: SSS — Find Angle for GPS Navigation
Inputs
With Side a = 120, Side b = 80 and Side c = 150 as the stated inputs, the result is Side a = 120, Side b = 80 and Side c = 150. Each value corresponds to the declared output fields.
Example 3: SSS — Heron's Formula Area
Inputs
With Side a = 5, Side b = 7 and Side c = 9 as the stated inputs, the result is Side a = 5, Side b = 7 and Side c = 9. Each value corresponds to the declared output fields.
Example 4: SAS — Baseball Diamond Diagonal
Inputs
With Side a = 90, Side b = 90 and Angle C = 90 as the stated inputs, the result is Side a = 90, Side b = 90 and Side c = 127.279221. Each value corresponds to the declared output fields.
Common Use Cases
- Find a side given two sides and included angle
- Find an angle given all three sides
- Calculate GPS distance between coordinates
- Structural engineering diagonal bracing