Solve a triangle from what you know
Every triangle has three sides and three angles. Know three of those six parts, including at least one side, and the rest can be worked out. This triangle calculator does it for the five standard cases (SSS, SAS, ASA, AAS and SSA) and also gives the area, perimeter, height and whether the triangle is right, acute or obtuse.
It doubles as a trigonometry calculator: the last mode gives the sine, cosine, tangent and their reciprocals for any angle, in degrees or radians. The labels follow the usual convention, with side a opposite angle A, b opposite B and c opposite C.
How to use it
- Choose the case that matches what you know, such as three sides, or two sides and the angle between them.
- Type the sides in any one unit and the angles in degrees.
- Read the angles first, then the sides, area, perimeter and type underneath.
- If two triangles fit (the SSA case), both are shown. If none fits, the calculator explains why.
The two laws behind it
law of cosines: c² = a² + b² − 2ab × cos C
law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C
angles: A + B + C = 180°
area = ½ × a × b × sin C
The law of cosines handles SSS and SAS, where no angle and opposite side are known together. The law of sines handles ASA, AAS and SSA. For a right triangle, the law of cosines turns into Pythagoras, because cos 90° is 0, so c² = a² + b².
Worked example: sides 3, 4 and 5
- A = arccos((4² + 5² − 3²) ÷ (2 × 4 × 5)) = arccos(32 ÷ 40) = arccos(0.8) = 36.8699°
- B = arccos((3² + 5² − 4²) ÷ (2 × 3 × 5)) = arccos(18 ÷ 30) = 53.1301°
- C = 180° − 36.8699° − 53.1301° = 90°
- Area = ½ × 3 × 4 × sin 90° = 6
The 3, 4, 5 triangle is the classic right triangle: Right, scalene, with angles of 36.8699°, 53.1301° and 90°, an area of 6 and a perimeter of 12. Builders use it to set out a square corner: mark 3 along one wall and 4 along the other, and the diagonal should be exactly 5.
Exact trig values worth knowing
| Angle | sin | cos | tan |
|---|---|---|---|
| 0° | 0 | 1 | 0 |
| 30° | 0.5 | 0.866 | 0.5774 |
| 45° | 0.7071 | 0.7071 | 1 |
| 60° | 0.866 | 0.5 | 1.7321 |
| 90° | 1 | 0 | Undefined |
In a right triangle, sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, and tangent is opposite over adjacent. Tangent at 90° is undefined because cosine is 0 there, and you cannot divide by 0.
The ambiguous case (SSA)
When you know two sides and an angle that is not between them, the side opposite the angle can swing to touch the base in two places. With a = 8, b = 10 and A = 40°, angle B can be about 53.46° or 126.54°, and both make a valid triangle. If side a is too short to reach the base at all, no triangle fits. If a is at least as long as b, only one does.
A related idea, the slope calculator, turns a rise and run into an angle, which is the tangent rule in reverse.
Frequently asked questions
How do I find a missing side of a triangle?
For a right triangle with two known sides, use Pythagoras: c² = a² + b². For any other triangle, use the law of cosines if you know two sides and the angle between them, or the law of sines if you know an angle and the side opposite it. Choose the matching case above.
How do I find a missing angle?
If you know all three sides, the law of cosines gives each angle: cos A = (b² + c² − a²) ÷ 2bc. If you know two angles, the third is 180° minus both, since the angles of a triangle always add up to 180°. The calculator shows each step.
What do SSS, SAS, ASA, AAS and SSA mean?
They name which three parts you know, with S for a side and A for an angle, in order around the triangle. SAS means two sides and the angle between them. SSA means two sides and an angle that is not between them, which can give two different triangles.
How do I calculate sin, cos and tan?
Choose Sin, cos and tan above, type the angle, and pick degrees or radians. In a right triangle, sin is the opposite side over the hypotenuse, cos is the adjacent side over the hypotenuse, and tan is the opposite side over the adjacent side. Tan is also sin divided by cos.
How do I find the area of a triangle without the height?
Use two sides and the angle between them: area = ½ × a × b × sin C. With only the three sides, the calculator finds an angle first and uses the same formula. For example, sides of 3, 4 and 5 give an area of 6.
Related calculators
More free tools from CloveDesk
CloveDesk gives freelancers and small teams one place for quotes, e-signatures, invoices, files and a portal for each client.
Last updated: