Triangle Calculator

Enter three sides (SSS) or two sides and the included angle (SAS) to get the angles, area, perimeter and type.

Calculator
Result

What this tool does

To solve a triangle from three sides, enter a, b and c: the angles come from the law of cosines and the area from Heron's formula. For two sides and the angle between them, the third side comes from the law of cosines. A 3-4-5 triangle has angles of 36.87°, 53.13° and 90°, an area of 6 and a perimeter of 12.

Finds all three angles, the area, the perimeter and the type of a triangle from SSS or SAS input.

Checks the triangle inequality and tells you if the sides cannot form a triangle.

How to use it

  1. Choose SSS (three sides) or SAS (two sides and the angle between).
  2. Enter the sides, and the angle for SAS.
  3. Read the angles, area, perimeter and type.

Why use this calculator

Solves a triangle from three sides or from two sides and the angle between them, returning every angle, the area and the perimeter. Triangle problems come up in building, surveying, design and school maths, and the law of cosines and Heron's formula are easy to get wrong by hand.

Why we built it

We built the triangle calculator to solve from three sides or from two sides and the angle between them, returning every angle, the area and the type of triangle. The Pythagorean theorem calculator handles right triangles directly, and the area calculator covers other shapes.

Handy alongside this: the Scientific Calculator.

Who this tool is for

  • Students solving triangles
  • Surveyors and builders checking measurements
  • Anyone with two sides and an angle

When to use it

  • Finding the angles of a roof truss, ramp or frame.
  • Surveying and land measurement.
  • Geometry homework.
  • Checking that three lengths can make a triangle.

How it works

Angles by the law of cosines: A = arccos((b² + c² − a²) ÷ 2bc), and likewise for B and C. With SAS the missing side is c = √(a² + b² − 2ab cos C). Area by Heron's formula: with s = (a + b + c) ÷ 2, area = √(s(s − a)(s − b)(s − c)).

The triangle inequality requires each side to be shorter than the sum of the other two; otherwise no triangle exists, and the calculator says so.

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

A worked example

These are the values the calculator opens with, so you can see exactly what it does with them. Change any value on the page and the result updates; the figures below come from the same calculation.

Example inputs for the triangle calculator
InputValue
I knowThree sides (SSS)
Side a3
Side b4
Side c5
Angle between a and b, in degrees90

With those inputs, the calculator returns:

  • Area: 6
  • Side c: 5
  • Angle A: 36.87°
  • Angle B: 53.13°
  • Angle C: 90°
  • Perimeter: 12
  • Type: Scalene, right-angled

What you give it, and what you get back

Input and output of Triangle Calculator
ItemDetails
ModeThree sides (SSS) or two sides and the angle between them (SAS).
SidesSides a, b and c in any one unit.
AngleThe included angle in degrees between 0 and 180 (SAS only).
ResultArea, third side, the three angles, perimeter and the triangle type.

Issues you may run into

Common problems with Triangle Calculator
What you seeWhy it happensWhat to do
"These sides cannot make a triangle"One side is as long as or longer than the other two together.Check your measurements.
Angles do not add to 180°Rounding in the display.The underlying values sum exactly.
Needs an angle I do not haveOnly SSS and SAS are supported.Use the Pythagorean theorem for a right triangle with two known sides.
Area is in odd unitsIt is in the square of your side unit.Check the unit.

Assumptions and limitations

Frequently asked questions

How do I find the angles of a triangle from its sides?

Use the law of cosines. This calculator does it: enter the three sides.

How do I find the area of a triangle with three sides?

Use Heron's formula: take s = half the perimeter, then area = √(s(s−a)(s−b)(s−c)).

What makes a triangle right-angled?

One angle is exactly 90°, which happens when a² + b² = c².

Why does it say my sides cannot make a triangle?

Each side must be shorter than the other two added together.

What is SAS?

Side-angle-side: two sides and the angle between them, which fully determine a triangle.

Is it free and private?

Yes. It runs in your browser.