Frustrating excel problem with COS

  • Thread starter tommy060289
  • Start date
  • Tags
    Cos Excel
In summary, the conversation discusses an issue with the calculation of incident solar radiation in Excel. The calculator gives the correct result of 0.985 for the equation =COS(9.863), but Excel gives 0.905, which is incorrect. It is discovered that Excel is giving the output in radians instead of degrees. To fix this, the user suggests adding *(Pi()/180) or using the RADIANS() and DEGREES() functions.
  • #1
tommy060289
22
0
Dear all,

I am currently using excel to work out some values for incident solar radiation but I am running into a rather frustrating problem when I try to do the following:

=COS(9.863)

my calculator tells me correctly this is 0.985.

however, when I put this in excel it decides it actually equals 0.905, which is obviously wrong.

I've gathered this is an issue with excel giving the answer in Rads rather than degrees but I can not figure out how you force excel to output the correct answer (in degrees) and since I have thousands of calculations it isn't feasible for me to alter every one manually.

Cheers,

Tom
 
Computer science news on Phys.org
  • #2
No worries, figured I can get it to change by adding:

*(Pi()/180) on the end
 
  • #3
You can also use the RADIANS() function: COS(RADIANS(angle_in_degrees)).

And if you ever need to go the other way, there's a DEGREES() function: DEGREES(ACOS(x)).
 
  • #4
tommy060289 said:
I've gathered this is an issue with excel giving the answer in Rads rather than degrees but I can not figure out how you force excel to output the correct answer (in degrees) and since I have thousands of calculations it isn't feasible for me to alter every one manually.
Just to clarify, hopefully you realize the output result of =cos(9.863) is not in radians, it is the input number 9.863 that Excel assumes is in radians.

jtbell said:
You can also use the RADIANS() function: COS(RADIANS(angle_in_degrees)).

And if you ever need to go the other way, there's a DEGREES() function: DEGREES(ACOS(x)).
I didn't know that, thanks for the tip!
 
  • #5


Hello Tom,

I understand your frustration with this excel problem. It seems like excel is giving you the answer in radians instead of degrees. To force excel to output the correct answer in degrees, you can use the RADIANS function. For example, instead of typing =COS(9.863), you can type =COS(RADIANS(9.863)) and this should give you the correct answer of 0.985.

Alternatively, you can also change the settings in excel to always use degrees instead of radians. To do this, go to File > Options > Formulas and under "Working with formulas", make sure the "Use radians" box is unchecked.

I hope this helps solve your frustrating excel problem. Good luck with your calculations!

Best,
 

1. Why is my COS function returning an error in Excel?

This is a common issue and can be caused by a variety of factors. The most common reasons for the COS function to return an error include incorrect syntax, using the wrong data type, and referencing cells that contain errors or are empty. Double-check your formula and data to ensure they are correct and formatted properly.

2. Can the COS function be used with non-numeric values?

No, the COS function in Excel can only be used with numeric values. If you try to use it with non-numeric values, it will return an error. If you need to use the COS function with non-numeric values, you can convert them to numbers using the VALUE function.

3. Why is my COS function returning a different value than expected?

This could be due to a few reasons. First, make sure that the angle argument in your COS formula is in radians, not degrees. You can convert degrees to radians by multiplying by PI()/180. Also, check that you are using the correct mathematical formula for the cosine function. If you are still getting unexpected results, double-check your data and formula to ensure they are correct.

4. How can I use the COS function to calculate the cosine of multiple angles at once?

To calculate the cosine of multiple angles at once, you can use an array formula. Simply enter all of the angles into a single row or column, and then use the COS function with the entire range of cells as the argument. Remember to press Ctrl + Shift + Enter to enter the formula as an array formula.

5. Is there a limit to the number of arguments that can be used in the COS function?

Yes, the COS function in Excel can only accept one argument, which is the angle in radians. If you need to calculate the cosine of multiple angles, you can use an array formula or create a helper column to convert degrees to radians before using the COS function.

Similar threads

Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
555
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • Computing and Technology
Replies
2
Views
7K
  • Precalculus Mathematics Homework Help
Replies
1
Views
971
  • Computing and Technology
Replies
1
Views
4K
  • Introductory Physics Homework Help
Replies
14
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
12
Views
981
  • Calculus and Beyond Homework Help
Replies
1
Views
3K
Back
Top