Excel function

LNfunction

Returns the natural logarithm (base e) of a number.

All versions
=LN(A2)
A
B
1
2
3
4
5
6
7

Click a cell in the table to change number. Click the negative value -2.5. Logs exist only for positive numbers, so you get #NUM!. Try breaking it on purpose to see the errors.

Result

1.1447290412

number
A2You can also click a cell in the table

The cell with the number to calculate. Click another value in the table.

What is the LN function?

=LN(number)

LN returns the natural logarithm, the log with base e (about 2.71828). It is the inverse of EXP, so LN(EXP(3)) is 3.

It is common for continuous growth rates and log returns. The number must be greater than 0.

LN handles calculations about ratios of change: continuous compounding, log returns, the time it takes to double. Taking logs turns multiplication into addition, so changes over several periods can be added up or averaged.

Arguments

number
A positive real number. 0 or a negative number returns #NUM!.

LN examples

  1. Example 1. Log of e

    =LN(EXP(1))

    1, because EXP(1) is e.

  2. Example 2. Log of 86

    =LN(86)

    An example from Microsoft: about 4.454.

  3. Example 3. Log return

    =LN(B3/B2)

    The continuous return between two prices.

  4. Example 4. Natural logs of different values

    =LN(A2)

    Numbers below 1 have negative logs.

    A2=LN(A2)
    10
    EXP(1)1
    10about 2.303
    0.5about -0.693
  5. Example 5. Years to double

    =LN(2)/LN(1+B2)

    At 5% a year compounded, money doubles in about 14.2 years.

Common mistakes

FAQ

How is it different from LOG?
LOG lets you choose the base (10 if omitted). LN always uses e.
How do I reverse it?
Use EXP: EXP(LN(x)) = x.