HomePrivacy PolicyFeedbackLink to usSite Map

MS Excel: Cos Function


In Excel, the Cos function returns the cosine of an angle.

The syntax for the Cos function is:

Cos( number )

number is a numeric value.


Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000

For example:

Let's take a look at an example:

Based on the Excel spreadsheet above:

=Cos(A1) would return 0.980066578
=Cos(A2) would return 0.939372713
=Cos(A3) would return -0.999964658
=Cos(200) would return 0.487187675

VBA Code

The Cos function can also be used in VBA code. For example:

Dim LNumber As Double

LNumber = Cos(210)

In this example, the variable called LNumber would now contain the value of -0.883877473.