COS function
COS returns the cosine of an angle, a value from -1 to 1. The angle must be in radians, so convert degrees first with RADIANS or the answer will be wrong.
Example
Read it as a sentence: turn 60 degrees into radians, then find its cosine, which gives 0.5.
A
B
C
D
1
0.5
2
3
Syntax
COS(number)
-
number(required) - An angle in radians.
Returns: The cosine, a value from -1 to 1.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=COS(0.5) | 0.877582562 | Positive |
=COS(0) | 1 | Zero |
=COS(-0.5) | 0.877582562 | Negative |
=COS(2) | -0.416146837 | Larger value |
=COS("0.5") | 0.877582562 | Text number "0.5" |
=COS(TRUE) | 0.540302306 | TRUE |
=COS("abc") | #VALUE! | Non-numeric text |
=COS(2^27) | #NUM! | 2^27 limit |
Watch out for
- Passing degrees directly gives a wrong answer; use RADIANS.
Where it works
- Excel
- COS is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Math and trig functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .