Skip to content

Triangle calculator

Solve one valid triangle from its three side lengths (SSS).

Triangle calculatorEnter valid values to update the drawing.Enter valid values to update the drawing.

Enter three side lengths

Processed in your browser.

Positive length; use the same unit for all sides. Accepted range: 1e−150 to 1e100.

Positive length; use the same unit for all sides. Accepted range: 1e−150 to 1e100.

Positive length; use the same unit for all sides. Accepted range: 1e−150 to 1e100.

Triangle results

Enter the measurements and calculate to see a result.

How to use the triangle calculator

  1. Measure sides a, b and c in the same unit and enter only the numbers.
  2. Check that every length is positive. A valid triangle also needs any two sides to total more than the remaining side.
  3. Select Calculate triangle to get area, perimeter, angles A–C and the altitude to each corresponding side.
  4. Editing any side clears the confirmed result and disables copying until you calculate again.

SSS formulas used

The perimeter is P = a + b + c. With semiperimeter s = P/2, Heron’s formula gives area K = √(s(s−a)(s−b)(s−c)).

The law of cosines gives A = arccos((b²+c²−a²)/(2bc)), with the other angles found cyclically. The three angles total 180°.

Each altitude comes from K = base × height / 2, so hₐ = 2K/a, hᵦ = 2K/b and h𝒸 = 2K/c. Calculations retain internal precision; ordinary displays use at most two decimals.

Worked examples

3–4–5 right triangle

For a=3, b=4 and c=5, the perimeter is 12, area is 6, angles are about 36.87°, 53.13° and 90°, and the three heights are 4, 3 and 2.4.

Equilateral triangle with side 6

All angles are 60°. The perimeter is 18, area is 9√3 ≈ 15.59, and every altitude is 3√3 ≈ 5.2.

Limits and input rules

Frequently asked questions

Which angle is A?

Angle A is opposite side a; B is opposite b and C is opposite c.

Why was 1, 2, 3 rejected?

Because 1 + 2 equals 3, the points form a straight line and enclose no area.

Does the largest side have the largest angle?

Yes. In any valid triangle, side and opposite-angle order match.