Engineering function

IMAGINARY function

Returns the imaginary coefficient of a complex number, for example 4 from "3+4i". The result is an ordinary number.

Available in Excel 2007 and later (Excel 2003 needed the Analysis ToolPak add-in), Microsoft 365, Excel for the web, Excel for Mac

Excel 2007 and laterWorks in Google Sheets

Syntax

IMAGINARY(inumber)
ArgumentWhat it means
inumberRequiredA complex number as text such as "3+4i" or "5-2j", a cell containing one, or a plain number. Build it with COMPLEX to avoid typing errors.

Returns: A number: the imaginary coefficient y of x+yi.

How IMAGINARY works

IMAGINARY extracts the imaginary part of a complex number stored as text: for 3+4i it returns 4, for 5-2j it returns -2. It is the partner of IMREAL, and together they let you take the text that IM functions produce and turn it back into normal numbers for charts, rounding or comparisons.

The result is a number, not text. A pure real number such as "7" has an imaginary part of 0, and a bare "i" or "-j" has an imaginary part of 1 or -1. In AC circuit work the imaginary part of an impedance is the reactance.

Examples

1Imaginary part of 3+4i

B2fx=IMAGINARY(A2)
AB
1Complex
23+4i4

Result: 4

The coefficient of i is 4.

2Reactance of an impedance

B2fx=IMAGINARY(A2)
AB
1Impedance (Ω)
20-j-1

Result: -1

0-j has a real part of 0 and an imaginary coefficient of -1, so the reactance is -1 Ω (capacitive).

3Clean a rounding residue

B2fx=ROUND(IMAGINARY(A2), 10)
AB
1Result of IMEXP
2-1+1.22464679914735E-16i0

Result: 0

Some IM functions leave a tiny imaginary part where the exact answer is 0. Extracting it with IMAGINARY and rounding shows that it is really 0.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#NUM!The text is not a valid complex number — for example it contains spaces (3 + 4i), a capital I, or a misplaced sign.Create the value with COMPLEX or remove spaces with SUBSTITUTE.

Tips

  • Rebuild a tidied complex number with =COMPLEX(ROUND(IMREAL(A2),6), ROUND(IMAGINARY(A2),6)).

Google Sheets

IMAGINARY also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

IMAGINARY in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishIMAGINÆR
DutchC.IM.DEEL
FinnishKOMPLEKSI.IMAG
FrenchCOMPLEXE.IMAGINAIRE
GermanIMAGINÄRTEIL
HungarianKÉPZETES
ItalianCOMP.IMMAGINARIO
Norwegian (Bokmål)IMAGINÆR
PolishCZ.UROJ.LICZBY.ZESP
Portuguese (Brazil)IMAGINÁRIO
Portuguese (Portugal)IMAGINÁRIO
RussianМНИМ.ЧАСТЬ
SpanishIMAGINARIO
SwedishIMAGINÄR
TurkishSANAL