LN
Returns the natural logarithm of a positive number.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=LN(number)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
number | number | Required | — |
Remarks
LN(EXP(x))returnsxup to floating-point precision.- Input errors are propagated.
Error cases
numbermust be greater than0; otherwise the function returns#NUM!.
Examples
Evaluate the logarithm of a positive number above one.
Formula =LN(100)
Expected result 4.60517018598809
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A positive value below one gives a negative logarithm.
Formula =LN(0.01)
Expected result -4.60517018598809
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
The logarithm of one is zero.
Formula =LN(1)
Expected result 0
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Zero is outside the real logarithm domain.
Formula =LN(0)
Expected result #NUM!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Natural log of e cubed
Formula =LN(EXP(3))
Expected result 3
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Natural log of a fraction
Formula =LN(0.5)
Expected result -0.693147180559945
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Why does LN return #NUM! for 0 or negatives?
Natural logarithm is only defined for strictly positive inputs.