Triangle Calculator
Enter any three sides or angles (two for a right triangle) to find the rest, with a drawing to scale and the steps.
Results
Solved as SSS: three sides
A = 39.2579°, B = 53.0673°, C = 87.6749°
From a = 95 ft, b = 120 ft and c = 150 ft, using the law of cosines.
- Area
- 5,695.3071 ft²Heron's formula
- Perimeter
- 365 ftSemiperimeter 182.5 ft
- Type
- Acute scaleneLargest angle C = 87.6749°
Drawn to scale; solved values in bold. Dashed: the height to side c, 75.9374 ft. Labels are rounded to 2 decimal places.
How this was calculated
- Three sides are known (SSS). Start with the largest angle, C, opposite the longest side, c: it is the only angle that can be 90° or more, and the law of cosines gives it without ambiguity.
- cos C = (a² + b² − c²) ÷ (2ab) = (95² + 120² − 150²) ÷ (2 × 95 × 120) = 925 ÷ 22,800 = 0.0406, so C = cos⁻¹(0.0406) = 87.6749°
- cos A = (b² + c² − a²) ÷ (2bc) = (120² + 150² − 95²) ÷ (2 × 120 × 150) = 27,875 ÷ 36,000 = 0.7743, so A = cos⁻¹(0.7743) = 39.2579°
- B = 180° − C − A = 180° − 87.6749° − 39.2579° = 53.0673°
- Perimeter = a + b + c = 95 + 120 + 150 = 365 ft, so the semiperimeter s = 182.5 ft
- Area (Heron's formula) = √(s(s − a)(s − b)(s − c)) = √(182.5 × 87.5 × 62.5 × 32.5) = √32,436,523.4375 = 5,695.3071 ft²
- Heights (2 × area ÷ side): to a, 2 × 5,695.3071 ÷ 95 = 119.9012 ft; to b, 2 × 5,695.3071 ÷ 120 = 94.9218 ft; to c, 2 × 5,695.3071 ÷ 150 = 75.9374 ft
| Measurement | Value | How it was found |
|---|---|---|
| Side a | 95 ft | Entered |
| Side b | 120 ft | Entered |
| Side c | 150 ft | Entered |
| Angle A | 39.2579° | Law of cosines |
| Angle B | 53.0673° | Angle sum (180°) |
| Angle C | 87.6749° | Law of cosines |
| Area | 5,695.3071 ft² | Heron's formula |
| Perimeter | 365 ft | a + b + c |
| Height to side a | 119.9012 ft | 2 × area ÷ a |
| Height to side b | 94.9218 ft | 2 × area ÷ b |
| Height to side c | 75.9374 ft | 2 × area ÷ c |
More measurements: medians, bisectors, circles, corners
| Measurement | Value | Formula |
|---|---|---|
| Median to a | 127.2547 ft | ½√(2b² + 2c² − a²) |
| Median to b | 110.2837 ft | ½√(2a² + 2c² − b²) |
| Median to c | 78.0224 ft | ½√(2a² + 2b² − c²) |
| Bisector of A | 125.5851 ft | √(bc(1 − a² ÷ (b + c)²)) |
| Bisector of B | 104.0741 ft | √(ac(1 − b² ÷ (a + c)²)) |
| Bisector of C | 76.4922 ft | √(ab(1 − c² ÷ (a + b)²)) |
| Inradius | 31.2072 ft | Area ÷ s |
| Circumradius | 75.0618 ft | abc ÷ (4 × area) |
| Exterior angle A | 140.7421° | 180° − A |
| Exterior angle B | 126.9327° | 180° − B |
| Exterior angle C | 92.3251° | 180° − C |
| Corner A (x, y) | (0, 0) | Placed at the origin |
| Corner B (x, y) | (150, 0) | On the x-axis, c from A |
| Corner C (x, y) | (92.9167, 75.9374) | (b cos A, b sin A) |
Assumptions
- Side a is opposite angle A, side b is opposite angle B and side c is opposite angle C.
- Angles are entered in degrees. The triangle is flat, so its three angles add up to 180°.
- All sides are in feet, and the area is in square feet (ft²). Nothing is converted between units.
- Values are shown to 4 decimal places (the drawing to 2); the calculation, the CSV downloads and the full-precision line in Copy results keep every digit.
- The type is decided on unrounded values: sides equal to 12 significant digits count as equal, and an angle counts as right when it is exactly 90° or the sides fit a² + b² = c² to 12 significant digits.
- Corner coordinates put A at (0, 0) and B on the positive x-axis, with C above it.
Calculated in your browser. This site doesn't send the numbers you enter anywhere. “Continue in” links pass them to the next calculator within this browser tab only.
How to solve a triangle from three known values
Type any three of the six values, at least one of them a side, and the calculator works out which case you have, solves the other three and draws the triangle to scale. Each row of the form pairs a side with the angle opposite it: side a faces angle A, side b faces angle B and side c faces angle C. Getting that pairing right matters most in the SSA case below, so the drawing highlights the pair whose box you are typing in.
- Sides a, b and c: lengths in any one unit. Choose it under Length unit to label the answers (and get the area in square units), or leave “No unit”.
- Angles A, B and C: in degrees, such as
35or47.25. If you type an angle in radians by mistake (0.5236 for 30°), the field suggests the degree value. - Triangle: choose Right triangle when one angle is a right angle. Angle C is then fixed at 90°, side c is the hypotenuse, and two values are enough.
- Show angles in and Decimal places: degrees (the default), radians, or degrees, minutes and seconds, to 4 decimal places unless you choose otherwise. The CSV downloads keep full precision, and Copy results adds a line with every value unrounded.
Results update as you type, and the line under each empty box shows the value solved for it. If you think in cases, the Try buttons load one example of each: two sides and the angle between them (SAS), two angles and a side (ASA), two sides and an angle that is not between them (SSA), a 3-4-5 right triangle and a ladder against a wall. Three values fix a triangle, so a fourth one is refused until you clear one; three angles alone are refused too, because they fix the shape but not the size.
| You know | Case | Solved with | Triangles |
|---|---|---|---|
| Three sides | SSS | Law of cosines for the largest angle, then again | One |
| Two sides and the angle between them | SAS | Law of cosines for the third side | One |
| Two angles and the side between them | ASA | 180° minus the two angles, then the law of sines | One |
| Two angles and a side opposite one of them | AAS | 180° minus the two angles, then the law of sines | One |
| Two sides and an angle opposite one of them | SSA | Compare the side with a height, then law of sines | None, 1 or 2 |
Worked example: a triangular lot with sides 95 ft, 120 ft and 150 ft
A corner lot is measured along its three edges: a = 95 ft, b = 120 ft and c = 150 ft. Three sides make it SSS.
- Largest angle first. C is opposite the longest side, so it is the only angle that could be 90° or more: cos C = (95² + 120² − 150²) ÷ (2 × 95 × 120) = 925 ÷ 22,800 = 0.0406, so C = 87.6749°. The corner at C is 2.3251° short of square.
- A second angle. cos A = (120² + 150² − 95²) ÷ (2 × 120 × 150) = 27,875 ÷ 36,000 = 0.7743, so A = 39.2579°.
- The third angle. B = 180° − 87.6749° − 39.2579° = 53.0673°. Subtracting the rounded angles by hand gives 53.0672°; the calculator subtracts the unrounded ones, so the last digit can differ by 1.
- Area with Heron’s formula. The semiperimeter is s = (95 + 120 + 150) ÷ 2 = 182.5 ft, so the area is √(182.5 × 87.5 × 62.5 × 32.5) = √32,436,523.4375 = 5,695.3071 ft².
- Perimeter and height. The perimeter is 365 ft. The height from corner C to the 150 ft side is 2 × 5,695.3071 ÷ 150 = 75.9374 ft, the dashed line in the drawing.
All three angles are below 90°, so the lot is an acute scalene triangle. The More measurements table adds the medians, angle bisectors, the inscribed and circumscribed circles and corner coordinates for the same lot.
Law of sines or law of cosines: which one to use
Use the law of cosines when you know three sides or two sides and the angle between them, and the law of sines when you know an angle together with the side opposite it.
- , and are the sides; , and are the angles opposite them.
- The law of cosines finds a side from the angle between two others, or any angle from three sides (rearranged as ).
- The law of sines needs one complete pair, a side and its opposite angle, before it can find anything else.
Two sides and the angle between them (SAS). With b = 8, c = 5 and A = 60°, the law of cosines gives a² = 64 + 25 − 2 × 8 × 5 × 0.5 = 49, so a = 7. Now that a and A are a pair, the law of sines finds the angle opposite the shorter known side first: C = 38.2132°, which is certainly acute, then B = 81.7868°. Solving for the angle opposite the longer side with sin⁻¹ instead can return the acute angle when the real one is obtuse, because an angle and 180° minus it have the same sine.
Two angles and a side (ASA). Two people stand 200 m apart on a riverbank at A and B and sight the same tree C on the far bank, at 52° and 71° from the bank. Then C = 180° − 52° − 71° = 57°, and the law of sines gives a = 200 × sin 52° ÷ sin 57° = 187.919 m and b = 225.4803 m. The river’s width is the height from the tree to the line AB: 177.6809 m, in the heights rows of the table.
The ambiguous case (SSA): why there can be two triangles
With two sides and an angle that is not between them, the side opposite the angle can swing to meet the third side’s line twice, once or not at all. Draw angle A with side b along one arm; side a hangs from the top of b. Whether it reaches the other arm depends on the height of that top point, h = b sin A:
| Angle A | Side a compared with h and b | Triangles |
|---|---|---|
| Under 90° | Shorter than h | None: side a can’t reach |
| Under 90° | Equal to h | One, with a right angle at B |
| Under 90° | Longer than h, shorter than b | Two |
| Under 90° | b or longer | One |
| 90° or more | b or shorter | None |
| 90° or more | Longer than b | One |
Example: a = 9, b = 12, A = 35°. The height is h = 12 × sin 35° = 6.8829. Side a = 9 is longer than that but shorter than b, so two triangles fit: c = 4.0311 with B = 130.1136°, or c = 15.6286 with B = 49.8864°. The two values of B add up to 180°, which is why the law of sines alone can’t choose between them.
The calculator draws both triangles side by side at the same scale and lists them in one table, labeled Triangle 1 and Triangle 2. A second table repeats the calculation for other lengths of side a with the same b and A: 6 gives no triangle, 7.2 to 10.8 give two, and 12 or longer gives one. The switch from none to two happens at a = h = 6.8829, where the single triangle has a right angle. The three values alone can’t tell you which triangle you have; that takes something else you know, such as whether angle B is obtuse in your sketch.
Right triangle calculator: find a missing side or angle
Choose Right triangle and enter any two values, at least one a side. Side c is the hypotenuse, the side opposite the right angle, and a and b are the legs.
- Two legs: c = √(a² + b²), then A = tan⁻¹(a ÷ b). The 3-4-5 triangle has c = 5 and angles A = 36.8699° and B = 53.1301°.
- A leg and the hypotenuse: the other leg is √(c² − a²), and A = sin⁻¹(a ÷ c). The hypotenuse has to be the longest side.
- A side and an acute angle: the other acute angle is 90° minus it, and sine, cosine or tangent gives the other sides. A 20 ft ladder at 75° to the ground reaches 20 × sin 75° = 19.3185 ft up the wall, and its foot stands 20 × cos 75° = 5.1764 ft from the wall.
In the drawing, the right-triangle mode puts the right angle at the lower left with a small square in the corner.
Area of a triangle from three sides (Heron’s formula)
With three sides, the area is the square root of s(s − a)(s − b)(s − c), where s is half the perimeter.
For the lot above, that is 5,695.3071 ft². When you know two sides and the angle between them, the area is ½ × b × c × sin A instead; for a right triangle it is ½ × a × b. The steps name the formula used for your case.
For very thin triangles, such as a 3° angle between two long sides, the textbook forms of Heron’s formula and the law of cosines lose accuracy to rounding, because they subtract nearly equal numbers. Kahan’s notes give rearranged forms that avoid the subtraction. The calculator computes with those; they are algebraically the same as the textbook formulas, so the steps still show the familiar versions.
Why some side lengths can’t form a triangle
Any two sides of a triangle together are longer than the third, and the three angles add up to exactly 180°. In the lot example, 95 + 120 = 215, so side c must be shorter than 215 ft; type 300 and the calculator says “95 + 120 = 215 is not greater than 300” instead of showing an answer. When the two shorter sides add up to exactly the longest, as in 1, 2 and 3, the sides would lie flat. Two known angles must also add up to less than 180°, or nothing is left for the third.
Reading the result
- The headline names the case the calculator detected and gives the three values it solved, with the values it started from underneath.
- Area, Perimeter and Type follow. The type (acute, right or obtuse; scalene, isosceles or equilateral) is decided on unrounded values, so a triangle whose largest angle shows as 90° at 4 decimal places but is really 89.9999998° is called acute, with a note saying so.
- The drawing is to scale. Solved values are in bold, equal sides carry tick marks, a right angle gets a square, and the dashed line is the height to the base.
- How this was calculated lists each formula with your numbers in it. The table gives every side, angle, the area, the perimeter and the three heights, with a column saying how each was found; More measurements adds medians, angle bisectors, the inradius and circumradius, the exterior angles and corner coordinates.
- If angle A is off by up to 1° appears when you entered an angle (the SSA case gets the table of other side lengths instead). It repeats the calculation half a degree and a degree either side, to show how much a reading error moves the answer: in the SAS example, side a is 6.9135 at 59° and 7.0863 at 61°.
- Save for comparison keeps up to three triangles side by side with the change in each value, and Continue in the Circle Calculator takes the circle through the three corners (the circumradius) over to that page when you have chosen a length unit.
Assumptions and limitations
- The triangle is flat (plane geometry), so its angles add up to 180°.
- Angles are entered in degrees. All sides are in one unit, and nothing is converted between units.
- Values are shown rounded; the calculation keeps full precision, and the CSV downloads carry the unrounded numbers.
- Sides that agree to 12 significant digits count as equal, and an angle counts as right when it is exactly 90° or the sides satisfy a² + b² = c² to 12 significant digits.
- The calculator treats your measurements as exact. Real tape and angle readings have errors; the what-if table shows the effect of an angle reading, and thin triangles are the most sensitive.
Common mistakes
- Putting an angle next to the wrong side. Side a must be opposite angle A. An angle between the two known sides is SAS, with one answer; the same numbers read as SSA can give two.
- Taking the first answer in the SSA case. sin⁻¹ returns only the acute angle. Check whether 180° minus it also fits, or read both triangles off the calculator.
- Mixing degrees and radians. sin 40 on a calculator set to radians is the sine of 40 radians. This calculator takes degrees and warns when a small decimal looks like a radian value.
- Rounding in the middle. Keeping only 2 or 3 digits of a cosine before taking cos⁻¹ can move the final angle, most of all in thin triangles. Keep full precision until the end.
- Using the hypotenuse as a leg. In a right triangle the side opposite the 90° angle is always the longest; c = 5 with a leg of 7 is refused.
Questions
Can a triangle have more than one obtuse angle?
No. The three angles add up to 180°, so two angles over 90° would already total more than that. At most one angle is 90° or more, and it is the one opposite the longest side, which is why the calculator starts with that angle when it knows three sides.
Does SSA prove that two triangles are congruent?
Not in general, because two different triangles can share two sides and the angle opposite one of them, as the SSA example on this page shows. It does when the side opposite the known angle is at least as long as the other known side; then only one triangle fits. SSS, SAS, ASA and AAS always fix the triangle.
Sources
- Algebra and Trigonometry 2e, 10.1 Non-right Triangles: Law of Sines OpenStax (Rice University) The law of sines; the SSA case (two sides and the angle opposite one of them), which can have no solution, one or two; the area of a triangle as one-half the product of two sides and the sine of the angle between them.
- Algebra and Trigonometry 2e, 10.2 Non-right Triangles: Law of Cosines OpenStax (Rice University) The law of cosines for SAS and SSS triangles, as an extension of the Pythagorean theorem; Heron’s formula with the semiperimeter s = (a + b + c) ÷ 2.
- Algebra and Trigonometry 2e, 7.2 Right Triangle Trigonometry OpenStax (Rice University) Sine, cosine and tangent of an acute angle as opposite ÷ hypotenuse, adjacent ÷ hypotenuse and opposite ÷ adjacent.
- Euclid’s Elements, Book I, Proposition 20 (D. E. Joyce, ed.) Clark University The triangle inequality (in any triangle, any two sides together are longer than the third); its proof uses the fact that the side opposite the greater angle is the greater side.
- Euclid’s Elements, Book I, Proposition 26 (D. E. Joyce, ed.) Clark University The congruence theorems (side-angle-side, side-side-side, a side and two angles) and why side-side-angle is ambiguous unless the side opposite the known angle is at least as long as the other known side.
- Euclid’s Elements, Book I, Proposition 32 (D. E. Joyce, ed.) Clark University The three angles of a triangle add up to two right angles (180°), and an exterior angle equals the sum of the two opposite interior angles.
- Euclid’s Elements, Book I, Propositions 47 and 48 (D. E. Joyce, ed.) Clark University Proposition 48, the converse of the Pythagorean theorem (Proposition 47); if the square on one side equals the sum of the squares on the other two, the angle between those two sides is right.
- NIST Guide to the SI, Chapter 5: Units Outside the SI National Institute of Standards and Technology (NIST SP 811) 1° = π/180 rad, 1′ = 1/60 of a degree and 1″ = 1/60 of a minute.
- Miscalculating Area and Angles of a Needle-like Triangle (W. Kahan, lecture notes) University of California, Berkeley Rounding makes Heron’s formula, arccos for an angle and arcsin in the SSA case inaccurate for thin triangles; the rearranged side formula (a − b)² + 4ab sin²(C/2) is accurate.
- Triangle Median Wolfram MathWorld The length of the median to side a is ½√(2b² + 2c² − a²).
- Angle Bisector Wolfram MathWorld The length of the bisector of angle A, from A to side a, is √(bc(1 − a² ÷ (b + c)²)).
- Inradius Wolfram MathWorld The inradius of a triangle is its area divided by its semiperimeter.
- Circumradius Wolfram MathWorld The circumradius of a triangle is abc ÷ (4 × area), written with the sides and the semiperimeter.
Smart Financial Calc: https://smartfinancialcalc.com/math/triangle-calculator/