Skip to main content
CalcMax

Triangle Calculator

Range: 0 cm – 1,000,000,000 cm

Range: 0 cm – 1,000,000,000 cm

Range: 0 ° – 180 °

Result

5.0000 cmRight

Side c

Angle A
36.87 °
Angle B
53.13 °
Area
6.0000 cm²
Perimeter
12.0000 cm

A triangle calculator takes two sides and the angle between them and works out the whole triangle: the third side, both of the other angles, the area and the perimeter. Those three numbers — two sides and the angle they enclose — are enough to pin a triangle down completely, and the fact is worth stating plainly because it is not obvious: two sides on their own leave the shape free to swing open like a pair of dividers, and the angle is what closes it. The route from there is the law of cosines, which gives the third side directly, and then the law of sines, or the cosine rule a second time, for the two angles left over. Two sides of 3 and 4 with a right angle between them give a third side of 5, angles of 36.87 and 53.13, an area of 6 square centimetres and a perimeter of 12. Change the enclosed angle and everything changes with it, except the two sides you started with: the same 3 and 4 at 60 degrees give a third side of 3.6056 and an area of 5.1962, and at 120 degrees a third side of 6.0828 — a longer side, because the cosine of 120 degrees is negative and the correction term adds to the sum instead of subtracting from it. What the two angles do share is the area: sin 60 and sin 120 are both 0.866, so both triangles enclose exactly 5.1962 square centimetres even though their third sides differ. What the page adds to the arithmetic is a name for the result. The largest of the three angles decides what kind of triangle it is: below 90 degrees the triangle is acute, at exactly 90 degrees it is right, and above 90 it is obtuse. That is the classification printed under the answers, and it is the question the other pages in this subcategory do not answer — three sides or a base and a height tell you a triangle's size, and this page tells you its shape as well. The rule is easy to check against the sides once you have them: the largest angle sits opposite the longest side, so a triangle is right exactly when the two shorter sides squared add up to the longest side squared, and whether that sum is above or below is what separates an acute triangle from an obtuse one. A triangle with sides of 5, 5 and 5 is acute because all three angles are 60; one with sides of 10, 10 and 17.3205 has an angle of 120 and is obtuse; and one with sides of 5, 5 and 7.0711 has a right angle between the two equal sides. The angle box on this page accepts degrees, radians and gradians, and the two angles it prints are always in degrees whatever unit you entered — a triangle is the same shape either way, and printing the answer in the unit you did not type would only make it harder to compare with a drawing. If you have three sides rather than two, use Heron's formula calculator, which takes them directly; if you have a base and a perpendicular height, the triangle area calculator is the shorter route to the same area; and if the angle you know is a right angle, the Pythagorean theorem calculator is the page built for that case.

The three kinds of triangle this page reports

TriangleWhenWhat it means
AcuteAll three angles below 90°Every corner is sharp. The longest side is opposite the widest angle, and squaring the two shorter sides gives a sum larger than the square of the longest — the triangle is short and wide for its sides.
RightOne angle exactly 90°One corner is square, and the two sides meeting there are perpendicular. The two shorter sides squared add up to exactly the square of the longest, which is the Pythagorean theorem, and the law of cosines loses its correction term.
ObtuseOne angle above 90°One corner is wider than a square, and the side opposite it is longer than either of the other two. The correction term in the law of cosines is negative, so it adds to the sum rather than subtracting, and the area for a given pair of sides is smaller than a right angle would give.

The classification printed under every answer on this page, and the reason there are three grades rather than a single number. The test is always the largest of the three angles, and because the largest angle sits opposite the longest side, the same test can be run on the sides: add the squares of the two shorter sides and compare with the square of the longest. Equal means the right row, larger means the acute row, smaller means the obtuse row. The right row is the one worth knowing by heart, since it is the Pythagorean theorem, and a 3-4-5 triangle is the standard way to check a corner on site.

Triangles by two sides and the angle between them

Side a (cm)Side b (cm)Angle C (°)Side c (cm)Angle A (°)Angle B (°)Area (cm²)
3490536.8753.136
55605606010.8253
512901322.6267.3830
68901036.8753.1324
78607.549853.4166.5924.2487
101012017.3205303043.3013
55907.0711454512.5
44302.070675754

