Spreadsheet Practice

LN function

LN returns the natural logarithm of a number: the power you would raise e to in order to get it. In finance and analytics it turns growth into an additive rate, which is why log returns and continuous growth rates use it. It's the inverse of EXP.

Available in
Every current version
Category
Math functions
Returns
The natural (base e) logarithm.
Google Sheets
Works the same in Google Sheets.

Syntax

=LN(number)

ArgumentRequired?What it is
numberRequiredA positive number.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
D2=LN(B2)7.090076836Natural log of 1,200: about 7.09
D3=LN(B3/B2)/B410.8%Average continuous growth rate per year: about 10.8%
D4=LN(0)#NUM!#NUM!: zero and negative numbers have no logarithm

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
InputValue
Start value12007.090076836
End value185010.8%
Years4#NUM!

Practice LN

Graded instantly, then re-checked on changed data.

Log returns

In D2, use LN to calculate each stock's log return: the natural log of end price ÷ start price. Fill down to D6.

Common mistakes

What you seeWhy, and how to fix it
#NUM!The number is zero or negative. Check for empty cells or losses before taking the log of a ratio.
Wanted base 10LN uses base e. Use LOG10, or LOG with no base, for base 10.
#DIV/0!The ratio inside LN divides by an empty or zero cell, such as a missing start value.

Tips

  • Log returns add up across periods: the sum of monthly LN(end/start) values equals the log return for the year.

Questions

What is the difference between LN and LOG in Excel?

LN is the natural log (base e). LOG defaults to base 10 and accepts any base as a second argument.

How do I calculate a log return in Excel?

Use =LN(End/Start), for example =LN(C2/B2).

How do I undo LN?

Use EXP: =EXP(LN(A2)) returns A2.

Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.