Audited 01 Jun 2026·Last updated 26 Jul 2026·8 citations·Tier 1·0 uses

Triangle Solver Calculator

Free triangle calculator: solve any triangle from SSS, SAS, or ASA inputs. Returns all sides, all angles, area, and perimeter with full worked steps.

Triangle Solver Calculator

Which three measurements do you know?
The side opposite vertex A. Required in SSS and SAS modes; computed for you in ASA mode.
The side opposite vertex B. Required in SSS and SAS modes; computed for you in ASA mode.
The side opposite vertex C. Required in SSS mode and ASA mode (where it is the included side). Computed for you in SAS mode.
Angle at vertex A, in degrees. Required in ASA mode. Strictly between 0° and 180°.
Angle at vertex B, in degrees. Required in ASA mode. Strictly between 0° and 180°, and A + B must be less than 180°.
Angle at vertex C, in degrees. Required in SAS mode as the included angle between sides a and b. Strictly between 0° and 180°.
Area
6
The area of the triangle, computed as (1/2) · a · b · sin C. Equivalent to Heron's formula √(s(s−a)(s−b)(s−c)) where s = (a+b+c)/2.
Side a
3
Side b
4
Side c
5
Angle A (degrees)
36.8699
Angle B (degrees)
53.1301
Angle C (degrees)
90
Perimeter
12

Background.

The Quanta triangle calculator solves any triangle — right, acute, or obtuse — from any of the three classical congruence inputs: SSS (three sides), SAS (two sides and the included angle), or ASA (two angles and the included side). It returns all six elements of the triangle (three sides and three angles), the area, and the perimeter, with every result derived from first principles using the Law of Sines and the Law of Cosines rather than any approximation. Every triangle has exactly six elements: three side lengths conventionally labelled a, b, and c, and three interior angles labelled A, B, and C, where each angle sits opposite the side of the same letter. Euclidean geometry tells us that any three of those six measurements — provided the three are chosen sensibly — uniquely determine the triangle, a result Euclid recorded in Book I of the Elements as the three congruence theorems still taught in every geometry class today.

SSS (Proposition 8) says three sides fix the triangle. SAS (Proposition 4) says two sides and the angle they enclose fix it. ASA (Proposition 26) says two angles and the side between them fix it. AAS is just ASA with the angle-sum identity applied first, so it collapses to the same solver. Only one classical case, SSA — two sides and a non-included angle — is genuinely ambiguous: depending on the numbers, an SSA input can correspond to zero, one, or two distinct triangles. That is why this calculator deliberately exposes the three unambiguous modes and folds SAS and ASA into the same engine that handles SSS, letting you compare results across modes whenever you have redundant data.

Behind every output is a chain of three classical identities — the angle-sum rule A + B + C = 180°, the Law of Sines a/sin A = b/sin B = c/sin C = 2R (where R is the circumradius), and the Law of Cosines c² = a² + b² − 2ab·cos C — together with one elegant area formula attributed to Hero of Alexandria around 60 CE, K = √(s(s − a)(s − b)(s − c)), where s is the semiperimeter (a + b + c)/2. Whether you arrived here to finish a surveying problem, decode a structural-engineering load triangle, plan a sail-cut, double-check a homework answer, or simply remember the trig you last met in tenth grade, this page walks through every mode the calculator supports, the geometry that justifies it, the ambiguous-case trap that SSA inputs hide, and a fully worked 3-4-5 example you can verify by hand in under a minute.

What is triangle solver calculator?

