# Triangle Solver — Law of Sines & Cosines (SSS, SAS, ASA, SSA)

> Solve any triangle from three known sides or angles using the Law of Sines and Cosines. Get all six elements, area, perimeter, circumradius and inradius, with a scaled diagram.

- **Category:** Math
- **Interactive calculator:** https://youcalc.com/en/math/triangle-solver/
- **Price:** Free, no sign-up required

## Overview

This calculator solves any triangle when you supply exactly three known elements — sides and angles in any combination (SSS, SAS, ASA, AAS, or the ambiguous SSA case). Enter what you know and the tool fills in all six elements along with area, perimeter, circumradius, and inradius.

## How to read your result

After you type three known values the result card appears on the right. It shows a scaled diagram of your triangle with vertices labelled A, B, C, followed by a data list: all three sides, all three angles in degrees, area, perimeter, circumradius, and inradius. If the SSA input is ambiguous and produces two valid triangles, both are shown as separate cards.

## Method

For SSS, angles are found with the law of cosines: A = arccos((b^2 + c^2 - a^2) / 2bc), then the third angle by subtraction. For SAS, the unknown side is found with c^2 = a^2 + b^2 - 2ab cos C, and angles follow from the law of cosines. For ASA/AAS, the third angle is 180 degrees minus the sum of the two known angles, then sides are found via the law of sines ratio a/sin A = b/sin B = c/sin C. SSA applies the law of sines to find the candidate angle(s) for the second known side, then checks whether the third angle is positive. Area uses Heron's formula: sqrt(s(s-a)(s-b)(s-c)) where s is the semi-perimeter. Circumradius = abc / (4 * area); inradius = area / s.

## Example

- **Setup:** Enter the three sides of a right triangle: a = 3, b = 4, c = 5.
- **Result:** The solver returns angle A approximately 36.87 degrees, angle B approximately 53.13 degrees, and angle C exactly 90 degrees. Area = 6, perimeter = 12, circumradius = 2.5, inradius = 1.

## Frequently asked questions

### What is the SSA ambiguous case?

When you know two sides and the angle opposite one of them (SSA), the given data may fit zero, one, or two distinct triangles. The calculator checks all possibilities and returns every valid solution, so you see immediately whether the problem is ambiguous.

### Do angles need to be in degrees or radians?

All angles are entered and displayed in degrees. The underlying law-of-sines and law-of-cosines calculations convert to radians internally, so you never need to do that conversion yourself.

### How accurate are the results?

The calculator uses JavaScript double-precision arithmetic, which gives about 15 significant digits. Results are displayed to three decimal places, which is more than sufficient for geometric construction, drafting, or coursework.

## Related calculators

- [Slope & Line Equation Calculator](https://youcalc.com/en/math/slope-line-equation/)
- [Quadratic Equation Solver](https://youcalc.com/en/math/quadratic-equation/)
- [System of Equations Solver](https://youcalc.com/en/math/system-of-equations/)

## Sources

- https://mathworld.wolfram.com/LawofSines.html
- https://mathworld.wolfram.com/LawofCosines.html

---

Interactive version: https://youcalc.com/en/math/triangle-solver/ · From YouCalc — https://youcalc.com
