gizmobench
BrowseDaily

Triangle Calculator

Six boxes sit under the stage: the sides a, b and c, and the angles A, B and C opposite them. Fill any three and the tool reads which case you gave it, three sides, two sides and the angle between them, two angles and a side, or two sides and an angle outside them, then solves that case and says which law it used. The side-side-angle case is the reason this page is worth a visit: for a whole range of inputs two different triangles fit the same three numbers, and both are solved and drawn rather than one being quietly picked for you. Every angle is exact where the arithmetic is exact, so a 3, 4, 5 triangle reports a right angle of 90 degrees and an area of exactly 6, and three lengths that cannot close are refused with the reason instead of an answer. Under each answer sit the height to every side and the triangle's type, acute, right or obtuse and scalene, isosceles or equilateral. Two angles on their own already fix the third, so the tool reports it at once and waits for one side to give the lengths. Angles read in degrees or radians, the figure redraws to scale as you type, and nothing is uploaded.

789ABC
Solvedone triangle
SSSa 7 b 8 c 9Degrees
a 7   b 8   c 9
A 48.1897°   B 58.4119°   C 73.3985°
area 26.8328     perimeter 24
height to a 7.66652   to b 6.7082   to c 5.96285
acute, scalene

law of cosines for each angle, Heron's formula for the area
a
b
c
A (°)
B (°)
C (°)
Angles in
A
48.1897°
B
58.4119°
C
73.3985°
Area
26.8328

Three sides: a, b and c. Each angle comes from the law of cosines, and the area from Heron's formula. Any two sides have to add to more than the third or the triangle never closes.

SSS: one triangle fits.

  • SSS 7, 8, 9three sides
    one triangle, area 26.8328
  • SSA ambiguousa 7, b 9, A 40°
    two triangles, both shown: B 55.7349° or 124.2651°
  • Impossible sides1, 2, 9
    refused: These three lengths cannot meet: 1 and 2 together are shorter than 9
How the five cases work. Fill any three of the six boxes and the tool reads which case you gave it. Three sides go to the law of cosines for every angle and Heron’s formula for the area. Two sides with the angle between them get the third side from the law of cosines first. Two angles and any side get the third angle from the 180 degree sum and the missing sides from the law of sines. Two sides with an angle that is not between them are the ambiguous case: when the side opposite the given angle is shorter than the other side but longer than the height, two different triangles fit, and you get both. Three angles are refused, because they set the shape and not the size. Exact trigonometry by the law of cosines and the law of sines, with rounding clamped so a right angle does not come back as 89.999 degrees. The ambiguous side-side-angle case returns both valid triangles rather than picking one.

Common questions

Which three values do I need to solve a triangle?
Any three except three angles. Three sides (SSS) go to the law of cosines. Two sides with the angle between them (SAS) get the third side from the law of cosines first. Two angles with the side between them (ASA), or two angles and a side not between them (AAS), take the third angle from the 180 degree sum and the two missing sides from the law of sines. Two sides with an angle that is not between them (SSA) are the ambiguous case below. SOH CAH TOA needs a right angle; the law of sines and the law of cosines are what solve a triangle without one, and the result names which law it used. Three angles are refused, and the tool says why: they set the shape of the triangle but not its size, so every triangle with those angles would be a correct answer. Fill a fourth box and it asks you to clear one rather than quietly ignoring it, because four values can disagree with each other.
Why does side-side-angle sometimes give two triangles?
Because two triangles really do fit. Take a = 8, b = 10 and A = 30 degrees. The height from the far corner down to the base is b times the sine of A, which is 5, and side a at 8 is longer than that height but shorter than b, so it can swing down to meet the base in two different places. One triangle has B at 38.6822 degrees, the other has B at 141.3178 degrees, the supplement of the first, and both satisfy the law of sines. This tool solves both, draws both and labels them first and second. If a is shorter than the height no triangle closes at all, and if a is at least as long as b only one does; the tool says which of those three you are in.
Can it solve a right triangle as well?
Yes, a right angle is simply one of the answers rather than an assumption. Type 3, 4 and 5 as the three sides and angle C comes back as 90 degrees exactly, not 89.99999, with an area of exactly 6 and a square drawn in the right-angled corner. That exactness is deliberate: the cosine ratios are clamped into the range they belong in, the common angles are held as exact values, and an angle that agrees with a whole number to thirteen significant digits is settled onto it. If you know only two values of a right triangle, the right triangle calculator is the page for that, since it can assume the 90 degree corner and this one cannot.
What happens when three numbers do not make a triangle?
You get a sentence naming the problem, not a result. Sides 1, 2 and 4 are refused by the triangle inequality theorem, which says any two sides must add to more than the third: 1 and 2 together are shorter than 4, so the short sides never reach across the long one. Sides 1, 2 and 3 are refused differently: they add up exactly, so the corners fall on one straight line and there is no height. Two angles that already total 180 degrees leave nothing for the third. An angle of 180 degrees or more, a side of zero and a negative length each get their own message. Lengths so large or so small that the area overflows or underflows double precision are refused too, with a message saying to scale all three by the same number, which leaves the angles unchanged.
How do I find a missing angle or side, or the x in a triangle problem?
Leave the unknown box empty and fill three values you know; the empty boxes are what the tool works out. If you only know two angles, type those two and the third comes back straight away as what is left of 180 degrees: 50 and 60 leave 70. That is all two angles can give, since every size of triangle has those angles, so the readout says to add one side for the lengths and the area. When x is a plain side length or angle, its box holds the answer. When x sits inside an expression such as 2x + 10, this page does not solve the algebra: it gives the angle or side, and you set your expression equal to that number.
Does it give the height and say what kind of triangle it is?
Yes. Under each answer is the height to every side, the perpendicular distance from that side to the corner opposite, worked out as twice the area divided by the side. Sides 3, 4 and 5 have heights 4, 3 and 2.4. In an obtuse triangle the height to a short side lands outside the triangle, on that side extended, and the same formula still holds. The last line names the type twice over: acute, right angled or obtuse by the largest angle, and scalene, isosceles or equilateral by comparing the sides, so 5, 5 and 8 reads obtuse, isosceles.
Can it solve an isosceles or equilateral triangle?
Yes, by typing the equal parts into two boxes. For an isosceles triangle put the two equal sides in a and b, then either the base in c or the angle between them in C: 5, 5 and 8 gives base angles of 36.8699 degrees, an apex of 106.2602 degrees and a height to the base of 3. Knowing the base and one base angle works too: give that angle to both A and B and the base to c. For an equilateral triangle the equilateral page opens with both angles already at 60, so changing the one side gives the height, area and perimeter.
Can I work in radians instead of degrees?
Yes, and switching does not change your triangle. The Angles in control flips between degrees and radians, and the numbers already in the angle boxes are rewritten as it goes, so 90 becomes 1.57079632679. Switch back and the box reads 90 again, not 89.9999999997: each box keeps the text it held in the other unit and gets that text back untouched, unless you changed the number in between, in which case it is converted like any other. Angles then come back in the unit you chose, a right angle reading 1.5708 radians, and the three angles of a triangle add to pi radians instead of 180 degrees. The label on every angle box changes with the unit, so a box asking for radians is never read as degrees.
Is anything uploaded, and are my numbers kept?
Nothing is uploaded. The trigonometry runs in your browser and the page makes no request while you type, so your measurements are not sent anywhere or counted by anything. The six boxes and the angle unit are remembered in this browser alone so the page opens where you left it, and clearing your site data or pressing Start over forgets them. The figures on the stage are rounded for reading, six significant figures for a length, an area or an angle in radians, and four decimal places for an angle in degrees, and the Copy button hands you those same figures; the arithmetic behind them is full double precision.

Exact trigonometry by the law of cosines and the law of sines, with rounding clamped so a right angle does not come back as 89.999 degrees. The ambiguous side-side-angle case returns both valid triangles rather than picking one.