Law Of Cosines Calculator

Law Of Cosines Calculator





Pythagoras only works on right-angled triangles, but most real triangles are not so tidy. The Law Of Cosines Calculator generalises the famous theorem to any triangle, finding the third side when two sides and the included angle between them are known, and reporting the perimeter and area alongside it.

The law states that c squared equals a squared plus b squared minus twice a times b times the cosine of angle C. When angle C happens to be exactly ninety degrees its cosine is zero, the final term vanishes, and the formula reduces to Pythagoras exactly, which is a reassuring check on its correctness.

Enter the two known sides and the angle between them in degrees, and the calculator returns the missing side and the two summary measurements, the perimeter and the area, that most follow-up questions ask for.

What the Law of Cosines Says

The law of cosines relates the three sides of any triangle to the cosine of one of its angles. For the side c opposite angle C, the statement is: c squared = a squared + b squared – 2ab cos(C).

The correction term, 2ab cos(C), is what adapts Pythagoras to slanted triangles. An acute angle has a positive cosine, which subtracts from the sum of squares and makes side c shorter than the right-angled case would give.

An obtuse angle has a negative cosine, so subtracting it actually adds length, making side c longer. The single formula handles both cases without any special rules, which is its great strength.

The Included Angle

The included angle is the angle formed at the corner where the two known sides meet. In the standard naming, sides a and b meet at angle C, and the side across from that corner, the one the formula finds, is side c.

Using a non-included angle in this formula is the most common error with the law of cosines. If the known angle is not between the two known sides, a different method, often the law of sines, is needed first.

Angles here are entered in degrees and must be greater than zero and less than one hundred and eighty, because the angles of any real triangle sit strictly inside that range.

Perimeter and Area from the Same Data

Once side c is known, the perimeter is simply a + b + c, the total boundary length of the triangle, useful for fencing, edging and material estimates.

The area follows from the two sides and the included angle directly: half of a times b times sin(C). The sine of the angle captures how spread apart the two sides are, so a right angle gives the largest area for the same two sides.

Reporting side, perimeter and area together saves two extra calculations and mirrors how textbook and surveying problems usually ask for the complete description of the triangle.

How to Use the Law Of Cosines Calculator

Using the Law Of Cosines Calculator takes less than a minute once the input values are ready. Gather the figures first, in the units each field expects, and then follow these steps in order.

  1. Enter the length of side a in the first field.
  2. Enter the length of side b in the second field.
  3. Enter the included angle C, in degrees, the angle between sides a and b.
  4. Press Calculate and read side c, the perimeter and the area in the result box.
  5. Check the answer against the triangle inequality: side c should be shorter than a + b and longer than the difference between a and b.
  6. Use Reset to solve a different triangle.

If a value falls outside the sensible range for the calculation, the calculator asks for a corrected entry instead of producing a misleading figure. That prompt is a safeguard, not an error in your reasoning, so simply check the value mentioned and try again.

Worked Example 1: Sides 3 and 4 with a 90 Degree Angle

Step 1: Side a is 3, side b is 4 and the included angle C is 90 degrees.

Step 2: Apply the formula: c squared = 9 + 16 – 2 x 3 x 4 x cos(90 degrees).

Step 3: Cos(90 degrees) is 0, so c squared = 25 and c = 5.0000, exactly as Pythagoras predicts.

Step 4: The perimeter is 3 + 4 + 5 = 12.0000.

Step 5: The area is 0.5 x 3 x 4 x sin(90 degrees) = 6.0000.

Step 6: The calculator therefore reports 5.0000, 12.0000 and 6.0000.

Worked Example 2: Sides 5 and 7 with a 60 Degree Angle

Step 1: Side a is 5, side b is 7 and the included angle C is 60 degrees.

Step 2: Apply the formula: c squared = 25 + 49 – 2 x 5 x 7 x cos(60 degrees).

Step 3: Cos(60 degrees) is 0.5, so c squared = 74 – 35 = 39 and c = 6.2450.

Step 4: The perimeter is 5 + 7 + 6.2450 = 18.2450.

