How to Find the Cosine of an Angle With Excel's COS Function

Sparklers painting cosine at night on beach
Stephen Mallon / Getty Images

Microsoft Excel offers many different functions for quickly calculating mathematical formulas. If you need to find the cosine of an angle, we'll show you how to get the job done using the COS Function in Excel. Whether your angle is in degrees or radians, this solution can work for you with a bit of tweaking. Follow our step-by-step guide to see just how easy it is to take advantage of Excel's quick mathematical skills.

01
of 03

Understanding Cosines of an Angle in Excel

Excel Screenshot, Overall View of Spreadsheet

Finding 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 above.

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.

Using the COS function can save 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 opposite, and which is the hypotenuse.

Understanding 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 - which is the unit most of us are not familiar.

Radians are related to the radius of the circle with one radian being approximately equal to 57 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 where the angle of 60 degrees is converted into 1.047197551 radians.

Other options for converting from degrees to radians include:

  • Nesting the RADIANS function inside the COS function as shown in row 3 in the example image.
  • Using Excel's PI function in the formula as shown in row 4 in the example image.

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.

02
of 03

Using Excel's COS Function to Find the Cosine

Excel Screenshot, Close View of Formula

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:

= COS ( Number )

Number is 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

Using 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's dialog box as outlined below.

Entering the COS Function

  1. Click on cell C2 in the worksheet to make it the active cell.
  2. Click on the Formulas tab of the ribbon bar.
  3. Choose Math & Trig from the ribbon to open the function drop-down list.
  4. Click on COS in the list to bring up the function's dialog box.
  5. In the dialog box, click on the Number line.
  6. Click on cell B2 in the worksheet to enter that cell reference into the formula.
  7. Click OK to complete the formula and return to the worksheet;
  8. The answer 0.5 should appear in cell C2, which is the cosine of a 60-degree angle.
  9. When you click on cell C2, the complete function appears in the formula bar above the worksheet.
= COS ( B2 )
03
of 03

Troubleshooting Issues with Excel's COS Function

Excel Screenshot, Value Error

#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.