Excel Functions Tutorials

- Excel Formulas Cheatsheet
- Excel
- Financial Functions in Excel
- Logical Functions in Excel
- TEXT Functions in Excel
- Concatenate Excel Function
- RIGHT Function in Excel
- LEN in Excel
- LEFT Function in Excel
- Search Function in Excel
- TEXT Function in Excel
- PROPER in Excel
- MID in Excel
- Trim in Excel
- CLEAN Excel Function
- EXACT Excel Function
- REPT Function in Excel
- CODE Excel Function
- FIND Function in Excel
- VALUE Function in Excel
- Char Function In Excel
- Substitute Function in Excel
- Substring in Excel

- Lookup Reference in Excel
- Address Function in Excel
- Choose Function in Excel
- Column Function in Excel
- Columns Function in Excel
- REPLACE Function in Excel
- GetPivotData in Excel
- HLOOKUP in Excel
- Hyperlink Excel Function
- INDIRECT Function in Excel
- LOOKUP Excel Function
- Match Excel Function
- VLOOKUP Excel Function
- INDEX Excel Function
- VLOOKUP vs HLOOKUP
- TRANSPOSE Excel Function
- Row Function in Excel
- OFFSET Excel Function
- VLOOKUP with Multiple Criteria
- IFERROR with VLOOKUP in Excel
- Fixing VLOOKUP Errors
- Alternatives to Vlookup

- Maths Functions in Excel
- POWER Function in Excel
- EVEN Function in Excel
- ODD Function in Excel
- ABS Function in Excel
- SUM Function in Excel
- SUMPRODUCT Function in Excel
- SUBTOTAL Excel Function
- ROUND in Excel
- AGGREGATE Excel Function
- PRODUCT Excel Function
- RAND Excel Function
- LOG Excel Function
- EXPONENTIAL Excel Function
- SUMIF in Excel
- TAN Excel Function
- CEILING Excel Function
- LN Excel Function
- SIGN Excel Function
- COS Excel Function
- FLOOR Function in Excel
- SIN Excel Function
- ROUNDDOWN Excel Function
- ROUNDUP Function in Excel
- DSUM
- COMBIN Excel Function
- INT Excel Function (Integer)
- TANH in Excel

- Date and Time Function in Excel
- Statistical Function in Excel
- AVERAGE Excel Function
- CORREL Excel Function
- COUNT Excel Function
- COUNTIF Excel Function
- FREQUENCY Excel Function
- MAX Excel Function
- MEDIAN Excel Function
- GROWTH Excel Function
- SLOPE Function in Excel
- TREND Function in Excel
- SMALL Function in Excel
- MODE Excel Function
- LARGE Excel Function
- PERCENTILE Excel Function
- LINEST Excel Function
- T-TEST in Excel
- QUARTILE Excel Function
- FORECAST Excel Function
- MIN in Excel
- Standard Deviation in Excel
- COUNTIF with Multiple Criteria
- Mean vs Median
- NORM.S.INV Function in Excel
- NORMDIST in Excel
- Variance vs Standard Deviation

- Information Functions in Excel
- Excel Charts
- Column Chart in excel
- Stacked Column Chart
- Pie Chart in Excel
- Area Chart in Excel
- Stacked Chart in Excel (Column, Bar & 100% Stacked)
- Histogram Excel Chart
- Waterfall Chart in Excel
- Pareto Chart in Excel
- Bubble Chart in Excel
- Gantt Chart in Excel
- Radar Chart in Excel (Spider Chart)
- Clustered Bar Chart in Excel
- Clustered Column Chart in Excel
- Dynamic Chart in Excel

- Excel Tools
- Watch Window in Excel
- List Box in Excel VBA
- Conditional Formatting in Excel
- Data Table in Excel
- Data Validation Excel
- Paste Special in Excel (With Top 10 Shortcuts)
- One Variable Data Table in Excel
- Two-Variable Data Table in Excel
- Scenario Manager in Excel
- Solver in Excel
- Name Range in Excel
- Dynamic Named Range in Excel
- Sort Data in Excel
- Sort by Color in Excel
- Sort by Number in Excel
- Auto Format Excel
- Track Changes in Excel
- Text to Columns in Excel
- Merge Cells in Excel
- Lock Cells in Excel
- Scroll Bars in Excel
- Spell Check in Excel
- Filters in Excel
- Auto Filter In Excel
- Advanced Filter in Excel
- Recording Macros in Excel
- Add-Ins in excel
- Excel Fill Handle
- AutoFill in Excel
- Excel Tables
- Radio Button in Excel
- Combo Box in Excel and VBA
- Checkbox in Excel