Step 5: The area is 0.5 x 5 x 7 x sin(60 degrees) = 15.1554.

Step 6: The calculator therefore reports 6.2450, 18.2450 and 15.1554.

Using the Law Of Cosines Calculator in Real Situations

The most common use of this calculation is solving triangles in surveying, navigation, construction and school trigonometry when two sides and the included angle are known. In that setting the value of the tool is speed with transparency: the inputs are few, the formula is standard, and every output can be traced back to the numbers entered.

A good working habit is to run the calculation twice with slightly different assumptions. Changing one input at a time, for example testing a higher and a lower estimate for the side a, shows how sensitive the answer is and prevents a single optimistic guess from driving a decision.

Keep a note of the inputs alongside any result you save or share. A result for side c, opposite angle C means very little on its own a week later, while the same result with its inputs recorded can be checked, repeated and compared with later figures.

Understanding the Formula Behind the Result

The calculation at the heart of the Law Of Cosines Calculator is: c squared = a squared + b squared minus 2 a b cos(C). Every symbol in that statement corresponds to one of the fields or results on the page, so there is no hidden step between what is entered and what is reported.

Because the relationship is direct, errors almost always come from the inputs rather than the arithmetic. A value typed in the wrong units, a figure taken from the wrong row of a table, or a rounded intermediate number can each move the final answer far more than any rounding inside the calculation itself.

The two worked examples above are worth studying before relying on the tool for anything important. They show the formula applied step by step to round numbers, so the pattern of the working, not just the final figures, becomes familiar.

Scope, Limits and Honest Expectations

This tool solves the side-angle-side case only: two sides and the angle between them. It does not solve triangles given three sides or other angle combinations, and angles must be entered in degrees, not radians.

Results are reported in units of length entered unless an output label states otherwise, and they are rounded for display. For rough planning that rounding is irrelevant, but for work that will be checked, graded or paid for, keep the unrounded inputs and repeat the calculation before acting on it.

No short calculator replaces professional judgement in high-stakes situations. Use this tool to understand the size and shape of an answer, to check work done by hand, and to compare options quickly, and then bring in the relevant professional standard or adviser where the decision carries real cost or risk.

Practice Notes and Further Guidance

Practice is the fastest route to confidence with any calculation of this kind. Work through a handful of cases where the answer is already known, including the examples on this page, and the behaviour of the Law Of Cosines Calculator under different inputs soon becomes predictable rather than mysterious.

It also helps to develop a feel for how each input moves the result. In this calculation the side a sets the overall scale, the side b shapes the middle of the working, and the included angle C in degrees, the angle between sides a and b completes the picture, so a change in any one of them leaves a recognisable fingerprint on side c, opposite angle C.

Teachers and trainers often set this type of problem because it rewards method over memory. Showing the formula, substituting the values carefully and only then reaching for a calculator mirrors exactly the sequence this page follows, and it is a sequence worth copying in notebooks, worksheets and reports alike.

Tips for Better Results

  1. Check the units first. Most wrong answers from the Law Of Cosines Calculator come from mixing units, so confirm every entry is in the unit named in its label before calculating.
  2. Start with the worked examples. Enter the numbers from the examples on this page and confirm you get the same results; that proves the method before real figures are used.
  3. Change one input at a time. When comparing scenarios, alter a single value per run so the effect of that change on side c, opposite angle C is unmistakable.
  4. Respect the sensible ranges. Values such as the included angle C in degrees, the angle between sides a and b have a valid range for a reason, and results outside it are warnings, not answers.
  5. Record inputs with results. A saved result without its inputs cannot be checked later, so note all three entries next to any figure you keep.
  6. Round only at the end. Enter full values rather than pre-rounded ones; early rounding is a quiet source of error in chained calculations like law of cosines.
  7. Compare against a rough estimate. A quick mental check of the expected size of the answer catches misplaced decimal points and swapped fields immediately.
  8. Recheck after any change of plan. If an input figure changes in the real situation, rerun the Law Of Cosines Calculator rather than adjusting the old result by guesswork.

