IMCOS function
IMCOS returns the cosine of a complex number as text in complex number form. To get a plain number, wrap the result in IMREAL or IMAGINARY.
Example
Read it as a sentence: find the cosine of the complex number 1+i, then keep only its real part, which gives 0.833730025131149.
A
B
C
D
1
0.833730025131149
2
3
Syntax
IMCOS(inumber)
-
inumber(required) - A complex number as text, like "3+4i".
Returns: The result as a complex number in text form.
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 |
|---|---|---|
=IMCOS("3+4i") | -27.0349456030742-3.85115333481178i | "3+4i" |
=IMCOS("3+4j") | -27.0349456030742-3.85115333481178j | Suffix j |
=IMCOS(5) | 0.283662185463226 | Pure real number 5 |
=IMCOS("5") | 0.283662185463226 | Pure real text "5" |
=IMCOS("i") | 1.54308063481524 | Pure imaginary "i" |
=IMCOS("-2i") | 3.76219569108363 | "-2i" |
=IMCOS("3+4I") | #NUM! | Uppercase I |
=IMCOS("abc") | #NUM! | Invalid text |
Watch out for
- Result is text; wrap in IMREAL or IMAGINARY to get a number.
Where it works
- Excel
- IMCOS is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Engineering functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .