Triangle Calculator Explained: SSS, SAS, ASA and AAS with Worked Examples

Three independent measurements fix a triangle uniquely in four classical cases — SSS, SAS, ASA and AAS. Here is how the laws of sines and cosines, Heron’s formula and the 180° angle sum work together to find the missing sides, angles, area and perimeter, plus why SSA is the one case that refuses to play nicely.

#geometry#triangle#trigonometry#law-of-sines#law-of-cosines#heron#math

The four cases that fix a triangle uniquely

Three numbers are enough to pin a triangle down — as long as you pick the right three. The classical congruence cases of plane geometry say that any of SSS, SAS, ASA, or AAS determines a triangle uniquely up to rigid motion. The triangle calculator handles each of those four cases, taking your three measurements and returning the remaining three plus the area and perimeter. The shorthand is worth memorising before you go any further:

  • SSS — three sides, no angles.
  • SAS — two sides and the angle between them.
  • ASA — two angles and the side between them.
  • AAS — two angles and a side that is not between them.

Notice what is missing: SSA, two sides plus an angle that is not between them. That one is left out for a reason we will come back to. It is the famously ambiguous case, and the only one of the five combinations that can produce zero, one, or two distinct triangles depending on the inputs.

The two tools that do all the work

Behind the scenes, the triangle calculator only ever uses two trigonometric identities and one geometric one. Once you understand those three rules, every classical case unwinds the same way.

The law of cosines

The law of cosines is a generalisation of the Pythagorean theorem to any triangle. It says that for any triangle with sides a, b, c and angle C opposite side c:

c² = a² + b² − 2ab·cos(C)

When C is exactly 90° the cosine is zero, the last term vanishes, and you are left with the Pythagorean equation a² + b² = c². For obtuse C the cosine is negative, so c grows beyond the Pythagorean value; for acute C the cosine is positive and c shrinks below it. The same identity, rearranged for the angle, reads:

cos(C) = (a² + b² − c²) / (2ab)

That is the form used in SSS: you already know all three sides, so you can plug straight in and get every angle by an arccos.

The law of sines

The law of sines connects each side of a triangle to the angle opposite it. It says that for the same triangle:

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

The shared ratio is not arbitrary — it equals the diameter of the triangle’s circumscribed circle (the unique circle passing through all three vertices). The rule comes into its own whenever you know a side and the angle facing it: you can immediately compute another side as soon as you have the angle facing that one. ASA and AAS both work that way, and the second step of SAS uses the same idea once the missing side has been found by the law of cosines.

The 180° rule

The angles of any plane triangle sum to exactly 180°. That single fact lets you recover the third angle from any two by simple subtraction, which is why ASA and AAS reduce so cleanly. It also fails outside plane geometry — on the surface of a sphere, the angles of a triangle sum to more than 180°, while on a saddle-shaped surface they sum to less. The Calc Dragon triangle calculator is strictly Euclidean.

Worked example 1 — SSS with sides 3, 4, 5

The most familiar small triangle is the 3-4-5 right triangle. Treat the sides as a = 3, b = 4, c = 5 and work through SSS step by step.

  1. Check the triangle inequality. 3 + 4 = 7 > 5, 3 + 5 = 8 > 4, 4 + 5 = 9 > 3. All three pass, so a triangle exists.
  2. Compute angle A using cos(A) = (b² + c² − a²) / (2bc) = (16 + 25 − 9) / (2·4·5) = 32 / 40 = 0.8, so A = arccos(0.8) ≈ 36.87°.
  3. Compute angle B using cos(B) = (a² + c² − b²) / (2ac) = (9 + 25 − 16) / (2·3·5) = 18 / 30 = 0.6, so B = arccos(0.6) ≈ 53.13°.
  4. Angle C by subtraction: 180° − 36.87° − 53.13° = 90.00°, confirming the right angle.
  5. Area by Heron’s formula. The semi-perimeter is s = (3 + 4 + 5)/2 = 6, and the area is √(6·3·2·1) = √36 = 6 square units.
  6. Perimeter: 3 + 4 + 5 = 12.

Drop those same three sides into the triangle calculator and you should see exactly 36.87°, 53.13°, 90°, area 6, perimeter 12.

Worked example 2 — SAS with a = 7, b = 5, included angle C = 60°

Now take two sides and the angle between them. Sides a = 7 and b = 5 meet at angle C = 60°. To find side c:

  1. Law of cosines for the missing side. c² = 7² + 5² − 2·7·5·cos(60°) = 49 + 25 − 70·0.5 = 74 − 35 = 39. So c = √39 ≈ 6.2450.
  2. Law of sines for one of the remaining angles. sin(A) / 7 = sin(60°) / √39. sin(60°) = √3/2 ≈ 0.8660, so sin(A) ≈ 7·0.8660 / 6.2450 ≈ 0.9707, giving A ≈ 76.10°.
  3. Third angle by the 180° rule. B = 180° − 60° − 76.10° = 43.90°.
  4. Area by ½·a·b·sin(C): 0.5·7·5·sin(60°) ≈ 17.5·0.8660 ≈ 15.16 square units. Heron’s formula on the rounded sides gives the same answer.

Worked example 3 — ASA with A = 50°, c = 8, B = 60°

Two angles bracket the side between them. With A = 50°, B = 60° and c = 8:

  1. Third angle. C = 180° − 50° − 60° = 70°.
  2. Law of sines. The common ratio is c / sin(C) = 8 / sin(70°) ≈ 8 / 0.9397 ≈ 8.514.
  3. Sides a and b. a = 8.514·sin(50°) ≈ 8.514·0.7660 ≈ 6.523; b = 8.514·sin(60°) ≈ 8.514·0.8660 ≈ 7.373.
  4. Area. Heron with s = (6.523 + 7.373 + 8)/2 ≈ 10.948 gives area ≈ √(10.948·4.425·3.575·2.948) ≈ √511.6 ≈ 22.62 square units.

AAS proceeds in the exact same way — recover the third angle by subtraction first, then run the law of sines. The only difference is whether the known side sits between the two known angles (ASA) or not (AAS).

Why SSA is the ambiguous case

Five three-piece combinations exist: SSS, SAS, ASA, AAS and SSA. The first four each describe a unique triangle. SSA — two sides and an angle that is not between them — can describe zero, one, or two distinct triangles depending on the inputs.

To see why, imagine you fix side b along a horizontal line and angle A at its left end, then try to swing side a down from the open ray that angle A sends out. Side a is a fixed length, so its tip traces a circle of radius a around the right-hand end of b. Depending on whether that circle misses the swung-out ray, just grazes it, or cuts it twice, you get no triangle, one triangle, or two. The two-triangle case occurs when a is shorter than b but longer than the perpendicular height from the right-hand vertex.

Pretending SSA has a single answer is a great way to ship the wrong geometry. The triangle calculator intentionally omits it. If you have SSA data, draw the configuration on paper, or work the two candidates out by hand using the law of sines and check whether each angle leaves room for a positive third one.

Common mistakes to avoid

Mixing units

All three sides must be in the same length unit. Two metres and one foot is not a triangle the calculator can solve sensibly — convert first with the area converter for area-units or simply rescale all three sides to a common unit before entering them. Angles, separately, are always degrees here, never radians.

Using degrees and radians interchangeably

The trig functions on a scientific calculator work in either degree mode or radian mode, and forgetting to switch is by far the most common arithmetic error in triangle problems. Inside the Calc Dragon triangle calculator the inputs and outputs are both in degrees; if you are reproducing a worked example by hand on a pocket calculator, double-check the DEG/RAD setting before you start.

Forgetting the triangle inequality

Three positive numbers only form a triangle when each is strictly less than the sum of the other two. Sides 1, 2, 10 do not — a length of 10 cannot be reached by two segments totalling only 3. The calculator returns the inequality error in that case; do not interpret it as a bug.

Mislabelling sides and angles

Side a sits opposite angle A, side b opposite B, side c opposite C. This is a labelling convention, not a fact of nature, but every formula on this page assumes it. If you label the diagram any other way, the law of sines starts giving the wrong sides, and SAS in particular asks for the angle between the two known sides — not just any angle of the triangle.

Trusting rounded intermediate results

Round only at the very end of a multi-step calculation. If you round an angle to a single decimal place midway through and then feed it back into the law of sines, the propagation can move the final answer in the second or third significant figure. The calculator carries roughly fifteen digits internally and rounds only the display values.

How to choose which mode to use

For a real-world problem you almost never have a perfectly clean SSS or AAS configuration handed to you — you have to look at what you can actually measure and pick the mode that fits.

  • SSS when you can measure all three sides directly with a tape — for instance, a triangular flowerbed or a sail.
  • SAS when you can measure two sides plus the corner angle between them — typical for carpentry layouts where the angle is fixed by a jig.
  • ASA when you have a known baseline and have measured the angles at each end of it — the bread-and-butter case in surveying.
  • AAS when you have two angles and a side that is not the one between them — comes up when one angle is awkward to measure but easy to deduce from a sketch.

