# The Excel IMLN Function

Related Function:
IMEXP Function
Natural Logarithm of a Complex Number

The natural logarithm of a complex number is calculated by the following equation:

See Wikipedia for further information on complex numbers.

## Function Description

The Excel Imln function returns the natural logarithm of a supplied complex number.

The syntax of the function is:

IMLN( inumber )

where the inumber argument is the complex number that you want the natural logarithm of.

### Complex Numbers in Excel

Note that complex numbers are simply stored as text in Excel. When a text string in the format "a+bi" or "a+bj" is supplied to one of Excel's built-in complex number functions, this is interpreted as a complex number.

Also the complex number functions can accept a simple numeric value, as this is equivalent to a complex number whose imaginary coefficient is equal to 0.

Therefore, the inumber argument can be supplied to the Excel Imln function as any of the following:

• A simple number;
• A complex number encased in quotation marks - e.g. "5+3i";
• A reference to a cell containing a complex number or a numeric value;
• A value returned from another Excel function or formula.

## Imln Function Examples

The spreadsheets below show four examples of the Imln function:

Formulas:
A B
1   =IMLN( 2 )
2   =IMLN( "1-2i" )
3 2.5-i =IMLN( A3 )
4   =IMLN( COMPLEX( 1, -1 ) )
Results:
A B
1   0.693147180559945
2   0.80471895621705-1.10714871779409i
3 2.5-i 0.990500734433292-0.380506377112365i
4   0.346573590279973-0.785398163397448i

Note that, in the above example spreadsheet:

• The integer 2, used in cell B1, is equal to the complex number 2+0i;
• The example in cell B4 uses the Excel Complex Function to create the complex number 1-i.

Further details and examples of the Excel Imln function are provided on the Microsoft Office website

## Imln Function Errors

If you get an error from the Excel Imln Function, this is likely to be one of the following:

Common Errors
 #NUM! - Occurs if the supplied inumber argument is not recognised as a complex number. #VALUE! - Occurs if the supplied inumber argument is a logical value.
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}