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

### Finding the Cosine of an Angle in Excel

The trigonometric function co*sine*, 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 cover 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

- Click on cell C2 in the worksheet to make it the active cell;
- Click on the
*Formulas*tab of the ribbon menu; - Choose
*Math & Trig*from the ribbon to open the function drop down list; - Click on COS in the list to bring up the function's dialog box;
- In the dialog box, click on the
*Number*line; - Click on cell B2 in the worksheet to enter that cell reference into the formula;
- Click OK to complete the formula and return to the worksheet;
- The answer 0.5 should appear in cell C2 - which is the cosine of a 60 degree angle;
- 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.

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

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

- Click on a worksheet cell where the current date and or time is to be displayed
- Click on the
*Formulas*tab. - Choose
*Date & Time*from the ribbon to open the function drop down list. - Click on
*NOW*in the list to bring up the function's dialog box - Since the function takes no arguments, click OK to enter the function into the current cell and close the dialog box
- The current time and date should appear in the active cell.
- 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.

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