COMPLEX function

Combines real and imaginary numbers into a complex number text string, essential for mathematical and engineering computation.

=COMPLEX(real_num, i_num, [suffix])

Generate a COMPLEX formula

Describe what you need. The generator will reach for COMPLEX where COMPLEX is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How COMPLEX reads its arguments
real_numrequiredi_numrequiredsuffixoptionalCOMPLEX
ArgumentRequiredDescription
real_numRequiredRequired. The real (non-imaginary) component of the complex number, as a numeric value or cell reference; text values cause #VALUE!.
i_numRequiredRequired. The imaginary coefficient, as a numeric value or cell reference; negative values display correctly (e.g., 3−5i); text values cause #VALUE!.
suffixOptionalOptional. Either 'i' (default) or 'j'; if omitted, COMPLEX uses 'i'; any other value triggers #VALUE!.

Returns

Text in the format 'real+imaginaryi' (or 'real+imaginaryj' if suffix='j').

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Combine ticket priority and satisfaction score

Ticket IDPriorityCSAT
TK-10139
=COMPLEX(3, 9)

Result: 3+9i

For ticket TK-101 with priority level 3 and customer satisfaction score 9, COMPLEX formats these into the text string '3+9i'. This representation enables analytical tools to process ticket metrics as complex numbers for statistical modeling.

2. Format support metrics using engineering notation

Ticket IDDays OpenPriority
TK-10261
=COMPLEX(6, 1, "j")

Result: 6+1j

For ticket TK-102 open for 6 days with priority 1, COMPLEX creates '6+1j' using j-notation (standard in electrical engineering). The 'j' suffix distinguishes this from mathematical convention and is required for domain-specific applications.

3. Aggregate averaged support metrics

MetricValue
Avg Days to Close3.2
Avg CSAT7.8
=COMPLEX(3.2, 7.8)

Result: 3.2+7.8i

When combining average performance metrics—3.2 days to closure and 7.8 CSAT across five tickets—COMPLEX creates '3.2+7.8i' for trend analysis. Complex number format allows mathematical libraries to process multiple correlated metrics simultaneously.

Common errors

Which COMPLEX error are you seeing?
COMPLEX returned an error#VALUE!
Ensure both arguments are numeric columns; for this dataset, use Priority and CSAT columns, not Agent or Ticket ID.
#VALUE!
Use only lowercase 'i' or 'j'; omit the suffix entirely for default 'i' notation, or verify the suffix cell contains only the character you intend.
#VALUE!
Wrap error-prone formulas in IFERROR: =COMPLEX(IFERROR(real_calc, 0), IFERROR(imag_calc, 0)).
ErrorWhy it happensHow to fix it
#VALUE!real_num or i_num references a cell containing text (e.g., 'Sarah' or 'urgent') that cannot convert to a number.Ensure both arguments are numeric columns; for this dataset, use Priority and CSAT columns, not Agent or Ticket ID.
#VALUE!suffix argument is not exactly 'i' or 'j'—including uppercase 'I' or 'J', or invalid characters like 'x' or 'imaginary'.Use only lowercase 'i' or 'j'; omit the suffix entirely for default 'i' notation, or verify the suffix cell contains only the character you intend.
#VALUE!A formula in real_num or i_num returns an error (e.g., #DIV/0! or #N/A from a lookup), and COMPLEX cannot process error values.Wrap error-prone formulas in IFERROR: =COMPLEX(IFERROR(real_calc, 0), IFERROR(imag_calc, 0)).

Tips and when to use something else

  • COMPLEX only formats complex numbers as text—it does not perform arithmetic. To add or multiply complex numbers, use IMREAL() and IMAGINARY() to extract components, then calculate separately.
  • Extract components from a COMPLEX result using IMREAL(COMPLEX(3,4)) for the real part or IMAGINARY(COMPLEX(3,4)) for the imaginary part, enabling further calculations.
  • Always use lowercase 'i' or 'j' for the suffix; case-sensitive spreadsheet implementations will reject 'I' or 'J'.
  • COMPLEX returns text, not numbers—cells will not sum with numeric columns. Use IMREAL/IMAGINARY to isolate numeric components for aggregation.

Frequently asked questions

What's the difference between 'i' and 'j' notation for complex numbers?
In mathematics, 'i' represents √−1; in electrical engineering, 'j' is used to avoid confusion with electrical current (I). COMPLEX defaults to 'i' but supports 'j' for domain-specific work. Both formats are mathematically equivalent—choose based on your application's standard.
Can I use negative numbers in COMPLEX?
Yes. Negative real or imaginary components work directly: =COMPLEX(−3, 5) returns '−3+5i', and =COMPLEX(2, −7) returns '2−7i'. COMPLEX handles all real numbers, positive, negative, and zero without special handling.
How do I calculate with complex numbers after using COMPLEX?
COMPLEX creates formatted text, not a computational complex type. Extract components using IMREAL() and IMAGINARY(), perform arithmetic on those values separately, then reconstruct with COMPLEX if needed. For advanced complex arithmetic, consider external tools like Python scipy or MATLAB.
Why would I use COMPLEX in spreadsheets if it doesn't calculate?
COMPLEX is invaluable for data export, technical documentation, and importing into specialized math software that expects standard complex notation. It ensures precise formatting and bridges spreadsheets with engineering and scientific workflows that require complex number interchange.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17