Practice free

COMPLEX function

COMPLEX builds a complex number from its real and imaginary parts and returns it as text such as 3+4i. It is used in electrical and signal engineering.

Example

Read it as a sentence: build a complex number with real part 3 and imaginary part 4, which gives 3+4i.

Practice this in the app

Syntax

COMPLEX(real_num, i_num, [suffix])

Arguments in [square brackets] are optional.

real_num (required)
The real part.
i_num (required)
The imaginary part.
suffix (optional)
"i" (default) or "j".

Returns: Complex number as text such as "3+4i".

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=COMPLEX(3,4) 3+4i 3,4
=COMPLEX(3,4,"j") 3+4j Suffix j
=COMPLEX(3,4,"") 3+4i Suffix empty string
=COMPLEX(3,0) 3 Imag 0
=COMPLEX(0,4) 4i Real 0
=COMPLEX(0,1) i Imag 1
=COMPLEX(3,4,"I") #VALUE! Suffix I uppercase
=COMPLEX(3,4,"x") #VALUE! Suffix x

Watch out for

  • Result is text, so use the IM functions to work with it.
  • Suffix must be lowercase i or j.

Where it works

Excel
COMPLEX 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 .