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.

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 instantly — 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.

Why Use This Law of Cosines Calculator — Solve Any Triangle?

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 This Calculator

  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. Use a preset button to load a common scenario and compare outcomes quickly.
  4. Adjust decimal precision to control rounding in the displayed results.
  5. Review the output cards, especially Side a, Side b, Side c, Area.
  6. Use the result table to compare computed values, identities, or scenario breakdowns.
  7. Validate your manual work by checking signs, units, and any special-case conditions shown by the tool.

Formula

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

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.

Frequently Asked Questions

What is the law of cosines?

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.

When should I use the law of cosines vs. the law of sines?

Use the law of cosines when you know SAS (two sides + included angle) or SSS (three sides). Use the law of sines when you know AAS, ASA, or SSA configurations.

Can the law of cosines solve right triangles?

Yes. When the included angle is 90°, the formula reduces to c² = a² + b², which is exactly the Pythagorean theorem. The law of cosines works for all triangles.

What is the circumradius?

The circumradius R is the radius of the circle passing through all three vertices of the triangle. It is computed as R = abc / (4·Area).

What is the inradius?

The inradius r is the radius of the inscribed circle that is tangent to all three sides of the triangle. It equals Area / s, where s is the semi-perimeter.

How does the triangle inequality apply?

For a valid triangle, the sum of any two sides must be strictly greater than the third side. The calculator validates this and shows an error if the constraint is violated.

Related Pages