- Excel Tips
- How to Unhide Columns in Excel?
- Convert Date to Text in Excel
- Top 20 Keyboard Shortcuts in Excel
- Convert Numbers to Text in Excel
- Show Formula in Excel
- Absolute Reference in Excel
- Relative References in Excel
- Superscript in Excel
- Subscript in Excel
- Formula Errors in Excel
- Convert Text to Numbers in Excel
- Insert Multiple Rows in Excel
- Remove Blank Rows in Excel
- Highlight Every Other Row in Excel
- External Links in Excel
- Insert Hyperlinks in Excel
- Remove Hyperlinks in Excel
- Combine Cells in Excel
- Remove Duplicates in Excel
- Random Numbers in Excel
- Drop Down List in Excel
- Refresh Pivot Table in Excel
- Column Sort in Excel
- Hiding a Column in Excel
- Count Unique Values in Excel
- CAGR Formula in Excel
- Equations in Excel
- How to Delete Pivot Table?
- Excel Subtraction Formula
- Excel Extensions
- Hide Formula in Excel
- Numbering in Excel
- Auto Numbering in Excel
- Row Limit in Excel
- Delete Row Shortcut in Excel
- Arrays in Excel VBA
- Array Formulas in Excel
- Dynamic Tables in Excel
- Convert Columns to Rows in Excel
- Formatting in Excel
- Print Comments in Excel
- Excel vs Google Sheets

**COS in Excel (Table of Contents)**

## COS Excel Function

It is a built-in function in MS Excel. It is categorized under Math Functions in MS Excel. The function returns the cosine of an angle given in radians. The parameter is the value of the angle for which the cosine is to be calculated. The angle can be calculated using the RADIANS function or multiplying it by PI()/180.

### COS Formula

The COS Formula in Excel is as follows:

The COS Formula in excel has one argument which is a required parameter.

*number**= This is a required parameter. It indicates the angle for which the cosine is to be calculated.*

**How to Use COS Function in Excel?**

The COS can be used in Excel Worksheet as a Worksheet (WS) function as well as in Excel VBA. As a WS function, it can be entered as a part of the COS formula in a cell of a worksheet. As a VBA function, it can be entered in the VBA code.

Refer to the examples given below to understand better.

#### COS in Excel Worksheet

### COS in Excel Example #1 – Calculate the value of cos (0)

In this example, cell B2 contains value of the angle for which cosine is to be calculated. Cell C2 has a COS formula associated with it which is RADIANS. COS in excel is assigned to D2 cell. RADIANS(B2) is 0. Further, COS is applied on 0 which is 1.

Hence, the resultant cell D2 has value 1 as COS(0) is 1.

### COS in Excel Example #2 – Calculate the value of cos (30)

** **In this example, cell B3 contains value of the angle for which cosine is to be calculated. Cell C3 has a COS formula associated with it which is RADIANS. COS in excel is assigned to D3 cell. RADIANS(B3) is 0.523598776. Further, COS is applied on 0.523598776 which is 0.866025404.

Hence, the resultant cell D3 has value 1 as COS (0.523598776) is 1.

### COS in Excel Example #3 – Calculate the value of cos (45)

In this example, cell B4 contains value of the angle for which cosine is to be calculated. Cell C4 has a COS formula associated with it which is RADIANS. COS is assigned to D4 cell. RADIANS(B3) is 0.523598776. Further, COS is applied on 0.785398163 which is 0.707106781 .

Hence, the resultant cell D4 has value 1 as COS (0.707106781) is 1.

### COS in Excel Example #4 – Calculate the value of cos (60)

In this example, cell B5 contains value of the angle for which cosine is to be calculated. Cell C5 has a COS formula associated with it which is RADIANS. COS is assigned to D5 cell. RADIANS(B5) is 1.047197551. Further, COS is applied on 1.047197551 which is 0.5.

Hence, the resultant cell D5 has value 0.5 as COS (1.047197551) is 0.5.

### COS in Excel Example# 5 – Calculate the value of cos (90)

In this example, cell B6 contains the value of the angle for which cosine is to be calculated. Cell C6 has a COS formula associated with it which is B6*PI ()/180. COS is assigned to D6 cell. 90*PI ()/180 is 1.570796327**. **The value of PI () is 3.14159. So, it is 90 * (3.14159/180) =1.570796327. Further, COS is applied on 1.570796327 which is 6.12574E-17**. **

Hence, the resultant cell D6 has 6.12574E-17 as COS (1.570796327) is 6.12574E-17.

**Things to remember about the COS** **Function in Excel**

- The COS in excel always expects radians as the parameter for which the cosine is to be calculated.
- If the angle is in degrees, it must be calculated using the RADIANS function or multiply the angle by PI ()/180.

**Usage of COS function in Excel VBA**

The COS in excel can be used in Excel VBA as follows. It serves the same purpose which is to get the cosine value of the angle provided.

Syntax: COS ( Number ) |

COS in Excel VBA Example #1

Dim val1 As Double

val1 = Cos ( 0 )

val1 : **1**

Here, val1 is a variable. It is declared as Double which indicates it can hold data with double data type. Cosine of 0 is 1. Hence val1 holds value 1.

### COS in Excel VBA Example# 2

Const pi = 3.1415

Dim val As Double

**‘** Convert 45 degrees to radians by multiplying by pi/180.

val = Cos (45 * pi / 180 )

‘ The variable val is now equal to 0.7071067

Here, angle 45 is converted to radians using the same COS formula used in the Excel worksheet.

If a non-numeric value is provided to the Cos in excel then, it will return *Type Mismatch* error in Excel VBA code.

You can download this COS Function in Excel template here – COS Function Excel Template

### Recommended Articles

This has been a guide to COS Function in Excel. Here we discuss the COS Formula in excel and how to use COS function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –

## Leave a Reply