Frequently Asked Questions

1. What does the Law Of Cosines Calculator do?

It takes the three inputs described on this page and works out side c, opposite angle C, perimeter of the triangle and area of the triangle in a single step.

That makes it useful for solving triangles in surveying, navigation, construction and school trigonometry when two sides and the included angle are known, where the same calculation is needed again and again with different figures.

2. What do I need to enter into the Law Of Cosines Calculator?

You need the side a, the side b and the included angle C in degrees, the angle between sides a and b.

Each field is labelled with the unit or form expected, and the worked examples show typical values for all three entries.

3. What formula does the Law Of Cosines Calculator use?

It uses the standard relationship: c squared = a squared + b squared minus 2 a b cos(C).

This is the same formula used in textbooks and professional references for this type of problem, applied exactly as written.

4. What units are the results shown in?

Results are shown in units of length entered, unless a result label on the page states a different unit.

If your source figures are in other units, convert them before entering them, because the calculator reads the numbers exactly as typed.

5. How accurate is the Law Of Cosines Calculator?

The arithmetic is exact for the inputs given, and results are rounded only when displayed.

Real-world accuracy therefore depends on the accuracy of the inputs, which is why checking units and source figures matters more than anything else.

6. Can I use the Law Of Cosines Calculator for law of cosines problems in my studies?

Yes. The calculator follows the standard textbook method, and the two worked examples show that method step by step.

For assessed work, show your own working as the examples do, and use the calculator to check the final figures.

7. What happens if I enter an invalid value?

The calculator asks for a corrected entry and does not display a result.

That behaviour protects against the most common slips, such as an empty field, a negative value where a positive one is required, or a value outside the valid range.

8. Why is my result different from the one I calculated by hand?

The usual causes are rounded intermediate steps, a misread input, or a unit difference between the hand calculation and the entries used here.

Work through the closest worked example with the same method, and the point where the two calculations part company is normally easy to spot.

9. Does the Law Of Cosines Calculator work for very large or very small values?

It handles the ordinary range of values met in practice for law of cosines problems.

Extreme values can run into the limits described in the scope section of this page, and display rounding becomes more noticeable there.

10. What is the most common mistake when using this calculator?

Entering a value in the wrong unit or in the wrong field is by far the most common mistake.

The tips section above lists simple habits, such as changing one input at a time and comparing against a rough estimate, that catch most of these errors.

11. Can the Law Of Cosines Calculator replace professional advice?

No. It is a calculating aid that gives fast, transparent estimates for solving triangles in surveying, navigation, construction and school trigonometry when two sides and the included angle are known.

Decisions with significant cost, safety or legal consequences should also follow the professional standards and advice that apply to them.

12. How do the two worked examples help me?

Each example starts from stated inputs, applies the formula in numbered steps and arrives at the exact figures the calculator reports.

Reproducing an example with your own entries is the quickest way to confirm that you are using every field as intended.

13. What should I check if the result looks too large or too small?

First check the decimal point and the units of the side a, then confirm that no two fields have been swapped.

A rough mental estimate of the expected answer, made before calculating, makes this kind of error obvious straight away.

14. Is the Law Of Cosines Calculator free to use?

Yes, the calculator on this page can be used as often as needed, with no sign-up.

Use Reset between calculations to clear the page and start a fresh set of inputs.

15. Where can I learn more about the ideas behind this calculation?

The explainer sections above cover the key terms, the formula and the limits of the method in plain language.

For deeper study, a standard textbook treatment of law of cosines will build naturally on the concepts introduced here.

CONCLUSION

The Law Of Cosines Calculator turns a formula that is easy to misapply by hand into three clear entries and three dependable results: side c, opposite angle C, perimeter of the triangle and area of the triangle. Used with checked units and honest inputs, it gives a fast answer that can still be traced back to first principles.

Keep the worked examples and tips on this page in mind, respect the stated limits of the method, and the calculator will serve as a reliable everyday companion for solving triangles in surveying, navigation, construction and school trigonometry when two sides and the included angle are known.