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

Thanks — we’ve logged this for review.

About the Law of Cosines Calculator

Law of Cosines is treated here as a quantitative relation between Side a, Side b, Side c and Angle A and Side a, Side b, Side c and Angle A.

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

side_a: 8 side_b: 6 angle_C: 120
Side a: 8. Side b: 6. Side c: 12.165525. Angle A: 34.715 deg. Angle B: 25.285 deg. Angle C: 120 deg. Area: 20.7846 units^2. Perimeter: 26.1655 units

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

side_a: 120 side_b: 80 side_c: 150
Side a: 120. Side b: 80. Side c: 150. Angle A: 52.8311 deg. Angle B: 32.0892 deg. Angle C: 95.0797 deg. Area: 4,781.1479 units^2. Perimeter: 350 units

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

side_a: 5 side_b: 7 side_c: 9
Side a: 5. Side b: 7. Side c: 9. Angle A: 33.5573 deg. Angle B: 50.7035 deg. Angle C: 95.7392 deg. Area: 17.4123 units^2. Perimeter: 21 units

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

side_a: 90 side_b: 90 angle_C: 90
Side a: 90. Side b: 90. Side c: 127.279221. Angle A: 45 deg. Angle B: 45 deg. Angle C: 90 deg. Area: 4,050 units^2. Perimeter: 307.2792 units

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