Triangle Calculator

Triangle geometry

Enter the three side lengths of a triangle, using any consistent unit. The calculator checks the triangle inequality, identifies whether the triangle is equilateral, isosceles or scalene, then uses Heron’s formula and the law of cosines to return the area, perimeter and angles A, B and C.

How the triangle calculator works

  1. 1

    Enter side a, side b and side c

    Use centimetres, inches, metres or any other unit, as long as all three sides use the same unit.

  2. 2

    Validate the side lengths

    The longest side must be shorter than the sum of the other two sides.

  3. 3

    Calculate area and angles

    Heron's formula gives the area, and the law of cosines gives angles A, B and C.

  4. 4

    Read the complete result

    Get the triangle type, perimeter, area and each angle in degrees.

What this calculator solves

Known inputs Method used Result
Three side lengths (SSS) Triangle inequality, Heron’s formula and law of cosines Validity, triangle type, perimeter, area and angles A, B and C

This page is for the side-side-side case. If you know angles instead of all three sides, use a trigonometry calculator or draw the triangle first so the missing side lengths are defined.

The triangle inequality

For any valid triangle with sides a, b, c: each side must be less than the sum of the other two:

a + b > c
b + c > a
a + c > b

Inputs that violate this rule do not form a real triangle, so the calculator flags the error instead of returning misleading geometry.

Area from three sides

When all three sides are known, the calculator uses Heron’s formula:

s = (a + b + c) / 2
area = √(s(s-a)(s-b)(s-c))

Here, s is the semiperimeter. If the sides are in centimetres, the area is in square centimetres; if the sides are in inches, the area is in square inches.

Angles from three sides

After the sides are validated, each angle comes from the law of cosines:

cos(A) = (b² + c² − a²) / (2bc)
cos(B) = (a² + c² − b²) / (2ac)
cos(C) = (a² + b² − c²) / (2ab)

The calculator converts the results to degrees and rounds them for display.

Triangle type

The side lengths also identify the triangle type:

  • Equilateral: all three sides are equal.
  • Isosceles: exactly two sides are equal.
  • Scalene: all three sides are different.

A 3, 4, 5 triangle is valid and close to a common right-triangle example. A 2, 3, 6 entry is invalid because 2 + 3 is not greater than 6.

Frequently Asked Questions

Yes. The calculator is unit-neutral. Enter all three sides in the same unit, and the perimeter uses that unit while the area uses the matching square unit.

The triangle inequality fails. The longest side must be shorter than the sum of the other two sides. Double-check the numbers and make sure all sides use the same unit.

Yes. The input is only side lengths, and the calculated angles are displayed in degrees.

This version solves the side-side-side case. Three side lengths uniquely define a triangle when the triangle inequality is satisfied.

No. All calculations run in your browser.

Related Tools