Discover
Random

Law of Cosines (SAS & SSS) Calculator

Solve triangles using c² = a² + b² − 2ab·cos C, for SAS (find a side) or SSS (find angles).

Free Law of Cosines Calculator

Find a missing side or angle in any triangle with our free Law of Cosines Calculator, using c² = a² + b² − 2ab·cos C. Enter two sides and the included angle (SAS) to find the third side, or all three sides (SSS) to find any angle — with full step-by-step working shown at every stage.

The calculator checks your inputs against the triangle inequality before solving, so invalid triangles are caught immediately with a clear explanation rather than a broken calculation. Area and perimeter are computed automatically, and a scaled diagram illustrates the result.

Whether you're checking homework or solving a real-world triangulation problem, get accurate results with the reasoning shown, not just a bare number. No sign-up, no downloads required.

About the Law of Cosines Calculator

Scope note: This calculator applies the generalized Pythagorean identity c² = a² + b² − 2ab·cos(C) to solve SAS and SSS oblique triangles. For angle-side-angle (ASA, AAS) or non-included angle (SSA) problems, use the Law of Sines Calculator or the general Triangle Solver.

How It Works & Methodology

The Law of Cosines Calculator solves for a missing side given two sides and the included angle (SAS), or for any angle given all three sides (SSS), by rearranging c² = a² + b² − 2ab·cos C. SSS mode first checks the triangle inequality so invalid combinations are caught before solving.

Features

SAS and SSS modes

Solve for a missing side or for any angle, depending on what you know.

Triangle inequality check

Invalid SSS combinations are flagged with a plain-English explanation.

Step-by-step working

See the formula and substitution used for every calculation.

Area, perimeter & diagram

Every solution includes area, perimeter, and a scaled triangle diagram.

Mathematical Basis & Practical Verification

The Law of Cosines Calculator is built on Euclidean and analytic geometry formulas, maintaining exact symbolic multiples of π and radical expressions alongside 6-significant-digit floating-point approximations. Free Law of Cosines calculator solving SAS and SSS triangles with step-by-step working, area, perimeter, and a to-scale diagram. The interface validates every input parameter in real time and surfaces intermediate steps alongside the final result.

All computations for the Law of Cosines Calculator follow the definitions established in NIST Digital Library of Mathematical Functions — Trigonometric & Geometric Identities (National Institute of Standards and Technology (NIST)) and ISO 80000-3: Quantities and Units — Space and Time (International Organization for Standardization (ISO)). Because the solver evaluates inputs locally in IEEE 754 double-precision arithmetic (53-bit significand, ~15–17 significant decimal digits) and is regression-tested against deterministic reference fixtures in tests/law-of-cosines.spec.ts, you can inspect boundary conditions, verify dimensional consistency across geometry units, and cross-check each intermediate step against textbook solutions.

Authoritative Sources & Standards

  1. NIST Digital Library of Mathematical Functions — Trigonometric & Geometric Identities — National Institute of Standards and Technology (NIST)
  2. ISO 80000-3: Quantities and Units — Space and Time — International Organization for Standardization (ISO)

Frequently Asked Questions

What is the Law of Cosines?

A formula relating a triangle's sides and one angle: c² = a² + b² − 2ab·cos C, generalizing the Pythagorean theorem.

When do I use SAS mode?

When you know two sides and the angle between them, and want the third side.

When do I use SSS mode?

When you know all three sides and want to find one or more angles.

Does it show the steps?

Yes, the formula substitution and algebra (including the arccos step for SSS) are shown.

What if my sides can't form a triangle?

The triangle inequality is checked first, and invalid combinations are flagged with an explanation.

Does it calculate area?

Yes, via Heron's formula or the ½ab·sinC formula once an angle is known.

Can I use degrees or radians?

Yes, a toggle switches units for all values.

How is this different from the Law of Sines?

Law of Cosines works with SAS/SSS data; Law of Sines is for ASA/AAS/SSA — use whichever matches what you know.

Embed Law of Cosines Calculator

Copy and paste this HTML snippet to embed this interactive calculator on your website or blog:

Discover more tools

Surprise me