Law of Cosines Calculator — Solve Any Triangle

Solve any triangle using the law of cosines. Find unknown sides or angles, compute area, perimeter, circumradius, inradius, and classify the triangle type.

Side a
5.0000
Angle A = 43.8979°
Side b
7.0000
Angle B = 76.1021°
Side c
6.2450
Angle C = 60.0000°
Area
15.1554
Heron's formula: √[s(s−a)(s−b)(s−c)]
Perimeter
18.2450
Semi-perimeter s = 9.1225
Circumradius (R)
3.6056
R = abc / (4·Area)
Inradius (r)
1.6613
r = Area / s
Triangle Type
Scalene Acute
Classified by sides and angles

Side Proportions

a = 5.00
b = 7.00
c = 6.24

Angle Proportions

A = 43.90°
B = 76.10°
C = 60.00°

Triangle Summary

PropertyValueFormula
Side a5.0000Given / Computed
Side b7.0000Given / Computed
Side c6.2450c² = a² + b² − 2ab·cos(C)
Angle A43.8979°cos⁻¹[(b² + c² − a²) / 2bc]
Angle B76.1021°180° − A − C
Angle C60.0000°cos⁻¹[(a² + b² − c²) / 2ab]
Area15.1554√[s(s−a)(s−b)(s−c)]
Perimeter18.2450a + b + c
Semi-perimeter9.1225(a + b + c) / 2
Circumradius R3.6056abc / (4·Area)
Inradius r1.6613Area / s
TypeScalene Acute

Common Pythagorean Triples

Triplea² + b²
3459162525
5121325144169169
7242549576625625
8151764225289289
9404181160016811681
116061121360037213721
123537144122513691369
202129400441841841
Planning notes, formulas, and examples

About the Law of Cosines Calculator — Solve Any Triangle

The **Law of Cosines Calculator** solves any triangle when you know either two sides and the included angle (SAS) or all three sides (SSS). It applies the fundamental relation c² = a² + b² − 2ab·cos(C) to find unknown sides and then uses inverse cosine to recover all three angles.

This calculator goes beyond a single-formula tool. After solving the triangle it computes the area using Heron's formula, the perimeter and semi-perimeter, the circumradius (the radius of the circumscribed circle through all three vertices), and the inradius (the radius of the inscribed circle tangent to all three sides). It also classifies the triangle by both its sides (equilateral, isosceles, or scalene) and its angles (acute, right, or obtuse).

Two visual bar charts show side lengths and angles as proportional bars, making it easy to see at a glance how the triangle is shaped. A comprehensive summary table lists every computed property alongside the formula used, and a reference table of common Pythagorean triples highlights your result when it matches a well-known triple.

Eight preset buttons load classic triangles quickly — the Pythagorean triples 3–4–5, 5–12–13, 7–24–25, and 8–15–17, plus equilateral and isosceles configurations with common included angles. Choose "Find Side" mode when you know two sides and the angle between them, or "Find Angle" mode when you know all three sides and want to recover every angle. Adjust the decimal precision slider to control how many places appear in every output.

When This Page Helps

Law of Cosines Calculator — Solve Any Triangle helps you avoid repetitive setup mistakes when solving trigonometric and coordinate-geometry problems. Instead of recalculating conversions, signs, and edge cases by hand, you can test inputs immediately, inspect intermediate values, and confirm final answers before submitting work or using numbers in downstream calculations. It surfaces key outputs like Side a, Side b, Side c in one pass.

How to Use the Inputs

  1. Enter the required inputs (Mode, Side a, Side b).
  2. Complete the remaining fields such as Side c, Included Angle C (°), Decimal Precision.
  3. Review the output cards, especially Side a, Side b, Side c, Area.
  4. Compare the result with the formula, diagram, or example values to catch sign, unit, or rounding mistakes.
Formula used
c² = a² + b² − 2ab·cos(C). For angles: cos(A) = (b² + c² − a²) / 2bc. Area by Heron: √[s(s−a)(s−b)(s−c)] where s = (a+b+c)/2. Circumradius R = abc/(4·Area). Inradius r = Area/s.

Example Calculation

Result: c ≈ 6.24, A ≈ 43.90°, B ≈ 76.10°, Area ≈ 15.16

Using a=5, b=7, C=60°, the calculator returns c ≈ 6.24, A ≈ 43.90°, B ≈ 76.10°, Area ≈ 15.16. This example mirrors the calculator's live computation flow and is useful for checking manual steps and unit handling.

Tips & Best Practices

  • The law of cosines generalizes the Pythagorean theorem — when C = 90°, the 2ab·cos(C) term vanishes.
  • Use Find Side mode (SAS) when you know two sides and the angle between them.
  • Use Find Angle mode (SSS) when you know all three sides.
  • The triangle inequality must hold: any side must be less than the sum of the other two.
  • For very obtuse angles (>90°), cos(C) is negative, making c larger than √(a² + b²).

What This Law of Cosines Calculator — Solve Any Triangle Solves

This calculator is tailored to law of cosines calculator — solve any triangle workflows, including common input modes, unit handling, and special-case behavior. It is designed for fast checking during homework, exam preparation, technical drafting, and coding tasks where trigonometric consistency matters.

How To Interpret The Outputs

Use the primary result together with supporting outputs to verify direction, magnitude, and validity. Cross-check against known identities or geometric constraints, and confirm that angle ranges, sign conventions, and domain restrictions are satisfied before using the numbers elsewhere.

Study And Practice Strategy

A reliable way to improve is to solve once manually, then verify with the calculator and explain any mismatch. Repeat this on varied examples and edge cases. The built-in preset scenarios for quick trials, comparison tables for side-by-side validation, visual cues that make trends and quadrants easier to read help you build pattern recognition and reduce sign or conversion errors over time.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The law of cosines states c² = a² + b² − 2ab·cos(C), relating the three sides of a triangle to one of its angles. It generalizes the Pythagorean theorem to non-right triangles.