EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Certification Courses
  • 120+ Courses All in One Bundle
  • Login
Home Excel Excel Resources Maths Function in Excel COS Function in Excel
Secondary Sidebar
Excel Functions
  • Maths Function in Excel
    • Calculating Investment Return In Excel
    • Sumif Function Examples
    • MROUND in Excel
    • SUM Cells in Excel
    • MMULT in Excel
    • MINVERSE in Excel
    • Trunc in Excel
    • SUMIF with Text
    • COS Function in Excel
    • RANDBETWEEN in Excel
    • Excel SUMIF with OR
    • Excel DEGREES Function
    • Calculations in Excel
    • Sumif Between Two Dates
    • Calculate Income Tax in Excel
    • PRODUCT Function in Excel
    • How to Sum Multiple Rows in Excel
    • Matrix in Excel
    • ROUND Formula in Excel
    • How to SUM in Excel
    • SUMPRODUCT Formula in Excel
    • Excel Running Total
    • Excel Rounding
    • Excel Exponents
    • Excel SIN Function
    • Excel Square Root Function
    • Excel ROUNDUP Function
    • ROUND Excel Function
    • Excel ROUNDDOWN Function
    • ODD Excel Function
    • SUMPRODUCT Function in Excel
    • AGGREGATE Function in Excel
    • ABS Function in Excel
    • Excel TAN Function
    • COMBIN Function in Excel
    • CEILING Function in Excel
    • INT Excel Function
    • SUBTOTAL Function in Excel
    • LN Function in Excel
    • Excel RAND Function
    • TANH Function in Excel
    • SUMIF Function in Excel
    • SUM Function in Excel
    • POWER Function in Excel
    • EVEN Function in Excel
    • LOG Function in Excel
    • FLOOR Excel Function
  • Excel Functions (12+)
  • Excel Tools (114+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (14+)
  • Lookup and Reference Functions in Excel (36+)
  • TEXT and String Functions in Excel (26+)
  • Date and Time Function in Excel (24+)
  • Statistical Functions in Excel (59+)
  • Information Functions in Excel (4+)
  • Excel Charts (56+)
  • Excel Tips (220+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (15+)
  • Excel Formula and Functions (22+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • Online EXCEL ADVANCED Certification
  • Excel for HR Training

COS Function in Excel

By Madhuri ThakurMadhuri Thakur

COS in Excel

COS Function (Table of Content)

  • COS in Excel
  • How to Use COS Function?

Excel COS Function

Cos function in excel is a mathematical function that calculates the Cos value of any angle. As we know, Cos angle is the ratio of Base to Hypotenuse, but in excel, we need to select radians function here along with COS Function to get the proper angle value. Also, we can multiply the input angel value with Pi()/180 other than using the Radians function.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

It comes under head Formulas and the Math & Trig. The screenshot is given below:

COS Steps

We can see in the above pic that the COS is the formula for trigonometry in Mathematics. This function is built of MS Excel. The function of the COS is that it returns the cosine of a given angle in radians. We can calculate the angle by using the RADIANS function, or we can multiply it by PI()/180. It can be used as a worksheet function (WS) and VBA function, and Microsoft Excel. If we are using it in the worksheet function, we can enter the formula in a cell of a worksheet, and if we are using it through VBA, it should be entered as macro code in Microsoft Visual Basic Editor.

COS Formula in Excel:

Below is the COS Formula.

COS Formula

This formula has one argument, which is number, and it is the mandatory parameter.

Number: this is the which shows the angle for which the calculation of cosine is going to occur.

We can also use this formula just entering into one cell as =COS(number) in Microsoft Excel.

How COS Function Works?

As we know, Trigonometry is a branch of mathematics in which we study about the relations between the elements of a triangle which is as sides and angles. Microsoft Excel has lots of Trigonometry function which is inbuilt, to help complex problems of the same. The user has to keep in mind while solving or using these functions that Microsoft Excel performs the result or calculation considering angle value in radians but not in degrees, which makes the process different from doing it manually.

For example, we know that COS 30 = 0.866, but when we enter directly, it will result as 0.154, so we have to convert in radians and then calculate the COS on radians.

How to Use the COS Function in Excel?

This COS Function is very easy to use. Let us now see how to use the COS function in Excel with the help of some examples.

Example #1

As we discussed, first, we need to calculate the Radians for the given angle, and then we will calculate the COS.

Step 1: First, we will take the raw data for which COS needs to be calculated. Below is the picture:

COS Example 1-1

Step 2: Now, we have to click on Formulas and under that Math & Trig. We can see this step in below pic:

Formulas Tab Example 1-2

So, we can see that there are lots of functions listed in this category.

Step 3: Now, we have to go on option Radian and click it. We can see this step in below pic:

option Radian Example 1-3

Step 4: Now, we have to select B4 as an angle to achieve the result and then click Enter. Please refer to the below pic:

COS Example 1-4

After pressing Enter, the result will be shown like below:

COS Example 1-4-1

Step 5: Now, we can drag the formula to each degree, like shown in the below screenshot.

COS Example 1-5

So, we have the Radians ready; now, we have to calculate the COS for these Radians.

Step 6: We have to repeat step 1 & step 2 and select the COS option. Below is the picture for reference.

Math & Trignometric Function Example 1-6

Step 7: Now, we have to click on COS, select the C4, and press Enter or click OK.

Function Argument Example 1-7

After clicking OK, we have the below result:

COS Example 1-7-1

Step 8: We can drag the formula for D5 to D8, and we will have the result.

COS Example 1-8

So, we have the results ready. We understood from the above step that firstly, RADIANS need to be calculated before calculating COS. After calculating RADIANS, we have to calculate the COS on that RADIANS, and it will give the desired result, which will be COSINE for each angle.

Example #2

As we discussed earlier, we can use it in the VBA code as well as in Microsoft Excel. So, below is one of the codings to use the COS function as a VBA code.

Dim LNumber As Double

LNumber = COS(5)

The Lnumber above is 0.523598776, which is as a variable.

Example #3

We will see in VBA to apply on degree 30.

So, below is the solution:

Dim val As Double

‘Convert 30 degrees to RADIANS by multiplying by PI/180.

Val = COS(30*PI/180)

‘The variable value is now equal to 0.86602.

So, in the above formula, angle 30 is converted into radians first and then COS.

Things to Remember

  • If the angle is given in degrees for which we have to calculate COS, we have to calculate RADIANS for the same, or we can multiply the angle by PI()/180.
  • COS always uses the parameter as RADIANS.

Recommended Articles

This has been a guide to COS Function. Here we discuss the COS Formula and how to use the COS function along with practical examples and downloadable excel templates. You can also go through our other suggested articles –

  1. Excel XIRR Function
  2. Excel SIN Function
  3. EOMONTH Function Excel
  4. Excel DEGREES Function
Popular Course in this category
Excel Advanced Training (16 Courses, 23+ Projects)
  16 Online Courses |  23 Hands-on Projects |  140+ Hours |  Verifiable Certificate of Completion
4.8
Price

View Course

Related Courses

Excel for HR Training (8 Courses, 10+ Projects)4.9
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more