Practice free

IMLOG2 function

IMLOG2 returns the base-2 logarithm of a complex number as text in complex number form. To get a plain number, wrap the result in IMREAL or IMAGINARY.

Example

Read it as a sentence: find the base 2 log of the complex number 1+i, then keep only its real part, which gives 0.5.

Practice this in the app

Syntax

IMLOG2(inumber)

inumber (required)
A complex number as text, like "3+4i".

Returns: The result as a complex number in text form.

What Excel actually returns

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

FormulaExcel showsCase
=IMLOG2("3+4i") 2.32192809488736+1.33780421245098i "3+4i"
=IMLOG2("3+4j") 2.32192809488736+1.33780421245098j Suffix j
=IMLOG2(5) 2.32192809488736 Pure real number 5
=IMLOG2("5") 2.32192809488736 Pure real text "5"
=IMLOG2("i") 2.2661800709136i Pure imaginary "i"
=IMLOG2("-2i") 1-2.2661800709136i "-2i"
=IMLOG2(0) #NUM! Zero
=IMLOG2("3+4I") #NUM! Uppercase I

Watch out for

  • Result is text; wrap in IMREAL or IMAGINARY to get a number.

Where it works

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