Skip to main content

Calculators

Triangle Calculator

Solve triangle sides, angles, area, and perimeter.

Triangle Calculator tool

Loading tool…

Jump to a section

About This Tool

A triangle is fully determined when you know enough independent measurements. This calculator solves two common, unambiguous cases: three side lengths (SSS), or two side lengths and the angle between them (SAS). It returns all three sides and angles plus perimeter, area, and the side-based triangle type. Calculations run locally in your browser, and the side values can use any length unit as long as you use the same unit consistently.

How To Use It

  1. Choose Three sides when you know a, b, and c. The calculator checks the triangle inequality before solving the angles and area.
  2. Choose Two sides + angle when you know two sides and the included angle between them. Enter the angle in degrees between 0° and 180°.
  3. Read the calculated sides and angles together. Perimeter uses your original length unit, while area is reported in the corresponding square unit.

Examples

3-4-5 right triangle

Sides 3, 4, and 5 form a valid scalene triangle. Its perimeter is 12, area is 6 square units, and the angle opposite side 5 is 90°.

Two sides with a 90° included angle

With sides 3 and 4 and an included angle of 90°, the law of cosines gives the third side as 5. The completed triangle is the familiar 3-4-5 triangle.

Equilateral triangle

Three equal sides, such as 5, 5, and 5, produce three 60° angles. The calculator classifies the triangle as equilateral.

Impossible side lengths

Lengths 1, 2, and 3 cannot form a non-degenerate triangle because the two shorter sides do not add to more than the longest side.

Useful Notes

Solving from three sides (SSS)

When all sides are known, each angle can be found with the law of cosines. For example, cos(C) = (a² + b² − c²)/(2ab). The calculator applies the corresponding formula to all three angles and constrains tiny floating-point rounding errors before inverse cosine is evaluated.

Solving from two sides and the included angle (SAS)

For sides a and b with included angle C, the law of cosines gives c² = a² + b² − 2ab cos(C). Once the third side is known, the calculator uses the SSS method to find the remaining angles and other measurements.

Area and perimeter

Perimeter is a + b + c. For SSS data, area is calculated with Heron's formula: area = √(s(s−a)(s−b)(s−c)), where s is half the perimeter. The same completed side set is used after an SAS triangle is solved.

Triangle inequality and degenerate cases

For a real non-degenerate triangle, the sum of any two sides must be greater than the third side. Equality would place all three vertices on a straight line, producing zero area, so the calculator rejects that case.

Units and precision

Sides may be centimetres, metres, inches, feet, or another length unit, but they must all use the same unit. Angles are displayed in degrees. Results use floating-point arithmetic and are rounded only for display, so extremely large or nearly degenerate inputs can have limited numerical precision.

FAQ

Can I enter only two sides without an angle?

No. Two sides alone do not determine one unique triangle. You need another independent measurement, such as the included angle, to select a specific triangle.

Why does the calculator reject some three-side inputs?

The triangle inequality requires every pair of sides to add to more than the remaining side. If that condition fails, those lengths cannot form a non-degenerate triangle.

Does the calculator handle right triangles?

Yes. Right triangles are handled naturally by the SSS or SAS methods. A 3-4-5 triangle, for example, returns a 90° angle.

What units should I use?

Any consistent length unit works. If the sides are in metres, perimeter is in metres and area is in square metres; if sides are in inches, area is in square inches.