A triangle is the simplest closed polygon — three vertices, three sides, three angles — and it is the foundational shape of all Euclidean geometry because every other polygon can be triangulated into a finite set of triangles whose properties together determine the whole. Three relationships govern every triangle in the plane. First, the angle-sum identity: A + B + C = π radians, or equivalently 180°. This was proved by Euclid in Book I, Proposition 32 of the Elements and follows immediately from the parallel postulate. Second, the Law of Sines: a / sin A = b / sin B = c / sin C = 2R, where R is the radius of the triangle's circumscribed circle. The ratio is the same for all three side-angle pairs, which is why the Law of Sines is the natural tool whenever you know an angle and its opposite side and want to find another side or another angle. Third, the Law of Cosines: c² = a² + b² − 2ab·cos C, which generalises the Pythagorean theorem to non-right triangles — when C = 90°, cos C = 0 and the formula reduces to c² = a² + b². The Law of Cosines is the natural tool whenever you know all three sides (SSS) and want an angle, or whenever you know two sides and the included angle (SAS) and want the third side. Area can be computed two equivalent ways: directly from two sides and their included angle, K = (1/2)·a·b·sin C, or purely from the three sides via Heron's formula, K = √(s(s − a)(s − b)(s − c)) where s = (a + b + c)/2. Heron's formula, recorded in his Metrica around 60 CE, is remarkable because it lets you compute area without ever explicitly finding an angle or a height — a fact medieval surveyors used routinely. Together these four identities are everything you need to solve any triangle in any mode; the calculator just packages them behind a single interface.