Eight triangles, and the columns to read together are the angle and the third side. The first, third and fourth rows are right triangles, which is why their third sides come out whole — 5, 13 and 10 — and why the two angles beside them are the familiar pairs 36.87 and 53.13, and 22.62 and 67.38. The second row is the one angle that forces the third side: two equal sides at 60 degrees give an equilateral triangle, so the third side matches the two you gave and all three angles are 60. The eighth row is the same pair of equal sides at a much narrower angle — 4 and 4 at 30 degrees — where the third side drops to 2.0706 and the two remaining angles open out to 75 each. The sixth row is the obtuse case: two sides of 10 at 120 degrees, where the third side of 17.3205 is longer than either given side — the signature of an angle above 90 degrees — and where the area of 43.3013 is smaller than the 50 the same two sides enclose at a right angle. The seventh row is a right angle between two equal sides, the isosceles right triangle whose third side is 5 times the square root of two. Every cell is recomputed from its row when the page is built, in centimetres, degrees and square centimetres.

Formula

c = √(a² + b² − 2ab × cos C) A = ½ × a × b × sin C A + B + C = 180°

a, b
The two sides you know, in centimetres. They are interchangeable — the page does not care which you call a and which b, and swapping them only swaps the two angles it prints. Both must be greater than zero, since a side of zero would leave no triangle at all
C
The angle between the two known sides, in degrees, radians or gradians. It is called the included angle because it is enclosed by the two sides you gave, and it is the one angle the page lets you specify. It may be anything from 0 to 180 degrees; at exactly 0 or 180 the triangle flattens into a line and the page still answers, with one angle of 0 and another of 180
c
The third side, in centimetres, opposite the angle C. It comes from the law of cosines, which is the Pythagorean theorem with a correction term for triangles that are not right-angled: when C is 90 degrees the cosine is 0 and the term drops out, leaving a² + b² = c². It is the primary answer on the page because every other reading depends on it
A, B
The two angles you did not give, in degrees. Each comes from the law of cosines applied again to the fully known triangle, with the third side taken before it is rounded, and the two of them then add up to 180 with C up to the last decimal place. A triangle that is very nearly right-angled can still come out at exactly 90 once the angles are rounded to two decimals and be reported as a right triangle — the classification is made from the numbers the page prints, not from the numbers behind them
½ × a × b × sin C
The area in square centimetres: half the product of the two known sides times the sine of the angle between them. It is the area formula reduced to the case where the angle is known, since the height you would otherwise need is b × sin C — which is why the same 3 and 4 give an area of 6 at a right angle and only 5.1962 at 60 degrees, with the sides unchanged
A + B + C = 180°
The angle sum, which is what makes the classification possible: with all three angles known, the largest one decides whether the triangle is acute, right or obtuse, and the largest angle is always opposite the longest side. The classification reads the two angles the page prints and takes the third as 180 minus those two, so the badge is judging the numbers on the screen — rounding included — and cannot disagree with them over a rounding artefact

Use this page when two sides and the angle between them are what you have, which is the common case for anything measured or specified in place: two edges of a plot with the corner between them, two struts meeting at a known angle, a roof rafter described by a run and a pitch, a triangle of fabric cut from a corner. It is also the right page when the question is about the triangle's shape rather than its size — whether a corner is square, whether a triangle is acute, whether a set of three sides can form an obtuse triangle at all. Because the page prints the type, it answers the check a carpenter makes with a 3-4-5 triangle: enter sides of 3 and 4 with an angle of 90 and the answer comes back right; enter the same sides with an angle of 92 and it comes back obtuse, with the third side already too long for a right angle. Use the Heron's formula calculator when you have three sides and no angle, which is the other way round. Use the triangle area calculator when you have a base and a perpendicular height, since that page needs no trigonometry. Use the Pythagorean theorem calculator when the angle is known to be a right angle and you want the plain a² + b² = c² route, or when you have a right triangle and one side and the hypotenuse. And use the equilateral or isosceles triangle pages when the triangle has a special symmetry, since those pages take fewer numbers and give the angles without asking.

