Triangle Calculator
Solve any triangle from three known values — SSS, SAS, ASA, AAS and the ambiguous SSA case — with area, perimeter, circumradius and inradius. SSA shows both possible triangles, not just one.
About this tool
Solving a triangle means finding every side and every angle from just three known values. There are five standard combinations — SSS, SAS, ASA, AAS and SSA — and this tool handles all of them, together with the extras that matter in practice: area, perimeter, circumradius and inradius.
Four of the five cases always give exactly one triangle. SSA is the exception: knowing two sides and an angle that is not between them can give two different triangles, one, or none. Most calculators quietly return the first one. This tool shows both whenever two exist, so you can see the whole picture.
Angles are entered and shown in degrees. Every number is computed locally in your browser — nothing is sent anywhere.
Why sides that add up exactly are not a triangle
The triangle inequality is applied strictly: every pair of sides must sum to more than the third, never to exactly the third. Three, four and seven lie on a straight line, enclose no area, and are rejected rather than solved into a degenerate shape.
Equality is the degenerate case. When two sides add up to exactly the third, the three points are collinear, the angle between them is 180 degrees, and the shape encloses nothing. It is a line segment with a third point sitting on it, not a triangle.
The same strictness applies to angles, which have to lie strictly between 0 and 180 degrees. Zero would collapse the shape, and 180 would mean the other two sides never meet — neither of those is a triangle either.
Inputs that break the rule are reported as errors rather than solved into a shape of zero area, because a triangle with no area is not a smaller answer to the same question; it is a different kind of object.
Why angles and lengths are rounded to different precision
Angles come back to four decimal places and lengths to six. Both are chosen so that the two answers of an ambiguous SSA case stay visibly apart, while an exact result such as the 3-4-5 triangle still lands on whole numbers.
Every intermediate step runs at full floating-point precision and rounding happens once, at the end. Rounding along the way would let error accumulate and would break a property worth keeping: the same triangle entered two different ways must return the same area, and it does.
Four decimals of a degree resolves differences far finer than anything drawn on paper, and is still more than enough to show where the two SSA solutions part company. Six decimals of a length is what lets 3, 4 and 5 come back as 3, 4 and 5 rather than as 4.999999.
Across all five modes the area is derived from the three sides by Heron's formula rather than from an angle and two sides. One route to one answer, so an SSS entry and an SAS entry describing the same triangle cannot disagree about how big it is.
What happens when SSA has exactly one solution
SSA gives two solutions only while both candidate angles leave a positive third angle. When b times sinA equals a exactly, the angle is a right angle, the two candidates coincide, and one solution is reported rather than a duplicate pair.
The number of solutions hangs on comparing b times sinA with a. A larger value means the side cannot reach, so there is no triangle at all; a smaller one leaves two candidates to check; an exact match is the single right-angle case.
Each candidate is kept only if the angle left over for C is genuinely positive. A candidate that would leave zero or a negative number of degrees describes a shape that has already closed up, so it is discarded rather than reported.
That boundary needs a tolerance. A value that is mathematically exactly one can arrive slightly above it from the sines and arcsines of ordinary numbers, which would drop a legitimate right-angled triangle. A difference of a billionth of a degree is treated as zero, and that is far below any angle anyone could draw.
Five entry paths, one area formula at the end
The 3-4-5 triangle entered through SSS, SAS, ASA and AAS all comes out at an area of 6. The modes differ only in the laws used to find sides and angles, and every one of them hands the result to the same Heron formula rather than each carrying its own 0.5·b·c·sinA.
The laws really do differ: SSS uses the cosine rule to recover three angles, SAS uses c² = a² + b² − 2ab·cosC, ASA and AAS use the sine rule. But once three sides are known there is only one route to the area, and it is Heron.
The benefit is that one triangle cannot produce two areas. If each mode carried its own area formula, floating point error would split them in the last digits and users would start asking which one is right. With a single route, any difference can only come from input precision.
SSA genuinely can have two solutions: with sides 3 and 4 and an angle of 36.87°, the two triangles have areas of 6 and 1.68. That is not an error but the ambiguous case, two sides and a non-included angle, and the page lists both.
Precision is split by quantity: angles to four decimals, lengths to six. Angles pass through inverse trigonometry, which magnifies error more than lengths do. All intermediate values stay unrounded, with truncation only at the output.
Frequently asked questions
What is the ambiguous case in SSA?
When you know two sides a and b and an angle A that is not the angle between them, the law of sines can give two values for angle B: one acute, one obtuse. Both may form a valid triangle, so the problem can have two solutions instead of one. This tool lists both, and explains the zero-solution and one-solution outcomes as well.
When does SSA have no solution?
When b times sinA is greater than a, the opposite side a is too short to reach the other side, so no triangle exists. The tool reports zero solutions with an explanation rather than an error.
How is the area computed?
Area comes from Heron's formula, which uses the three side lengths only. That keeps a single route to the answer for every mode, so an SSS entry and an SAS entry for the same triangle return exactly the same area.
What are the circumradius and inradius?
The circumradius is the radius of the circle passing through all three vertices. The inradius is the radius of the circle touching all three sides. Both are handy for construction, packing and drafting problems.
Which angle is opposite which side?
By the convention used here, side a is opposite angle A, side b opposite B, and side c opposite C. Keeping this order right is the main thing to watch when you enter values.
Related tools
Multiply, transpose, invert and find the determinant of matrices. Partial pivoting keeps results stable, and a singular matrix reports no inverse instead of a screen of NaN.
Work out how much concrete a slab, round column or hollow pier needs. Volume in cubic yards or meters, bag counts for common mix sizes, and weight.
Distance between two points on the globe from latitude and longitude — decimal or DMS — in km, miles and nautical miles, plus initial and final bearing. Nothing leaves your browser.