While working in Excel, users apply many Excel functions for working purposes. One such function is the COS function of Excel. When users input an angle in radians, the COS function gives the cosine of that angle. But, users cannot get an angle in degrees by directly using the COS function. When they do that, they do not get the correct answer. So, then COS in Excel shows the wrong answer. In this article, I will show you how to solve if the COS function in Excel is showing wrong output.
How to Insert & Use COS Function in Excel: 2 Suitable Ways
In this article, you will find two easy solutions to the problem if the COS function in Excel is returning wrong output. You can follow this two correct ways to input the angle values in degrees or transform the radian values of the angles into degrees in the COS function. Firstly, you can combine the RADIANS function into the COS function to change the result from degree to radian. Or, secondly, you can use the PI function to change the radians to degrees to show correct results.
To illustrate our further procedure, I will use the following data set. Here, I want to determine the cosine values of some angels that are in the degree format.
Method 1: Combining COS and RADIANS Functions
In my first method, I will combine the COS function with the RADIANS function. By default, the COS function will take the input of an angle in radian. To put these angles that are in the in degree modes, you have to use the RADIANS function to convert the degrees into radians. See the following steps for a better understanding.
Step 1:
- Firstly, I will demonstrate what happens after inserting angles as degrees directly in the COS function.
- In order to see that, notice the following COS function formula in cell C5.
=COS(B5)
Step 2:
- Secondly, after pressing Enter and using AutoFill, you will notice the results are not correct as per the degree format.
- So, in the following steps, I will show the way to fix this.
Step 3:
- Thirdly, insert the following combination formula of the COS function and the RADIANS function in cell C5.
=COS(RADIANS(B5))
Step 4:
- Finally, after pressing Enter and enabling AutoFill, you will get the correct result for the angles that are in the degree format.
Method 2: Multiplying Angle by PI Function
The second method consists of multiplying the given angle by PI /180 into the COS function. Thus, the given angle will transform into the degree format from the radian format. Here, you will need the PI function of Excel for this transformation. See the below-given steps for a better understanding.
Step 1:
- First of all, insert the following formula in cell C5 where the angle inside the COS function has been multiplied by PI / 180.
=COS(B5*PI()/180)
Step 2:
- Secondly, press Enter to see the correct result in the degree mode.
- Then, use the Fill Handle to drag the formula to the lower cells for getting the correct result.
Calculating Inverse Cosine in Excel
To get the inverse cosine of a number in Excel, you can use the ACOS function. But, there are some limitations regarding the use of this function. The detailed steps and the limitations are given in the following steps for a better understanding.
Step 1:
- First of all, take a data set like the following image, where, you will have some random numbers as inputs.
- Then, in cell C5, type the following formula of the ACOS function.
=ACOS(B5)
Step 2:
- Secondly, after pressing Enter and using AutoFill, the outputs will look like the following image.
- Here, you will notice some #NUM! as the outputs.
- Moreover, these errors occur because the ACOS function will show outputs for only those numbers that fall between the range of -1 to +1.
Download Practice practice workbook.
You can download the free Excel workbook here and practice on your own.
Conclusion
That’s the end of this article. I hope you find this article helpful. After reading the above description, you will be able to solve the problem if the COS function in Excel is returning wrong output. Please share any further queries or recommendations with us in the comments section below.
Our team is always concerned about your preferences. Therefore, after commenting, please give us some moments to solve your issues, and we will reply to your queries with the best possible solutions ever.