HomeMath › Triangle Calculator

Triangle Calculator

Triangle Sides

Enter three sides, or two sides with an angle. Leave others blank.

Triangle Angles

Optional: Enter angles in degrees.

°
°
°

Uses the Law of Cosines to solve SSS and SAS cases, and Heron's formula for area: s = (a+b+c)/2, area = √(s(s−a)(s−b)(s−c)). Classifies the triangle as equilateral, isosceles, or scalene — and flags right triangles via the Pythagorean check. Related: Pythagorean theorem, area.

Show the math
Enter values to see the worked formula.

What Your Result Means

How This Calculator Works

You enter at least three measurements — three sides, or two sides with the included angle. The tool applies the Law of Cosines to find unknown sides or angles, then uses Heron's formula for area. It validates the triangle inequality (any two sides must sum to more than the third) and checks for a right angle via the Pythagorean theorem.

Quick Questions

What is the Law of Cosines?

The Law of Cosines generalizes the Pythagorean theorem to any triangle: c² = a² + b² − 2ab·cos(C). It lets you find an unknown side from two sides and the included angle, or find an angle from all three sides.

What is Heron's formula?

Heron's formula calculates a triangle's area from its three side lengths without needing a height measurement. First compute the semi-perimeter s = (a+b+c)/2, then area = √(s(s−a)(s−b)(s−c)).

Can I enter angles without sides?

No — angles alone define the shape but not the size of a triangle. You need at least one side length combined with angles to determine a unique triangle with computable area and perimeter.

Why does it say "invalid triangle"?

A valid triangle requires that the sum of any two sides exceeds the third side. If your inputs violate this rule, no real triangle can be formed and the calculator displays an error.

Does this handle obtuse triangles?

Yes. The Law of Cosines works for all triangle types — acute, right, and obtuse. The calculator correctly identifies the type and returns accurate results regardless of angle size.

Sources

Method & review

MethodologyHow we calculate this Reviewed & Updated2026-04 Next review2027-04

Estimate only. Results reflect your inputs and standard formulas. Double-check important decisions independently.