# Triangle calculator

> A triangle is fully determined by any three values — three sides (SSS), two angles and a side (AAS/ASA), or two sides and an angle (SAS/SSA). Enter three known values and this.

Solve any triangle from any combination of sides and angles using the law of sines and law of cosines. Returns all sides, angles, area, and perimeter.

**Interactive version:** https://onlinecalculator.me/math/triangle/
**Category:** Math

## Formulas

**Law of cosines (SSS/SAS):**
```
c² = a² + b² − 2ab cos(C)
```

**Law of sines (AAS/ASA):**
```
a / sin(A) = b / sin(B) = c / sin(C)
```

**Area (Heron's formula):**
```
s = (a + b + c) / 2
Area = √(s(s−a)(s−b)(s−c))
```

## Example

3-4-5 right triangle (SSS):
- Angles: A ≈ 36.87°, B ≈ 53.13°, C = 90°
- Area = 6, Perimeter = 12

## Frequently asked questions

### What combinations can this calculator solve?

SSS (three sides), AAS/ASA (two angles + one side), SAS (two sides + included angle), and SSA (two sides + opposite angle). It cannot solve with fewer than three known values.

### What is the law of cosines?

c² = a² + b² − 2ab cos(C). Used when three sides are known (SSS) or two sides and an angle are known (SAS).

### What is the law of sines?

a/sin(A) = b/sin(B) = c/sin(C). Used with AAS, ASA, or SSA combinations.

### Why does SSA sometimes have no solution?

SSA can be ambiguous: depending on the given values, there may be no triangle, one triangle, or two valid triangles. This calculator returns the first (acute-angle) solution.

### How do I share my calculation?

Click "Share with my numbers" to copy a URL with your inputs.

## Sources

- [Triangle (area formulas)](https://en.wikipedia.org/wiki/Triangle) — Wikipedia
- [Heron's formula (area from three sides)](https://en.wikipedia.org/wiki/Heron%27s_formula) — Wikipedia

## Related calculators

- [Right triangle calculator](https://onlinecalculator.me/math/right-triangle/) — Solve right triangles from sides or the Pythagorean theorem.
- [Area calculator](https://onlinecalculator.me/math/area/) — Area of common shapes including triangles.
- [Distance formula calculator](https://onlinecalculator.me/math/distance-formula/) — Straight-line distance between two coordinate points.
- [Slope calculator](https://onlinecalculator.me/math/slope/) — Slope, angle, and equation of a line.

---

Part of [onlinecalculator.me](https://onlinecalculator.me/) — free calculators that run entirely in your browser.
Machine-readable index: https://onlinecalculator.me/llms.txt
