Triangle Calculator: SSS, SAS, ASA, AAS and SSA

Triangle Calculator

Solve general triangles from SSS, SAS, ASA/AAS, or SSA data using the laws of cosines and sines, including the ambiguous SSA case.



Enter three positive sides that satisfy the triangle inequality.


Triangle formulas

The law of cosines relates three sides and one angle: c²=a²+b²−2ab cos(C). It solves SSS and SAS triangles. The law of sines states a/sin(A)=b/sin(B)=c/sin(C) and solves ASA, AAS, and SSA triangles.

Area is calculated from two sides and their included angle or from Heron’s formula. The calculator then derives perimeter, semiperimeter, three altitudes, inradius, and circumradius.

Checked examples

Known dataMethodKey results
a=3, b=4, c=5SSSA≈36.8699°, B≈53.1301°, C=90°, area=6
a=5, b=5, c=6SSSC≈73.7398°, area=12
a=5, b=7, C=60°SASc=√39≈6.245, area≈15.1554
a=8, b=10, C=30°SASc≈5.043, area=20
A=50°, B=60°, a=10ASAC=70°, b≈11.305, c≈12.267
A=30°, B=90°, a=5ASAC=60°, b=10, c≈8.660
A=30°, a=10, b=15SSATwo solutions: B≈48.590° or 131.410°
A=50°, a=10, b=8SSAOne valid triangle

How to use the calculator

  1. Select the known-measurement pattern: SSS, SAS, ASA/AAS, or SSA.
  2. Enter the three requested values and choose a length unit.
  3. Select Solve triangle.
  4. For SSA, review both solutions when the ambiguous case occurs.

Limits and interpretation

  • Side lengths must be positive, use one consistent unit, and satisfy the triangle inequality.
  • Angles must be greater than 0° and less than 180°; the three solved angles total 180°.
  • SSA may produce zero, one, or two triangles. The calculator reports every valid real solution.
  • Values are displayed with approximately 14 significant digits using JavaScript double-precision arithmetic.
  • Very thin or extremely large triangles that cannot be represented safely are rejected.
  • This is a planar Euclidean triangle calculator, not a spherical-triangle solver.

Frequently asked questions

What is the ambiguous SSA case?

Two different triangles can share the same angle A, opposite side a, and second side b. The supplementary angle 180°−B creates the second solution when the remaining angle stays positive.

When should I use the law of cosines?

Use it when all three sides are known or when two sides and their included angle are known.

When should I use the law of sines?

Use it when a side and its opposite angle are known together with another side or angle.

Does this replace the Pythagorean theorem?

It includes right triangles, but it is designed for general triangles. The dedicated Pythagorean tool provides a faster workflow for a known 90° angle.

Related calculators

Use the Midpoint Calculator for Cartesian points, distance and slope, the Pythagorean Theorem Calculator for right triangles, the Square Root Calculator for radicals, or the Ramp Calculator for rise, run, grade and length.