Sides, angles and how they are named
A triangle has three sides and three angles. The calculator uses the usual names: the corners are A, B and C, the angle at each corner has the same letter, and each side gets the small letter of the corner across from it. So side a lies opposite angle A, side b opposite B and side c opposite C. The three angles always add up to 180°, or π in radians, which Proposition 32 in Book I of Euclid's Elements proves.
Three values pin a triangle down, as long as one of them is a side. Which three you know decides how to solve it. The calculator spots the case on its own, so you only fill in what you have.
| Case | What you know | How it is solved | Triangles |
|---|---|---|---|
| SSS | All three sides | Law of cosines for the angles | One, if the sides fit |
| SAS | Two sides and the angle between them | Law of cosines for the third side | One |
| ASA | Two angles and the side between them | Third angle, then law of sines | One |
| AAS | Two angles and a side that is not between them | Third angle, then law of sines | One |
| SSA | Two sides and an angle that is not between them | Law of sines, then check both angles | None, one or two |
| AAA | Three angles only | Not solvable | Endless, all the same shape |
The law of sines and the law of cosines
Two formulas do almost all of the work. The law of cosines is the Pythagorean theorem with a correction for angles other than 90°. The law of sines says that every side divided by the sine of its opposite angle gives the same number, which is also the diameter of the circle through all three corners.
Worked example (SAS): sides a = 5 and b = 7 with the angle C = 49° between them. The law of cosines gives c² = 25 + 49 − 70 × cos 49° ≈ 28.0759, so c ≈ 5.2987. Then cos A = (b² + c² − a²) ÷ 2bc gives A ≈ 45.41°, and B = 180° − 49° − A ≈ 85.59°. The area is about 13.2074.
The ambiguous case: two sides and an angle
When you know two sides and an angle that is not between them, the answer is not always unique. Take a = 6, b = 8 and A = 35°. The law of sines gives sin B = b × sin A ÷ a = 8 × sin 35° ÷ 6 ≈ 0.7648. Two angles below 180° have that sine: B ≈ 49.89° and B ≈ 130.11°. Both leave room for a third angle, so two triangles fit:
| Value | Triangle 1 | Triangle 2 |
|---|---|---|
| Angle B | 49.89° | 130.11° |
| Angle C | 95.11° | 14.89° |
| Side c | 10.419 | 2.6874 |
| Area | 23.9045 | 6.1657 |
Picture side b fixed at corner C and side a swinging from its other end. If a is shorter than the height b × sin A, it never reaches the third side and no triangle exists. If it is exactly that long, it meets the third side at a right angle: one triangle. If it is longer than the height but shorter than b, it touches the third side at two points: two triangles. If it is at least as long as b, only one of those points lies on the right side of A: one triangle. When the given angle is 90° or more, the side across from it has to be the longest, otherwise there is no triangle. The calculator runs through these checks and shows both triangles when there are two, with a switch to pick the one you need.
Area, heights and the two circles
Once all sides are known, the calculator finds the area with Heron's formula, which needs no angles and no height:
For sides 7, 8 and 9, s = 12 and K = √(12 × 5 × 4 × 3) = √720 ≈ 26.8328. The other values follow from the area:
- Height onto a side: h = 2K ÷ side. Onto side 7 that is 7.6665.
- Inradius, the radius of the largest circle inside: r = K ÷ s = 2.2361.
- Circumradius, the radius of the circle through all three corners: R = abc ÷ 4K = 4.6957.
- Median from a corner to the middle of the opposite side: ma = ½ √(2b² + 2c² − a²).
- Angle bisector from a corner: ta = 2bc cos(A ÷ 2) ÷ (b + c).
Types of triangles
| By sides | Rule | By angles | Rule |
|---|---|---|---|
| Equilateral | All three sides equal, all angles 60° | Acute | All angles below 90° |
| Isosceles | Two sides equal, and the two angles across from them | Right | One angle of exactly 90° |
| Scalene | All sides different | Obtuse | One angle above 90° |
For a triangle with a right angle, the Pythagorean theorem calculator gives exact square-root answers, like 2√13 instead of 7.2111. Switch this calculator to Right triangle when you know one leg and an angle, or the hypotenuse and an angle: the angle C is then fixed at 90° and two values are enough. For single sines, cosines and arctangents, use the scientific calculator.
When no triangle fits
The calculator checks your values before it solves, and it says what is wrong:
- Sides too short: any two sides together must be longer than the third, the triangle inequality from Euclid's Proposition I.20. Sides 2, 3 and 6 fail it.
- Angles too large: two angles that add up to 180° or more leave nothing for the third.
- Only angles: three angles describe a shape, but every enlarged or shrunk copy has the same angles, so a side is needed for the size.
- Too many values: four or more values can contradict each other. Keep three and clear the rest.
How to use the triangle calculator
- 1Choose Any triangle, or Right triangle when one angle is 90°. Pick degrees or radians for the angles.
- 2Type the three values you know, at least one of them a side, and leave the other fields empty. For a right triangle, two values are enough.
- 3Read the missing sides and angles at the top, then the area, perimeter, radii, heights and the type. If two triangles fit, switch between them.
- 4Check the drawing and the steps, then copy the result or a link that opens the calculator with your values.
Sources
- Euclid's Elements, Book I, Proposition 20 (D. E. Joyce, Clark University): any two sides of a triangle together are greater than the third.
- Euclid's Elements, Book I, Proposition 32 (D. E. Joyce, Clark University): the three angles of a triangle add up to two right angles.
Frequently asked questions
How many values do I need to solve a triangle?
Three, and at least one of them has to be a side. Three sides (SSS), two sides and the angle between them (SAS), two angles and a side (ASA or AAS) each fix exactly one triangle. Two sides and an angle that is not between them (SSA) can fit zero, one or two triangles. Three angles alone fix only the shape, not the size.
What is the ambiguous case?
It is the SSA case: you know two sides and an angle opposite one of them. The law of sines gives the sine of a second angle, and two angles below 180° share that sine, one acute and one obtuse. If both leave room for a positive third angle, two different triangles fit. With a = 6, b = 8 and A = 35°, angle B can be about 49.89° or 130.11°.
Why does the calculator say my sides do not make a triangle?
In every triangle, any two sides together are longer than the third. With sides 2, 3 and 6, the two short sides add up to 5, which cannot reach across 6. If the two short sides add up exactly to the long one, the "triangle" is a flat line with no area.
How do I find the area of a triangle from three sides?
Use Heron's formula. Take half the perimeter, s = (a + b + c) ÷ 2, then area = √(s(s − a)(s − b)(s − c)). For sides 7, 8 and 9, s = 12 and the area is √(12 × 5 × 4 × 3) = √720 ≈ 26.83.
When should I use the law of sines and when the law of cosines?
Use the law of cosines when you know three sides, or two sides and the angle between them. Use the law of sines when you know an angle and the side opposite it, plus one more value. The calculator picks the right law for each case and shows it in the steps.
How do I know if a triangle is acute, right or obtuse?
Look at its largest angle. Below 90° the triangle is acute, exactly 90° it is right, above 90° it is obtuse. From the sides alone, square them: if the two smaller squares add up to the largest square, the triangle is right; if their sum is larger, it is acute; if smaller, obtuse.
Can I enter angles in radians?
Yes. Switch the angle unit to radians, and both the angles you enter and the angles in the result use radians. 90° is π ÷ 2, about 1.5708 radians, and 180° is π, about 3.1416.