Triangle Calculator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free triangle calculator. Enter any three values to solve a triangle with the laws of sines and cosines: sides, angles, area and perimeter, even SSA.

Fill in exactly three boxes, including at least one side. Each angle is opposite the side with the same letter.

Angles
0
Sides
0
Area
0
Perimeter
0
Type
0

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the triangle calculator

  1. Fill in exactly three of the six boxes, including at least one side: sides a, b, c and angles A, B, C (in degrees).
  2. Match sides and angles correctly: each angle is opposite the side with the same letter (angle A is opposite side a).
  3. Read the results. The triangle calculator finds the missing sides and angles, the area, the perimeter and whether the triangle is acute, right or obtuse. It also tells you which method it used.

If the values you enter can form two different triangles (the "ambiguous case"), the calculator shows both.

Which three values do you need?

A triangle is fixed by three values, as long as at least one is a side:

Case You know Method
SSS Three sides Law of cosines
SAS Two sides and the angle between them Law of cosines
ASA Two angles and the side between them Law of sines
AAS Two angles and a side not between them Law of sines
SSA Two sides and an angle not between them Law of sines (may give 0, 1 or 2 triangles)
AAA Three angles Not enough: the size isn't fixed

The law of sines

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

Each side divided by the sine of its opposite angle gives the same number. It's used when you know two angles and a side (ASA, AAS), or two sides and a non-included angle (SSA).

Example (AAS): A = 30°, B = 45°, a = 5. Then C = 180° − 30° − 45° = 105°, and b = 5 × sin 45° ÷ sin 30° = 7.07, c = 5 × sin 105° ÷ sin 30° = 9.66.

The law of cosines

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

It's the Pythagorean theorem adjusted for angles that aren't 90°. It's used when you know three sides (SSS) or two sides and the angle between them (SAS).

Example (SSS): a = 5, b = 6, c = 7. Rearranged for an angle: cos C = (a² + b² − c²) ÷ (2ab) = (25 + 36 − 49) ÷ 60 = 0.2, so C = 78.46°. Similarly, A = 44.42° and B = 57.12°.

Example (SAS): b = 5, c = 7, A = 60°. a² = 25 + 49 − 2 × 5 × 7 × cos 60° = 74 − 35 = 39, so a = 6.24.

The ambiguous case (SSA)

When you know two sides and an angle that isn't between them, there may be no triangle, one triangle or two different triangles that fit.

Suppose a = 8, b = 10 and A = 40°. By the law of sines, sin B = 10 × sin 40° ÷ 8 = 0.8035, so B could be 53.5° or its supplement 126.5°. Both leave room for a positive third angle, so two triangles fit. The triangle calculator shows both solutions.

If side a were too short to reach the third side (for example a = 5 with the same b and A), there would be no triangle at all, and the calculator tells you so.

Area of a triangle

The triangle calculator uses Area = ½ × b × c × sin A, which works for any triangle once two sides and the angle between them are known. Other formulas give the same result:

  • ½ × base × height when you know the height.
  • Heron's formula from three sides: with s = (a + b + c) ÷ 2, area = √(s(s − a)(s − b)(s − c)).

For the 5-6-7 triangle, s = 9 and area = √(9 × 4 × 3 × 2) = √216 ≈ 14.70. Our triangle area calculator focuses on area.

Types of triangle

  • Acute: all angles under 90°.
  • Right: one angle exactly 90°. Use the right triangle calculator for these.
  • Obtuse: one angle over 90°.
  • Equilateral: all sides equal, all angles 60°.
  • Isosceles: two sides (and two angles) equal.
  • Scalene: all sides different.

Checks for valid triangles

  • The three angles must add up to 180°.
  • Any two sides must add up to more than the third (the triangle inequality). Sides of 2, 3 and 10 can't form a triangle.
  • The longest side is always opposite the largest angle.

The calculator checks these rules and explains when values can't form a triangle.

Real-world uses

  • Surveying and land measurement: working out distances and boundaries from angles and known lengths (triangulation).
  • Navigation: finding positions from bearings.
  • Construction: roof trusses, irregular plots and bracing.
  • Engineering and physics: forces and vectors at angles.
  • Astronomy: distances to nearby stars using parallax.

A worked example

Sam wants to know the width of a pond. Standing at point C, Sam measures 40 m to tree A on one side and 55 m to tree B on the other, with an angle of 70° between the two lines of sight.

In the triangle calculator, with b = 40 (CA), a = 55 (CB) and C = 70°, this is an SAS case. The width of the pond (side c, between the trees) is 55.9 m, and the angles at the trees are about 67.7° at A and 42.3° at B.

Who uses a triangle calculator

Students use it for trigonometry and geometry. Surveyors, engineers and architects use it for measurements and designs. Builders and DIYers use it for roofs and irregular spaces. Teachers use it to check answers and create problems.

Need more customers from Google?

This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.

Which method does the triangle calculator use?

The triangle calculator picks a method based on what you enter:

  • Three sides (SSS): it uses the law of cosines to find each angle.
  • Two sides and the angle between them (SAS): it uses the law of cosines to find the third side, then finds the remaining angles.
  • Two angles and any side (ASA or AAS): it finds the third angle by subtracting from 180°, then uses the law of sines for the other sides.
  • Two sides and an angle not between them (SSA): it uses the law of sines and checks whether there are zero, one or two possible triangles.

Knowing the method helps you check the answer by hand, and it explains why some inputs give two solutions while others give one.

Heron's formula

When you know all three sides, you can find the area without finding any angles, using Heron's formula. First work out the semi-perimeter s, which is half the sum of the sides. Then the area is √(s(s − a)(s − b)(s − c)). For a triangle with sides 5, 6 and 7, s = 9, and the area is √(9 × 4 × 3 × 2) = √216 ≈ 14.70. Surveyors use Heron's formula to find the area of a plot of land by splitting it into triangles and measuring only the boundary lengths.

Splitting shapes into triangles

Any polygon can be divided into triangles by drawing diagonals from one corner. A four-sided field with no right angles is hard to measure directly, but if you measure its four sides and one diagonal, you get two triangles with three known sides each. Use the triangle calculator on each, add the two areas, and you have the area of the whole field. The same idea is used in land surveying, carpentry and computer graphics, where 3D models are built from thousands of tiny triangles.

Precision and rounding

Small measurement errors can matter, especially for very thin triangles, where one angle is tiny. A difference of a few millimetres in one side can change a small angle noticeably. Measure as accurately as you can, keep full precision while calculating, and round only the final answers. The triangle calculator shows results to sensible precision, and you can always enter more decimal places if your measurements support them.

Checking your answer

After you use the triangle calculator, run three quick checks. The three angles must add up to exactly 180°. The longest side must be opposite the largest angle, and the shortest side opposite the smallest angle. And each side must be shorter than the sum of the other two. If any of these fail, recheck your inputs, especially whether you entered an angle in the right box.

Sources and further reading

Frequently asked questions

How do I solve a triangle?

Enter three values (including at least one side). Use the law of cosines for SSS and SAS, and the law of sines for ASA, AAS and SSA.

What is the law of sines?

a ÷ sin A = b ÷ sin B = c ÷ sin C.

What is the law of cosines?

c² = a² + b² − 2ab cos C.

What is the ambiguous case?

When two sides and a non-included angle are known (SSA), there can be zero, one or two possible triangles.

Can I solve a triangle from three angles?

No. Three angles fix the shape but not the size.

Is the triangle calculator free?

Yes. It's free, needs no sign-up, and works in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep