← All functions

IMAGINARY

Supported, behaves as documented

Category: Engineering · Last tested 2026-09-01

Real compatibility results for the IMAGINARY function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.

Support matrix

EngineDocumentedLive-testedVerdict
Excel (desktop)Yes No — documented only n/a
Excel for the web— Yes (recalc, 2026-09-01) Supported, behaves as documented
Google SheetsYes Yes (Drive import, 2026-08-31) Supported, behaves as documented
LibreOffice CalcYes Yes (25.8.7.3, 2026-08-31) Supported, behaves as documented

LibreOffice version history

We executed the same test cases under each LibreOffice release to show exactly when IMAGINARY’s support changed — not documentation claims, real results.

LibreOffice versionVerdictTested
24.2.0.3 Supported, behaves as documented 2026-08-31
24.8.7.2 Supported, behaves as documented 2026-08-31
25.2.0.3 Supported, behaves as documented 2026-08-31
25.8.7.3 Supported, behaves as documented 2026-08-31

Executed test cases

Excel for the web (executed 2026-09-01 via OneDrive recalculation)

These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.

FormulaDescriptionResultExpectedVerdict
=IMAGINARY("3+4i") Microsoft's first worked example: the imaginary coefficient of 3+4i 4 4
Provenance

Microsoft publishes '=IMAGINARY("3+4i")' with the result 4. Read directly off the documented x + yi form, where y is the imaginary coefficient.

Matched
=IMAGINARY("0-j") Microsoft's second worked example: a j suffix, no explicit coefficient, negative sign -1 -1
Provenance

Microsoft publishes '=IMAGINARY("0-j")' with the result -1. Three separate parsing rules have to hold at once for this: the j suffix is accepted (Microsoft documents every IM* function as accepting "a complex number in x + yi or x + yj text format", so the j suffix is not an alternative spelling this corpus invented -- it is half of the documented input grammar, and an engine that parses only the i form is incompatible on documented input.), an absent coefficient means 1, and the sign attaches to that implied 1. This is the richest single parsing case Microsoft publishes anywhere in the IM* family.

Matched
=IMAGINARY(4) Microsoft's third worked example: a plain real number has imaginary coefficient 0 0 0
Provenance

Microsoft publishes '=IMAGINARY(4)' with the result 0 -- and it is the line that establishes, for the whole family, that a bare number is a legal complex argument.

Matched
=IMAGINARY("i") The bare imaginary unit with no sign and no real part 1 1
Provenance

The positive counterpart of Microsoft's published "0-j" example: an absent coefficient means 1, so IMAGINARY("i") is +1. Asserted because "i" is the form Excel prints for the unit imaginary, so an engine that cannot read it cannot consume its own output.

Matched

Google Sheets (executed 2026-08-31 via Drive import)

Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.

FormulaDescriptionResultExpectedVerdict
=IMAGINARY("3+4i") Microsoft's first worked example: the imaginary coefficient of 3+4i 4 4
Provenance

Microsoft publishes '=IMAGINARY("3+4i")' with the result 4. Read directly off the documented x + yi form, where y is the imaginary coefficient.

Matched
=IMAGINARY("0-j") Microsoft's second worked example: a j suffix, no explicit coefficient, negative sign -1 -1
Provenance

Microsoft publishes '=IMAGINARY("0-j")' with the result -1. Three separate parsing rules have to hold at once for this: the j suffix is accepted (Microsoft documents every IM* function as accepting "a complex number in x + yi or x + yj text format", so the j suffix is not an alternative spelling this corpus invented -- it is half of the documented input grammar, and an engine that parses only the i form is incompatible on documented input.), an absent coefficient means 1, and the sign attaches to that implied 1. This is the richest single parsing case Microsoft publishes anywhere in the IM* family.

Matched
=IMAGINARY(4) Microsoft's third worked example: a plain real number has imaginary coefficient 0 0 0
Provenance

Microsoft publishes '=IMAGINARY(4)' with the result 0 -- and it is the line that establishes, for the whole family, that a bare number is a legal complex argument.

Matched
=IMAGINARY("i") The bare imaginary unit with no sign and no real part 1 1
Provenance

The positive counterpart of Microsoft's published "0-j" example: an absent coefficient means 1, so IMAGINARY("i") is +1. Asserted because "i" is the form Excel prints for the unit imaginary, so an engine that cannot read it cannot consume its own output.

Matched

LibreOffice Calc 25.8.7.3 (tested 2026-08-31)

FormulaDescriptionResultExpectedVerdict
=IMAGINARY("3+4i") Microsoft's first worked example: the imaginary coefficient of 3+4i 4 4
Provenance

Microsoft publishes '=IMAGINARY("3+4i")' with the result 4. Read directly off the documented x + yi form, where y is the imaginary coefficient.

Matched
=IMAGINARY("0-j") Microsoft's second worked example: a j suffix, no explicit coefficient, negative sign -1 -1
Provenance

Microsoft publishes '=IMAGINARY("0-j")' with the result -1. Three separate parsing rules have to hold at once for this: the j suffix is accepted (Microsoft documents every IM* function as accepting "a complex number in x + yi or x + yj text format", so the j suffix is not an alternative spelling this corpus invented -- it is half of the documented input grammar, and an engine that parses only the i form is incompatible on documented input.), an absent coefficient means 1, and the sign attaches to that implied 1. This is the richest single parsing case Microsoft publishes anywhere in the IM* family.

Matched
=IMAGINARY(4) Microsoft's third worked example: a plain real number has imaginary coefficient 0 0 0
Provenance

Microsoft publishes '=IMAGINARY(4)' with the result 0 -- and it is the line that establishes, for the whole family, that a bare number is a legal complex argument.

Matched
=IMAGINARY("i") The bare imaginary unit with no sign and no real part 1 1
Provenance

The positive counterpart of Microsoft's published "0-j" example: an absent coefficient means 1, so IMAGINARY("i") is +1. Asserted because "i" is the form Excel prints for the unit imaginary, so an engine that cannot read it cannot consume its own output.

Matched

Docs & syntax