What this calculator does
Given two sides and the angle between them, a triangle is completely determined. The cosine rule finds the third side, the sine rule then gives the remaining angles, and the area follows directly from the two sides and the included angle without needing the height at all.
This is the side-angle-side case, and it is the one most surveying and construction problems reduce to. It is also the well-behaved case: unlike side-side-angle, it always produces exactly one triangle, with no ambiguity to resolve.
The formula
The cosine rule generalises Pythagoras. When the included angle is 90°, its cosine is zero and the correction term vanishes, leaving c² = a² + b². For any other angle the term adjusts for how much the triangle leans. The area formula ½ab·sin C works because b·sin C is exactly the perpendicular height onto side a.
| Term | Meaning |
|---|---|
| a, b | The two known sides. |
| C | The angle between them: the included angle. |
| c | The side opposite angle C. |
| Cosine rule | c² = a² + b² − 2ab·cos C. |
| Sine rule | sin A ÷ a = sin B ÷ b = sin C ÷ c. |
The inputs explained
| Field | What to enter |
|---|---|
| Side a | The first known side. |
| Side b | The second known side. |
| Angle between them (C) (°) | The angle between the two sides, in degrees. It must be under 180° for a valid triangle. |
When to use it
Surveying and land measurement
Measuring two distances from a fixed point and the angle between them gives the distance across, without needing to traverse it. This is the basis of triangulation.
Setting out on a building site
Two known lengths and an angle determine the third length exactly, which is how a diagonal brace or a roof member is sized.
Checking a right angle
Set the angle to 90° and the cosine rule collapses to Pythagoras. It is a useful demonstration that the two are the same result.
Finding area without the height
The half-times-two-sides-times-sine formula avoids measuring a perpendicular, which is often the hardest measurement to take in the field.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How the included angle changes the triangle
Two fixed sides of 8 and 6, with the angle between them varying.
| Included angle | Third side c | Area | Perimeter |
|---|---|---|---|
| 30° | 4.106 | 12.000 | 18.106 |
| 60° | 7.211 | 20.785 | 21.211 |
| 90° | 10.000 | 24.000 | 24.000 |
| 120° | 12.166 | 20.785 | 26.166 |
| 150° | 13.533 | 12.000 | 27.533 |
| 170° | 13.948 | 4.168 | 27.948 |
Varying one side at a fixed 60° angle
One side held at 6 with a 60° included angle, as the other side grows.
| Side a | Third side c | Angle A | Angle B | Area |
|---|---|---|---|---|
| 3 | 5.196 | 30.00° | 90.00° | 7.794 |
| 6 | 6.000 | 60.00° | 60.00° | 15.588 |
| 8 | 7.211 | 73.90° | 46.10° | 20.785 |
| 12 | 10.392 | 90.00° | 30.00° | 31.177 |
| 20 | 17.776 | 103.00° | 17.00° | 51.962 |
| 40 | 37.363 | 112.01° | 7.99° | 103.923 |
Questions
When do I use the cosine rule rather than the sine rule?
Use the cosine rule when you know two sides and the angle between them, or all three sides. Use the sine rule when you have an angle and its opposite side, plus one other measurement.
Is the cosine rule related to Pythagoras?
It generalises it. At 90° the cosine is zero and the −2ab·cos C term disappears, leaving c² = a² + b². For acute angles the term is negative and c is shorter; for obtuse angles it is positive and c is longer.
What is the ambiguous case?
It arises with side-side-angle, where two different triangles can satisfy the same measurements. Side-angle-side, which this calculator handles, is never ambiguous: the triangle is uniquely determined.
Can I find the area without the angle?
Yes, if you know all three sides: Heron’s formula does it, and the triangle-from-three-sides calculator applies it.
Why does the area peak at 90°?
Because area is ½ab·sin C and the sine function peaks at 90°. Beyond that the triangle flattens and the perpendicular height falls, even though the sides are unchanged.
For all three sides known, see triangle from three sides. For right angles specifically, use the right triangle calculator.