Worked examples

  1. Sides of 3 and 4 at a right angle

    1. Cosine of 90° is 0, so the correction term vanishes: c = √(3² + 4²) = √25 = 5
    2. Area: ½ × 3 × 4 × sin 90° = ½ × 12 × 1 = 6
    3. Perimeter: 3 + 4 + 5 = 12
    4. Angle A, opposite the side of 3: cos A = (4² + 5² − 3²) ÷ (2 × 4 × 5) = 32 ÷ 40 = 0.8, so A = 36.87°
    5. Angle B: 180 − 90 − 36.87 = 53.13°
    6. Largest angle is 90°, so the page reports a right triangle

    The 3-4-5 triangle, and the row that makes the classification worth having: the page recognises the right angle and says so rather than leaving you to check. The two angles of 36.87 and 53.13 are the pair that turns up in every 3-4-5 triangle and, at the other end of the same arithmetic, in the rhombus whose diagonals are 6 and 8. It is also the clearest demonstration that the law of cosines contains the Pythagorean theorem: at 90 degrees the correction term is zero and the two formulas are the same sentence.

  2. Sides of 5 and 5 at 60 degrees

    1. Cosine of 60° is 0.5: c = √(25 + 25 − 2 × 5 × 5 × 0.5) = √(50 − 25) = √25 = 5
    2. The third side comes out equal to the two you gave, so all three sides are 5
    3. Area: ½ × 5 × 5 × sin 60° = 12.5 × 0.866025… = 10.8253
    4. Perimeter: 5 + 5 + 5 = 15
    5. Three equal sides leave three equal angles: (180 − 60) ÷ 2 = 60, so the page prints 60 for both remaining angles
    6. Largest angle is 60°, so the page reports an acute triangle

    Two equal sides with an angle of 60 degrees is the one case where the third side is forced to match them, and the triangle comes out equilateral — 60 degrees is the angle at which the base of an isosceles triangle becomes exactly as long as its two equal sides. The equilateral triangle calculator in this subcategory solves the same shape from a single side, since with all three sides equal there is nothing left to say; the interest of doing it here is watching the third side land on 5 rather than being told it does. The area of 10.8253 is the same figure that turns up in the rhombus whose side is 5 and whose angle is 60, which is not a coincidence: that rhombus is two of these triangles, and 2 × 10.8253 would be its 21.6506 square centimetres.

  3. Sides of 7 and 8 at 60 degrees

    1. Cosine of 60° is 0.5: c = √(49 + 64 − 2 × 7 × 8 × 0.5) = √(113 − 56) = √57 = 7.549834… → 7.5498
    2. Area: ½ × 7 × 8 × sin 60° = 28 × 0.866025… = 24.2487
    3. Perimeter: 7 + 8 + 7.5498 = 22.5498
    4. Angle A, opposite the side of 7: cos A = (64 + 57 − 49) ÷ (2 × 8 × 7.5498) = 72 ÷ 120.797 = 0.596, so A = 53.41°
    5. Angle B: 180 − 60 − 53.41 = 66.59°
    6. Largest angle is 66.59°, so the page reports an acute triangle

    The ordinary case, and the one worth reading if you want to see what the page does when nothing is special: two sides of different lengths, an angle of 60 degrees, and three answers that are not round numbers. The third side of 7.5498 is longer than 7 and shorter than 8, which is the only thing you can say about it in advance — the side opposite the 60-degree angle lies between the two sides that enclose it, and the two angles you did not give split the remaining 120 degrees in proportion to the sides opposite them: the shorter side of 7 takes the smaller share, 53.41 against 66.59. The area of 24.2487 is close to but not the same as the 24 square centimetres the trapezoid page reaches from a different set of four sides, and the near miss is a reminder that round numbers come from the inputs, not from the formula.

  4. Sides of 10 and 10 at 120 degrees

    1. Cosine of 120° is −0.5: c = √(100 + 100 − 2 × 10 × 10 × (−0.5)) = √(100 + 100 + 100) = √300 = 17.320508… → 17.3205
    2. Area: ½ × 10 × 10 × sin 120° = 50 × 0.866025… = 43.3013
    3. Perimeter: 10 + 10 + 17.3205 = 37.3205
    4. The two equal sides leave two equal angles: (180 − 120) ÷ 2 = 30 each
    5. Largest angle is 120°, so the page reports an obtuse triangle

    An obtuse triangle, and the case where the correction term in the law of cosines grows instead of shrinking: the cosine of 120 degrees is negative, so subtracting it adds to the sum and the third side comes out longer than either of the sides you gave — 17.3205 against 10. That is the signature of an angle above 90 degrees, and it is exactly what the classification is reading. The area, at 43.3013, is smaller than the 50 square centimetres the same two sides would enclose at a right angle, so widening the angle past 90 buys length on the opposite side at the cost of area — the same trade the rhombus page makes when it is leaned, and the reason the page reports the type rather than leaving you to infer it from the numbers.

