Summary

The Excel COMPLEX function returns the string representation of a complex number.

Purpose 

Get the string representation of a complex number

Return value 

The string representation of a complex number

Syntax

=COMPLEX(real_num,i_num,[suffix])
  • real_num - The real part of the complex number.
  • i_num - The imaginary part of the complex number.
  • suffix - [optional] The suffix for the imaginary unit, either "i" or "j".

How to use 

The COMPLEX function returns the string representation of a complex number. For example:

=COMPLEX(4,3) // returns "4+3i"

To use the "j" instead of "i":

=COMPLEX(4,3,"j") // returns "4+3j"

To enter the value of a complex number without using the COMPLEX function, write it in a formula like this:

="4+3i"

Explanation

The Excel formula engine handles complex numbers as strings formatted like "x+yi" or "x+yj". For example, when we add two complex numbers together using the IMSUM function, the complex numbers are passed to the function as strings, and the result is a string representing the complex number that is the sum.

=IMSUM("4+3i","2-5i") // returns "6-2i"

We can perform the same operation using COMPLEX to get the strings representing the complex numbers.

=IMSUM(
    COMPLEX(4, 3),
    COMPLEX(2,-5)
) // returns "6-2i"

In general, The COMPLEX function is useful when you already have a complex number's real and imaginary values and want its string representation.

To read more about complex numbers in Excel, see this article.

Notes:

  1. If omitted, the suffix defaults to "i".
  2. The suffix must be lowercase "i" or "j"; other values result in a #VALUE error.
  3. If real_num or i_num are non-numeric, COMPLEX returns the #VALUE! error
Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.