EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Excel Excel Resources Maths Function in Excel COS Function in Excel
 

COS Function in Excel

Madhuri Thakur
Article byMadhuri 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.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

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

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - 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
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

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

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

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*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?

🚀 Limited Time Offer! - 🎁 ENROLL NOW