If you have a right angle in the mix, two complementary tools can be quicker: the Pythagorean theorem calculator for the side relation, and the dedicated right-triangle tool for the angles. For classifying without solving, the acute triangle calculator tests whether the largest angle sits below 90° using only the squared sides.

When to seek extra help

For homework, hobby projects, and quick sanity checks the trig described here is more than enough. For professional surveying or precision engineering, you usually want a tool that accounts for measurement error, propagates uncertainty, and adjusts redundant measurements by least squares. The math itself does not change — the law of sines and cosines still hold — but the workflow around them does. National mapping agencies (Ordnance Survey, USGS) publish the conventions their surveyors use, and standards bodies such as ISO and NIST keep the underlying length and angle units pinned to physical constants.

If your triangle is on a curved surface — a global flight path, a long stretch of coastline — plane trigonometry will give the wrong answer because the angles no longer sum to 180°. That is spherical trigonometry, an entirely different toolkit. Anything inside a single room, a single field, or a typical homework problem is plane geometry, and the triangle calculator handles it without fuss.

Frequently asked questions

What do SSS, SAS, ASA and AAS mean?

They label four ways of describing a triangle by three measurements. SSS is three sides. SAS is two sides plus the angle between them (the "included" angle). ASA is two angles plus the side between them. AAS is two angles plus a side that is not between them. Each of the four uniquely determines a triangle up to reflection and rotation, which is why a calculator can return a single answer.

Why is the SSA case missing from the triangle calculator?

SSA — two sides plus a non-included angle — is the famous ambiguous case. Depending on how the given side compares to the height of the triangle formed by the other side and angle, you can get zero, one, or two valid triangles. Forcing a single answer would hide that ambiguity, so the calculator simply does not offer it. If you have SSA data, sketch the geometry on paper or use a dedicated ambiguous-case solver to see all possibilities.

Does the triangle calculator work for right triangles?

Yes. A right triangle is just a triangle with one 90° angle, and the laws of sines and cosines still apply. Enter the three sides (SSS) for a 3-4-5 triangle and the calculator returns 36.87°, 53.13° and 90°. If you only have the two legs, that is technically an SAS problem with the included angle equal to 90°. For the simpler Pythagorean a² + b² = c² case the dedicated right-triangle and Pythagorean tools are faster.

What unit should I use for the side lengths?

Any single length unit you like — metres, feet, inches, miles — provided you use the same one for all three sides. The trigonometry is scale-free, so the angle answers come out the same regardless of unit, the perimeter comes back in your chosen length unit, and the area in that unit squared. Angles, by contrast, are always in degrees inside this calculator.

Why use Heron’s formula instead of ½·base·height?

Heron’s formula computes area from the three sides alone, with no need to identify a base or measure a height. Once the calculator has all three sides (which happens at the end of every mode), Heron is numerically stable and avoids the rounding error you can introduce by computing a height from already-rounded angles. The ½·base·height and ½·a·b·sin(C) formulas give the same answer when you do have an angle or a height to work with.

Can the three angles always be recovered from the three sides?

Yes — provided the three sides actually form a triangle. The triangle inequality must hold: each side strictly less than the sum of the other two. If it does, the law of cosines gives every angle uniquely, since the cosine function is one-to-one on the (0°, 180°) interval that triangle angles live in. If the inequality fails, no triangle exists and the calculator returns an error rather than nonsense angles.

What if my angles do not add up to 180°?

They have to — that is a defining property of plane (Euclidean) triangles. If you have three angles and they sum to anything other than 180°, you either measured wrong or you are doing spherical or hyperbolic geometry, where the sum is greater than or less than 180° respectively. The Calc Dragon triangle calculator is Euclidean only, and it uses the 180° rule explicitly in the ASA and AAS modes to recover the third angle by subtraction.

Is this calculator any good for surveying or construction work?

It is fine for one-off sanity checks and learning, but professional surveying uses dedicated software that accounts for measurement error, the curvature of the Earth over long baselines, and least-squares adjustment when you have redundant measurements. For a roof pitch, a piece of timber, or a homework problem, the laws of sines and cosines as implemented here are exact and will not let you down.

Informational only. Not personalised financial, legal, or tax advice.