Skip to content

LN

Returns the natural logarithm of a number: the power you raise e to in order to get it. LN undoes EXP.

Syntax

=LN()

Math and trigonometry

All versions of Excel.

Try it

Edit the formula in B2 or change the inputs. The sheet recalculates as you type.

B2
A
B
C
1
Number
LN
2
1
0
3

B2 =LN(A2) returns 0

How LN works

LN returns the natural logarithm, the power to which e (about 2.71828) must be raised to give your number. =LN(10) is about 2.3026, because e to the power 2.3026 is 10. It is the inverse of EXP: =LN(EXP(2)) returns 2.

Why it is useful: growth rates

Logarithms turn multiplication into addition, which is why growth calculations use them. The continuous growth rate that takes a value from 1,500 to 1,800 over one period is =LN(1800/1500), about 0.1823 or 18.2%. Spread over several periods, divide by the number of periods: =LN(end/start)/years.

This is the continuous rate that matches the formula end = start * EXP(rate * years). It differs slightly from the compound annual growth rate, (end/start)^(1/years)-1, which is a rate applied once a year. Check which one the report asks for.

Doubling time

How long does a quantity take to double at a given growth rate? Solve (1+r)^t = 2 for t:

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

At 5% growth this is about 14.2 periods. For continuous growth at rate r the answer is simpler, =LN(2)/r, about 13.9. The well-known "rule of 72" is an approximation of these formulas.

Other uses

  • Log returns in finance: =LN(P2/P1) is the continuously compounded return between two prices, and log returns add up across periods.
  • Transforming skewed data before charting or regression, since logs pull in long right-hand tails.
  • Solving exponent problems where the unknown is a power of e.

LN, LOG and LOG10

LOG takes any base and defaults to 10, and LOG10 is always base 10. LN is always base e. They are related: =LOG(x, EXP(1)) equals =LN(x).

Errors

LN needs a positive number. =LN(0) and =LN(-5) return #NUM!, because no power of e gives zero or a negative result. If a ratio such as end divided by start can be zero or negative, test it first with IF. Text returns #VALUE!.

Arguments

number
A positive number, such as B2/B1 for a growth ratio. Zero or a negative number returns #NUM!.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

LN(1) is 0

B2 =LN(A2)

Result: 0

e to the power 0 is 1, so the natural log of 1 is 0.

B2
A
B
C
1
Number
LN
2
1
0
3

B2 =LN(A2) returns 0

Example 2

LN of 10, to six decimals

B2 =ROUND(LN(A2),6)

Result: 2.302585

e raised to 2.302585 is 10.

B2
A
B
C
1
Number
LN
2
10
2.302585
3

B2 =ROUND(LN(A2),6) returns 2.302585

Example 3

Continuous growth rate between two values

C2 =ROUND(LN(B2/A2),4)

Result: 18.23%

1,800 / 1,500 is 1.2, and the natural log of 1.2 is about 0.1823, or 18.23% continuous growth.

C2
A
B
C
1
Start
End
Rate
2
1500
1800
18.23%
3

C2 =ROUND(LN(B2/A2),4) returns 18.23%

Example 4

Years to double at 5% growth

B2 =ROUND(LN(2)/LN(1+A2),2)

Result: 14.21

Solving 1.05 to the power t = 2 gives t = LN(2) / LN(1.05), a little over 14 years.

B2
A
B
C
1
Growth rate
Years to double
2
5%
14.21
3

B2 =ROUND(LN(2)/LN(1+A2),2) returns 14.21

Example 5

Zero or negative numbers give #NUM!

B2 =LN(A2)

Result: #NUM!

No power of e gives 0. Check for zero or negative inputs with IF before taking the log.

B2
A
B
C
1
Number
LN
2
0
#NUM!
3

B2 =LN(A2) returns #NUM!

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B3, return how many years it takes to double at the annual growth rate in B2, rounded to one decimal.

Answer in B3.

B3
A
B
C
1
Doubling time
2
Growth rate
5%
3
Years to double
4
5
Start
1500
6
End
2250
7
Years
4
8
Continuous rate
9

Common mistakes

  • LN of zero or a negative number returns #NUM!. A ratio of end to start that can be zero or negative needs an IF around it.
  • LN gives a continuous rate, not the annual compound rate. For the rate applied once a year, use (end/start)^(1/years)-1.
  • LN is base e. If you want base 10, use LOG or LOG10. LN(1000) is 6.9, not 3.
  • Dividing by the number of periods is a separate step: LN(end/start)/years. Leaving it out gives the total log growth.
  • Text such as "n/a" returns #VALUE!, and the error spreads to every cell that depends on it.

Questions people ask

What does LN do in Excel?

It returns the natural logarithm of a number: the power of e that gives it. LN(10) is about 2.3026, and LN(EXP(2)) is 2.

What is the difference between LN and LOG?

LN uses base e. LOG uses any base you give it and defaults to base 10. `=LOG(x, EXP(1))` equals `=LN(x)`.

How do I calculate a growth rate with LN?

Use `=LN(end/start)/years` for the continuous growth rate. For the annual compound rate, use `=(end/start)^(1/years)-1`.

How do I find how long it takes to double?

Use `=LN(2)/LN(1+rate)`. At 5% growth this gives about 14.2 periods.

Why does LN return #NUM!?

The number is zero or negative. Natural logs exist only for positive numbers. Check the input, or test it with IF.

Learn LN in a real sheet.

LN is taught in Dates and financial modelling, lesson 12: CAGR and doubling time. Each lesson is a short, graded exercise like the one above.