How to use this calculator.

  1. Pick the mode that matches the data you actually have. SSS if you know all three side lengths. SAS if you know two side lengths plus the angle wedged between them (the included angle, at vertex C in this calculator's convention). ASA if you know two angles plus the side that connects them (the included side, opposite vertex C). If you have AAS — two angles and a non-included side — subtract from 180° to get the third angle, then enter it as ASA.
  2. Enter the three values your chosen mode requires. In SSS, fill in side a, side b, and side c. In SAS, fill in side a, side b, and angle C. In ASA, fill in angle A, angle B, and side c. Leave the unused fields at their default of 0 — the engine ignores them based on the selected mode.
  3. Make sure every side is strictly positive and every angle is strictly between 0° and 180°. In ASA mode the two entered angles must additionally sum to less than 180°, because the third angle is computed as 180° − A − B and must itself be positive.
  4. In SSS mode, check the triangle inequality before trusting the result: every side must be strictly less than the sum of the other two. If you typed 1, 2, 10 the calculator will refuse the geometry — no triangle exists with those side lengths because the longest side exceeds the other two combined.
  5. Read the primary output (area) and the full breakdown of all three sides and all three angles. Use the area for surface-area, material-cost, or coverage problems, and use the perimeter for fencing, framing, or boundary-length problems.
  6. If you have SSA data (two sides and a non-included angle), the problem is genuinely ambiguous — depending on the numbers, zero, one, or two distinct triangles satisfy your inputs. Use a dedicated SSA solver or split the case manually; the SSS/SAS/ASA modes here only return unique triangles by design.

The formula.

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

Three identities do all the work. The Law of Cosines, c² = a² + b² − 2ab·cos C, is the workhorse of SSS and SAS. Derive it by placing vertex C at the origin and aligning side b along the positive x-axis: vertex A sits at (b, 0) and vertex B sits at (a·cos C, a·sin C). The distance between A and B is c, so by the standard distance formula c² = (b − a·cos C)² + (a·sin C)² = b² − 2ab·cos C + a²·cos²C + a²·sin²C = a² + b² − 2ab·cos C, using sin² + cos² = 1. In SSS mode the calculator rearranges that to cos A = (b² + c² − a²) / (2bc) and cos B = (a² + c² − b²) / (2ac), then computes angle C as 180° − A − B. In SAS mode it uses the identity in its original direction to find c, then applies the Law of Sines to recover angle A. The Law of Sines, a/sin A = b/sin B = c/sin C, is the workhorse of ASA. Derive it by dropping a perpendicular h from vertex C onto side c: from the two right triangles created, h = b·sin A and h = a·sin B, so a/sin A = b/sin B; symmetry gives the third ratio. In ASA mode the calculator computes the third angle C = 180° − A − B, then uses a = c·sin A / sin C and b = c·sin B / sin C to recover both unknown sides in a single pair of multiplications. The right tool follows from the data. Use the Law of Cosines whenever you have a complete side-angle-side relationship around one vertex — all three sides (SSS), or two sides and the angle between them (SAS) — because the law involves exactly those four quantities. Use the Law of Sines whenever you have a matched angle-and-opposite-side pair (ASA after computing the third angle, or AAS), because the law's ratios link each angle directly to its opposite side. Area is computed via K = (1/2)·a·b·sin C in every mode (once a, b, and C are known), and the perimeter is simply a + b + c. The calculator also validates geometry: SSS rejects triples violating the triangle inequality (a ≥ b + c, etc.), SAS rejects angles outside (0°, 180°), and ASA rejects angle pairs whose sum is ≥ 180°.

A worked example.

Example

The 3-4-5 right triangle — the simplest Pythagorean triple, and the one the calculator's SSS mode ships with as a default. Entering a = 3, b = 4, c = 5 returns area = 6, perimeter = 12, angle A ≈ 36.87°, angle B ≈ 53.13°, and angle C = 90°. The arithmetic, step by step. By the Law of Cosines, cos A = (b² + c² − a²) / (2bc) = (16 + 25 − 9) / (2 · 4 · 5) = 32 / 40 = 0.8, so angle A = arccos(0.8) ≈ 36.8699°. Similarly cos B = (a² + c² − b²) / (2ac) = (9 + 25 − 16) / (2 · 3 · 5) = 18 / 30 = 0.6, so angle B = arccos(0.6) ≈ 53.1301°. The angle sum then forces angle C = 180° − 36.8699° − 53.1301° = 90°, confirming what the Pythagorean theorem already told us (3² + 4² = 9 + 16 = 25 = 5²). Area can be computed three ways and they must agree: (1) directly from two legs of the right angle, (1/2) · 3 · 4 = 6; (2) from (1/2)·a·b·sin C = (1/2)·3·4·sin 90° = 6·1 = 6; (3) via Heron, with s = (3+4+5)/2 = 6, area = √(6·3·2·1) = √36 = 6. All three give 6 square units exactly. The perimeter is simply 3 + 4 + 5 = 12 units. Switching to SAS with a = 3, b = 4, angle C = 90° reproduces the same triangle (c = √(9 + 16 − 0) = 5, area = 6). Switching to ASA with angle A = 36.87°, angle B = 53.13°, side c = 5 reproduces it again (a ≈ 3, b ≈ 4). The cross-mode consistency check is how the engine validates itself.

modesss
side C5
side B4
side A3

Frequently asked questions.

Why doesn't this calculator have an SSA mode?
Because SSA — two sides and a non-included angle — is the one classical input pattern that does not uniquely determine a triangle. Given side a, side b, and angle A (the angle opposite a, not between a and b), there can be zero, one, or two distinct triangles satisfying the inputs depending on how a, b, and sin A compare. This is the famous "ambiguous case" of the Law of Sines. If a < b·sin A, no triangle exists. If a = b·sin A, exactly one right triangle exists. If b·sin A < a < b, two distinct triangles exist (one acute and one obtuse at vertex B). If a ≥ b, exactly one triangle exists. To avoid silently returning the wrong triangle, Quanta restricts the solver to SSS, SAS, and ASA — the three modes Euclid proved are genuinely congruence-determining. If you have AAS data, compute the third angle as 180° minus the other two and switch to ASA. If you have true SSA data, you need to enumerate both possible solutions by hand and pick the one your problem context demands.
Why do the angles of every triangle sum to 180°?
This is Euclid's Proposition 32 from Book I of the Elements, and the proof depends on the parallel postulate. Take any triangle ABC, then draw a line through C that is parallel to side AB. The two angles that line makes with sides CA and CB are equal to angles A and B respectively (alternate interior angles with the parallel line), and together with angle C they form a straight line, which has 180°. Therefore A + B + C = 180°. The result holds only in flat (Euclidean) geometry. On the surface of a sphere — where great-circle triangles satisfy A + B + C > 180° — and on a saddle-shaped (hyperbolic) surface, where A + B + C < 180°, the sum is different, and that deviation is exactly what defines the curvature of the space. For any triangle drawn on a piece of paper, however, the sum is exactly 180° and the calculator relies on that identity to compute the third angle in SSS and ASA modes.
Heron's formula versus (1/2) · base · height — which should I use?
Either is correct; pick whichever matches the data you have. (1/2) · base · height is the most familiar formula and is the right tool when you actually know a side and the perpendicular height dropped to it. (1/2) · a · b · sin C is the same formula in disguise — once you know two sides and the angle between them, b · sin C is precisely the height dropped from vertex B to side a — and it is the formula the calculator uses internally because the SAS and ASA modes give you a, b, and C directly. Heron's formula, K = √(s(s − a)(s − b)(s − c)) with s = (a + b + c)/2, is the right tool when you know all three sides but no angle, because it lets you compute area without ever solving for an angle first. All three formulas give the same answer for any valid triangle; Heron's just trades a trigonometric function for a square root.
Should I enter angles in degrees or radians?
This calculator uses degrees throughout. The defaults assume a typical school, surveying, or engineering workflow where angles are written and measured in degrees and decimals (or degrees-minutes-seconds, which you should convert to decimal degrees first — 30° 15' 36" = 30 + 15/60 + 36/3600 = 30.26°). Internally the engine converts each input to radians before calling Math.sin, Math.cos, and Math.acos (which JavaScript expects in radians), then converts the results back to degrees so the displayed angles are easy to read. If your source data is in radians, multiply by 180/π ≈ 57.2958 first. If you need outputs in radians, multiply the displayed degree values by π/180. The conversion is exact and introduces no rounding beyond the display precision.
When should I use the Law of Sines versus the Law of Cosines?
Choose by counting what you know about a single vertex. The Law of Cosines, c² = a² + b² − 2ab·cos C, links three sides and one angle — specifically the angle opposite the side on the left and the two sides forming that angle. It is the right tool in SSS (you know three sides, want any angle) and in SAS (you know two sides and the included angle, want the third side). The Law of Sines, a/sin A = b/sin B = c/sin C, links each side to the angle directly opposite it. It is the right tool whenever you have a matched angle-and-opposite-side pair — typically in ASA after computing the third angle from the angle-sum identity, or in AAS. A practical heuristic: if your unknowns and knowns surround a single vertex, reach for the Law of Cosines. If they pair up across the triangle (one angle, one opposite side, another angle, another opposite side), reach for the Law of Sines.
What's the difference between SAS and SSA?
Word order matters and signals where the angle sits. SAS — Side, Angle, Side — means the angle you know is wedged between the two sides you know (the "included" angle). With SAS, the triangle is uniquely determined: by the Law of Cosines the third side has exactly one value, and once that side is known the remaining two angles follow immediately from the Law of Sines and the angle-sum identity. SSA — Side, Side, Angle — means the angle you know is opposite one of the sides you know, not between them. SSA is the ambiguous case: depending on how the side opposite the known angle compares to the other known side times the sine of the known angle, you may have zero, one, or two distinct triangles. That is why Quanta exposes SAS as a mode but not SSA; if your data is SSA, you need to handle the ambiguity explicitly.
Does this calculator work for right triangles?
Yes. A right triangle is just a triangle with one 90° angle, and all the general identities apply. In SSS mode, feeding in any Pythagorean triple — 3-4-5, 5-12-13, 8-15-17, 7-24-25 — will return one angle equal to 90° exactly. In SAS mode, setting angle C = 90° reduces the Law of Cosines to c² = a² + b² (because cos 90° = 0), reproducing the Pythagorean theorem. In ASA mode, choosing two angles that sum to 90° will yield a third angle of 90°. If you only ever need to solve right triangles, the Pythagorean theorem calculator on Quanta is faster because it asks for only two inputs instead of three, but the triangle solver here will give you the same answers plus all six elements.
What is the triangle inequality and why does the calculator enforce it?
The triangle inequality says that for any triangle, each side must be strictly less than the sum of the other two: a < b + c, b < a + c, and c < a + b. Geometrically this is obvious — the shortest path between two points is a straight line, so going from vertex A to vertex C directly (along side b) must be shorter than going from A to B and then B to C (along sides c and a combined). Any triple of positive numbers that fails this test — for example 1, 2, 10 — cannot be the side lengths of a real triangle in the plane. The calculator's SSS mode validates the inequality before doing any trigonometry and rejects degenerate inputs with a clear error so you don't get a meaningless arccos of a number outside [-1, 1] further down the chain.
How accurate are the angle outputs?
Within standard double-precision floating-point error — roughly 15 significant decimal digits. The calculator uses JavaScript's Math.acos and Math.asin, both of which are accurate to about one unit in the last place. The largest practical error source is not the arithmetic but the rounding of the final answer for display; a triangle with sides 3, 4, 5 will display angles like 36.87° and 53.13° rather than the full 36.8699°… and 53.1301°…, but the internal value carries every digit forward into the subsequent steps (area, perimeter, angle sum) so cumulative error stays negligible. For surveying-grade precision (better than 1 arcsecond, i.e. 1/3600 of a degree), the calculator is more than adequate.
What if my triangle is on a sphere or on a curved surface?
Then this calculator is the wrong tool. Quanta's triangle solver assumes flat (Euclidean) geometry — the same geometry you'd draw on a piece of paper, where the angles sum to 180° and the Pythagorean theorem holds exactly. On the surface of a sphere (relevant for navigation, geodesy, astronomy), triangle angles sum to more than 180°, and you need spherical trigonometry: the Law of Cosines becomes cos c = cos a · cos b + sin a · sin b · cos C (with sides measured as arc-lengths, i.e. central angles). On a hyperbolic surface (relevant for some areas of theoretical physics and certain network embeddings), the angles sum to less than 180°. For shipping routes, GPS computations, and great-circle distances, use a dedicated spherical-distance calculator; for engineering, construction, and almost every classroom problem, plane geometry — and this calculator — is exactly right.

References& sources.

  1. [1]Euclid, Elements, Book I, Proposition 1 — the construction of an equilateral triangle on a given finite straight line, the founding theorem of plane geometry (Heath translation, Cambridge University Press, 1908).
  2. [2]Euclid, Elements, Book I, Proposition 4 — the SAS (side-angle-side) congruence theorem: if two triangles share two sides and the included angle, they are congruent.
  3. [3]Euclid, Elements, Book I, Proposition 32 — the angle-sum theorem: the interior angles of any triangle sum to two right angles (180°).
  4. [4]Euclid, Elements, Book I, Proposition 47 — the Pythagorean theorem, the special case of the Law of Cosines when the included angle is 90°.
  5. [5]Berggren, J. L. Episodes in the Mathematics of Medieval Islam, 2nd edition. Springer, 2016 — covers al-Khwarizmi (~825 CE) and the medieval Arabic mathematicians who systematised the Law of Sines and Law of Cosines and transmitted them to medieval Europe.
  6. [6]NIST Digital Library of Mathematical Functions, §4 — Elementary Functions (Trigonometric). Reference identities including angle-sum, Law of Sines, Law of Cosines, and Heron's formula.
  7. [7]Coxeter, H. S. M. Introduction to Geometry, 2nd edition. Wiley, 1969 — classic reference textbook covering the congruence theorems (SSS, SAS, ASA), the Law of Sines, the Law of Cosines, Heron's formula, and the ambiguous SSA case.
  8. [8]Weisstein, Eric W. "Triangle." MathWorld — Wolfram Research. Comprehensive reference for triangle identities, including side-angle formulas, area formulas, and the relationship between the circumradius R and the Law of Sines (a/sin A = 2R).

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon