Returns the cosine of an angle given in radians. Essential for trigonometry, wave analysis, engineering calculations, and periodic function modeling. Cosine values range from -1 to 1.
Master the fundamentals of Excel COS function
The COS function returns the cosine of an angle given in radians. Cosine is one of the fundamental trigonometric functions, representing the x-coordinate on the unit circle. COS returns values between -1 and 1 and creates a periodic wave pattern. Essential for trigonometry, wave analysis (sine waves, sound, light), engineering calculations, and modeling periodic phenomena.
Input angle must be in radians
Output is always between -1 and 1
Repeats every 2π radians (360°)
cos(0°)=1, cos(60°)=0.5, cos(90°)=0, cos(180°)=-1
Function-specific parameters
Function-specific return type
Solve triangle problems and angle calculations
Model periodic waves and oscillations
Calculate forces, vectors, and rotations
Perform scientific and mathematical analysis
Exact matching required
Returns numeric position
Handles missing text gracefully
=COS(number)The angle in radians for which you want the cosine. If angle is in degrees, use RADIANS() to convert first.
The cosine of the angle (between -1 and 1)
Description: Returns the cosine of an angle given in radians
Calculate cosine of angle
Returns 1 because cos(0°) = 1. COS(0) = cos(0 radians) = cos(0°) = 1.
Use COS function in VBA
' Basic COS in VBA
Range("C1").Value = Application.WorksheetFunction.Cos(Application.WorksheetFunction.Radians(60))
' Returns: 0.5
' Calculate cosine of angle in degrees
Sub CalculateCosine()
Dim angleDegrees As Double
angleDegrees = Range("A1").Value
Dim angleRadians As Double
Dim cosine As Double
angleRadians = Application.WorksheetFunction.Radians(angleDegrees)
cosine = Application.WorksheetFunction.Cos(angleRadians)
Range("B1").Value = cosine
End Sub
' Generate cosine wave
Sub GenerateCosineWave()
Dim i As Integer
For i = 0 To 360 Step 10
Dim angleRadians As Double
Dim cosine As Double
angleRadians = Application.WorksheetFunction.Radians(i)
cosine = Application.WorksheetFunction.Cos(angleRadians)
Range("A" & (i / 10 + 1)).Value = i
Range("B" & (i / 10 + 1)).Value = cosine
Next i
End Sub
' Calculate adjacent side in triangle
Sub TriangleAdjacent()
Dim angleDegrees As Double, hypotenuse As Double
angleDegrees = Range("A1").Value
hypotenuse = Range("B1").Value
Dim adjacent As Double
adjacent = Application.WorksheetFunction.Cos( _
Application.WorksheetFunction.Radians(angleDegrees)) * hypotenuse
Range("C1").Value = adjacent
End SubCalculate adjacent side in right triangle
Generate cosine wave pattern
Calculate horizontal component of vector
Model periodic phenomena
COS returns unexpected value with degrees
=COS(RADIANS(60)) not =COS(60)Solution: COS requires radians, not degrees. Always convert: COS(RADIANS(degrees)). COS(60) is not cos(60°), it's cos(60 radians).
COS returns unexpected results
Always use COS(RADIANS(angle)) for degreesSolution: Check if angle is in radians. Use RADIANS() for degrees. Verify: COS(RADIANS(0)) = 1, COS(RADIANS(90)) = 0.
COS results have unexpected precision
=ROUND(COS(RADIANS(60)), 4)Solution: Use ROUND for display: ROUND(COS(RADIANS(angle)), digits). COS can return values very close to 0 that may display as scientific notation.
Uncertainty about COS vs ACOS relationship
COS(ACOS(0.5)) = 0.5Solution: COS is inverse of ACOS: COS(ACOS(value)) = value (if value is between -1 and 1). ACOS(COS(angle)) = angle (in radians).