Home / Triangle Calculator

Triangle Calculator

Enter any combination of sides and angles that defines a triangle (SSS, SAS, ASA, or AAS) to find all missing values. The calculator shows which rule it applied, then computes area by Heron's formula and perimeter.

Chris Terry
By Chris Terry, Editor
Updated June 20, 2026

Enter known values

Sides a, b, c are opposite to angles A, B, C respectively. Angles are in degrees. Leave unknowns blank. At least one side is required.

Result

Method used--
Side a--
Side b--
Side c--
Angle A--
Angle B--
Angle C--
Area (Heron)--
Perimeter--
Enter values above and press Solve.

Triangle solving methods

A general triangle has three sides (a, b, c) and three angles (A, B, C). Three independent values are enough to determine the triangle, provided at least one of them is a side. The calculator picks the right method automatically.

Law of cosines (SSS and SAS)

c² = a² + b² - 2ab cos C

Use it to find a missing side when two sides and the included angle are known (SAS), or to find any angle when all three sides are known (SSS). Rearranged for angle: cos C = (a squared + b squared - c squared) / (2ab).

Law of sines (ASA and AAS)

a / sin A = b / sin B = c / sin C

Use it when a side and its opposite angle are both known. Given ASA (two angles and the side between them) or AAS (two angles and a non-included side), the law of sines resolves the triangle in one step.

Heron's formula for area

s = (a + b + c) / 2     Area = sqrt(s(s-a)(s-b)(s-c))

Once all three sides are found, s is the semi-perimeter and the area follows without needing a height.

Worked example: SSS with a = 7, b = 10, c = 5

Step 1. Find angle A (law of cosines). cos A = (b squared + c squared - a squared) / (2bc) = (100 + 25 - 49) / (2 x 10 x 5) = 76 / 100 = 0.76. A = arccos(0.76) = 40.54 degrees.
Step 2. Find angle B (law of cosines). cos B = (a squared + c squared - b squared) / (2ac) = (49 + 25 - 100) / (2 x 7 x 5) = -26 / 70 = -0.3714. B = arccos(-0.3714) = 111.8 degrees.
Step 3. Angle C. C = 180 - 40.54 - 111.8 = 27.66 degrees.
Step 4. Area (Heron). s = (7 + 10 + 5) / 2 = 11. Area = sqrt(11 x 4 x 1 x 6) = sqrt(264) = 16.25.
Step 5. Perimeter. 7 + 10 + 5 = 22.

If your triangle has a right angle, the Right Triangle Calculator is faster. To find the slope of a side between two known coordinates, use the Slope Calculator.

For a formal treatment of the laws of sines and cosines, see Wolfram MathWorld on the law of cosines.

More free math tools

Pythagorean theorem, quadratic formula, standard deviation, and more.

Good to know

Frequently asked questions

How do you solve a triangle given three sides (SSS)?

Use the law of cosines. For angle A: cos A = (b squared + c squared minus a squared) / (2bc). Repeat for a second angle, then get the third by subtracting both from 180. The calculator does this automatically for SSS inputs.

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

Use Heron's formula. Compute s = (a + b + c) / 2, then area = sqrt(s times (s minus a) times (s minus b) times (s minus c)). No height is required, just the three side lengths.

What is the law of sines?

a / sin A = b / sin B = c / sin C. All three ratios are equal. This resolves the triangle when a side and its opposite angle are both known alongside one other value (ASA, AAS, or SSA cases).

What is the law of cosines?

c squared = a squared + b squared minus 2ab cos C. It is the general form of the Pythagorean theorem that applies to any triangle. Use it for SSS (finding an angle) and SAS (finding the third side).

Can you solve a triangle with only angles?

No. Angles alone fix shape but not size. An unlimited number of similar triangles share the same angles. You need at least one side length to lock in a scale and return numeric answers.

What is the triangle inequality?

Each side must be less than the sum of the other two: a + b greater than c, a + c greater than b, b + c greater than a. If any of these fails, the three values cannot form a real triangle.

Chris Terry
About the author
Chris Terry
Editor, Encore Editorial

Editor at Encore Editorial, Chris Terry sets the editorial standards here and turns dense topics into plain English. He has written widely on education, finance, and consumer markets.