Quick answer
Apply the cosine rule to find a missing side or angle of a triangle from the sides and the included angle. Enter side b, side c and included angle A and the cosine rule calculator returns side a.
Related tools: Law of Cosines Calculator: Third side of a triangle from two sides and the included angle (law of cosines). Cosine Calculator: cos of an angle in degrees or radians. Inverse Cosine Calculator: arccos (inverse trigonometric function) with the result in degrees and radians.
This page covers the same calculation as the law of cosines calculator page; the two give identical results.
How to use the Cosine Rule Calculator
- Enter side b (above 0).
- Enter side c (above 0).
- Enter included angle A (°) (between 0 and 179.999999).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Side b | A number | > 0 |
| Side c | A number | > 0 |
| Included angle A | A number, in ° | > 0, ≤ 179.999999 |
Formula and method
Formula
a² = b² + c² − 2bc·cos A
IEEE-754 double precision; shown to at most 6 decimal places.
Law of cosines.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Side b = 3; Side c = 4; Included angle A = 90.
| Result | Value |
|---|---|
| Side a | 5 |
Example 2
Inputs: Side b = 1; Side c = 1; Included angle A = 60.
| Result | Value |
|---|---|
| Side a | 1 |
The first line is the headline result (side a). IEEE-754 double precision; shown to at most 6 decimal places.
How the result changes with side b
Holding every other input at the first worked example, this table changes only side b. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Side b | Side a |
|---|---|
| 1.5 | 4.272002 |
| 3 | 5 |
| 6 | 7.211103 |
| 12 | 12.649111 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Included angle A: entering "0" shows "Included angle A must be greater than 0." beside that field and no result.
Choosing between the Cosine Rule Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Law of Cosines Calculator](/math/law-of-cosines-calculator/) | side b, side c and included angle A | Side a |
| [Cosine Calculator](/math/cosine-calculator/) | angle and unit | cos(60°) |
| [Inverse Cosine Calculator](/math/inverse-cosine-calculator/) | value | arccos(0.5) |
| [Sine Rule Calculator](/math/sine-rule-calculator/) | angle A, side a and angle B | Side b |
| [Trigonometry Calculator](/math/trigonometry-calculator/) | angle and unit | sin |
Background: trigonometry
In a right triangle, sin θ is the opposite side over the hypotenuse, cos θ the adjacent side over the hypotenuse and tan θ the opposite over the adjacent. Their reciprocals are cosecant, secant and cotangent. At 30° the values are sin = 0.5, cos = 0.866025 and tan = 0.577350.
Check the angle unit before you calculate: degrees convert to radians by multiplying by π/180, so 30° is about 0.5236 rad. Some values are undefined, for example tan 90°, because the cosine is zero there and the ratio would divide by zero.
Assumptions and limitations
- Angle between 0° and 180°
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for included angle A to confirm this.
Frequently asked questions
What does the Cosine Rule Calculator calculate?
Apply the cosine rule to find a missing side or angle of a triangle from the sides and the included angle. It returns Side a.
What formula does the Cosine Rule Calculator use?
a² = b² + c² − 2bc·cos A. Law of cosines.
What do I need to enter in the cosine Rule Calculator?
You enter Side b, Side c and Included angle A (°).
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Angle between 0° and 180°.
What is an example of a cosine Rule result?
With side b 3, side c 4 and included angle A 90, the side a is 5.
Where does the method come from?
The method follows: Standard mathematical definition.
Related calculators
- Law of Cosines Calculator — Third side of a triangle from two sides and the included angle (law of cosines).
- Cosine Calculator — cos of an angle in degrees or radians.
- Inverse Cosine Calculator — arccos (inverse trigonometric function) with the result in degrees and radians.
- Sine Rule Calculator — Apply the sine rule to find a missing side or angle of a triangle from an angle and its opposite side.
- Trigonometry Calculator — All six trigonometric functions of an angle.
- SOHCAHTOA Calculator — Find the other two sides of a right triangle from one side and an acute angle.
Sources
- Standard mathematical definition
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.