Find the Cosine of an Angle in Excel
The trigonometric function cosine, like the sine and the tangent, is based on a right-angled triangle (a triangle containing an angle equal to 90 degrees) as shown in the image below. In math class, the cosine of an angle is found by dividing the length of the side adjacent to the angle by the length of the hypotenuse. In Excel, the cosine of an angle can be found using the COS function as long as that angle is measured in radians. The COS function saves you a great deal of time and possibly a great deal of head-scratching since you no longer have to remember which side of the triangle is adjacent to the angle, which is the opposite, and which is the hypotenuse.
Understand Degrees vs. Radians
Using the COS function to find the cosine of an angle may be easier than doing it manually, but, as mentioned, it is important to realize that when using the COS function, the angle needs to be in radians rather than degrees. To make it easier to work with COS and Excel’s other trig functions, use Excel’s RADIANS function to convert the angle being measured from degrees to radians as shown in cell B2 in the image above. In this example, the angle of 60 degrees is converted into 1.047197551 radians.
Trigonometric Uses in Excel
Trigonometry focuses on the relationships between the sides and the angles of a triangle, and while many of us do not need to use it on a daily basis, trigonometry has applications in a number of fields including architecture, physics, engineering, and surveying. Architects, for example, use trigonometry for calculations involving sun shading, structural load, and, roof slopes.
Excel COS Function Syntax and Arguments
A function’s syntax refers to the layout of the function and includes the function’s name, brackets, and arguments. The syntax for the COS function is: Number: The angle being calculated, measured in radians. The size of the angle in radians can be entered for this argument or the cell reference to the location of this data in the worksheet can be entered instead.
Use Excel’s COS Function
The example in this article covers the steps used to enter the COS function into cell C2 in the image above to find the cosine of a 60-degree angle or 1.047197551 radians. Options for entering the COS function include manually typing in the entire function or using the Function Arguments dialog box as outlined below.
Enter the COS Function
Troubleshoot Issues With Excel’s COS Function
#VALUE! Errors
The COS function displays the #VALUE! error if the reference used as the function’s argument points to a cell containing text data. Switch the cell’s data type to Numbers to correct the mistake.
Blank Cell Results
If the cell points to an empty cell, the function returns a value of one. Excel’s trig functions interpret blank cells as zero, and the cosine of zero radians is equal to one. Correct the error by pointing your function to the right cell.