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

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

Find the Cosine of an Angle with Excel's COS Function

Find the Cosine of an Angle in Excel with the COS Function
Find the Cosine of an Angle in Excel with the COS Function. © Ted French

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.

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

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;
  • using Excel's PI function in the formula: angle(degrees) * PI()/180 as shown in row 4 in the example.

The COS Function's 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

Example: Using Excel's COS Function

This example 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 =COS(B2), 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 menu;
  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 = COS ( B2 ) appears in the formula bar above the worksheet.

#VALUE! Errors and Blank Cell Results

  • The COS function displays the #VALUE! error if the reference used as the function's argument points to a cell containing text data row five of the example where the cell reference used points to the text label: Angle (Radians);
  • If the cell points to an empty cell, the function returns a value of one - row six above. Excel's trig functions interpret blank cells as zero, and the cosine of zero radians is equal to one.

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.

of 02

The NOW Function's Dialog Box

An alternative to typing the NOW function into a worksheet manually is to use the function's dialog box. The following steps cover this method of entering the NOW function.

  1. Click on a worksheet cell where the current date and or time is to be displayed
  2. Click on the Formulas tab.
  3. Choose Date & Time from the ribbon to open the function drop-down list.
  4. Click on NOW in the list to bring up the function's dialog box
  5. Since the function takes no arguments, click OK to enter the function into the current cell and close the dialog box
  6. The current time and date should appear in the active cell.
  7. When you click on the active cell, the complete function = NOW ( ) appears in the formula bar above the worksheet.

RANK Function

Note, the dialog box for this function is not available in Excel 2010 and later versions of the program. To use it in these versions, the function must be entered manually.

Opening the Dialog Box

The steps below detail the steps used to enter the RANK function and arguments into cell B7 using the function's dialog box in Excel 2007.

  1. Click on cell B7 - the location where the results will be displayed
  2. Click on the Formulas tab
  3. Choose More Functions > Statistical from the ribbon to open the function drop down list
  4. Click on RANK in the list to bring up the function's dialog box
  5. Click on cell B3 to choose the number to be ranked (5)
  6. Click on the "Ref" line in the dialog box
  7. Highlight cells B1 to B5 to enter this range into the dialog box
  8. Click on the "Order" line in the dialog box
  9. Type a zero (0) on this line to rank the number in descending order.
  10. Click OK to complete the function and close the dialog box
  11. The number 4 should appear in cell B7 since the number 5 is the fourth largest number
  12. When you click on cell B7, the complete function =RANK(B3, B1: B5,0) appears in the formula bar above the worksheet.