IMAGINARY function
IMAGINARY returns the imaginary part of a complex number as a number, not text. A complex number is one written in x+yi form, such as 3+4i.
Example
Read it as a sentence: pull out the imaginary part of the complex number 3+4i, which gives 4.
A
B
C
D
1
4
2
3
Syntax
IMAGINARY(inumber)
-
inumber(required) - A complex number as text, like "3+4i".
Returns: The imaginary coefficient as a number.
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 |
|---|---|---|
=IMAGINARY("3+4i") | 4 | "3+4i" |
=IMAGINARY("3+4j") | 4 | Suffix j |
=IMAGINARY(5) | 0 | Pure real number 5 |
=IMAGINARY("5") | 0 | Pure real text "5" |
=IMAGINARY("i") | 1 | Pure imaginary "i" |
=IMAGINARY("-2i") | -2 | "-2i" |
=IMAGINARY("3+4I") | #NUM! | Uppercase I |
=IMAGINARY("abc") | #NUM! | Invalid text |
Watch out for
- Returns a number, not text.
Where it works
- Excel
- IMAGINARY 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 .