Limitations

This page solves one triangle from two sides and the angle between them, and it does not solve any of the other five combinations of three known parts. Give it three sides and it has nothing to work with; the Heron's formula calculator takes those and gives the area, and the angles would have to come from a second step this page does not do. Give it two angles and a side and it will not help either, although internally it computes exactly that. It does not work backwards: there is no route from an area or a perimeter to the triangle that produced it, and a triangle with a given area has infinitely many shapes. The outputs are in centimetres and square centimetres whatever units the inputs were entered in, and the two angles are always printed in degrees even if you typed radians or gradians — the unit selector changes how your angle is read, not how the answers are written. That selector is also the one trap worth naming: 60 radians is not 60 degrees, and the page will compute the triangle for whichever unit is selected rather than reporting that the number is far too large for an angle. Both sides must be greater than zero, so a triangle with a side of zero is refused; but an angle of exactly 0 or 180 degrees is accepted and produces a flat triangle with angles of 0, 180 and 0, which the page classifies as obtuse — arithmetically consistent and almost never what someone wants, and the page does not warn that the figure has collapsed. A triangle with two equal sides and an angle of 0 is refused rather than answered, because the third side would be zero and there would be no triangle left at all. The type printed under the answers is decided from the angles as printed, rounded to two decimals, so a triangle whose largest angle is 89.999 degrees is reported as right — the honest reading of the numbers on the screen, and a reminder that the classification is as precise as the display and no more. The page does not check that your three numbers describe a triangle at all beyond the angle range, since any two positive sides and any angle in range always do. Four decimals on the lengths and two on the angles are display widths shared with the rest of this subcategory, not claims about precision. Nothing here accounts for waste or kerf.

Frequently asked questions

How do I find the third side of a triangle from two sides and an angle?
Use the law of cosines: the third side is the square root of a² + b² − 2ab × cos C, where C is the angle between the two sides you know. For sides of 3 and 4 with a right angle between them, the cosine is 0 and the answer is √25 = 5. At 60 degrees the cosine is 0.5, the correction term is 12, and the third side is √13, which is about 3.6056 — noticeably shorter, from the same two sides.
How does the page decide whether a triangle is acute, right or obtuse?
From the largest of the three angles. Below 90 degrees the triangle is acute, at exactly 90 it is right, and above 90 it is obtuse. The largest angle is always opposite the longest side, so the same test can be done on the sides: square the two shorter ones and compare their sum with the square of the longest — equal means right, greater means acute, smaller means obtuse. Sides of 5, 5 and 8.6603 give an angle of 120 degrees and an obtuse triangle.
Why do two sides and the angle between them determine the whole triangle?
Because the two sides are free to swing apart like a pair of dividers, and the angle is what fixes how far apart they end up. Once the angle is set, the two free ends have only one possible distance between them, so the third side is fixed, and with three sides the angles are fixed too. That is why two sides alone are not enough — 3 and 4 can enclose anything from nearly 0 to 6 square centimetres, the most being at a right angle — and why three angles alone are not enough either, since they fix the shape but not the size.
What is the area formula used here?
Half the product of the two known sides times the sine of the angle between them: A = ½ × a × b × sin C. It is the usual half-base-times-height formula with the height replaced, because the height above one of the sides is the other side times the sine of the included angle. Sides of 3 and 4 at a right angle give ½ × 12 × 1 = 6 square centimetres; the same two sides at 60 degrees give 5.1962, since sin 60 is 0.866.
What happens if the angle is 0 or 180 degrees?
The triangle collapses into a line and the page answers anyway: with an angle of 0 between sides of 3 and 4 the third side is 1, one angle is 180 degrees and the other two are 0. The classification comes back as obtuse, which is consistent with the rule that anything above 90 is obtuse, though a flattened triangle is a degenerate case rather than a real shape. The one combination refused outright is two equal sides with an angle of 0, where the third side would be zero and nothing would be left.
Can I use this page for a right triangle?
Yes, and the page will tell you so: enter 3 and 4 with an angle of 90 and the type comes back right. The arithmetic degenerates neatly, because the cosine of 90 degrees is 0 and the law of cosines collapses to a² + b² = c². If every triangle you solve is a right triangle, the Pythagorean theorem calculator in this subcategory takes the two sides directly and skips the trigonometry — but this page is the one to use when you are not sure the angle is exactly square.

References

Related calculators