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

Sparklers painting cosine at night on beach

Stephen Mallon / Getty Images

If you need to find the cosine of an angle, use the COS Function in Microsoft Excel. Whether your angle is in degrees or radians, this solution works with a bit of tweaking. Follow this step-by-step guide to see how easy it is to take advantage of Excel's quick mathematical skills.

Instructions in this article apply to Excel 2019, 2016, 2013, 2010, 2007; Excel for Mac, Excel 365, Excel Online, Excel for Android, Excel for iPad, and Excel for iPhone.

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.

Excel, Overall View of Spreadsheet

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.

Radians are related to the radius of the circle. One radian is approximately 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. In this example, 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) and 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.

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

Excel, Close View of Formula

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

  1. Select cell C2 in the worksheet to make it the active cell.

  2. Select the Formulas tab of the ribbon bar.

  3. Choose Math & Trig from the ribbon to open the function drop-down list.

  4. Select COS in the list to open the Function Arguments dialog box. In Excel for Mac, the Formula Builder opens.

  5. In the dialog box, place the cursor in the Number line.

    how to use the COS function
  6. Select cell B2 in the worksheet to enter that cell reference into the formula.

  7. Select OK to complete the formula and return to the worksheet. Except in Excel for Mac, where you select Done instead.

  8. The answer 0.5 appears in cell C2, which is the cosine of a 60-degree angle.

  9. Select cell C2 to see the complete function in the formula bar above the worksheet.

=COS(B2)

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

Was this page helpful?