The LN function returns the natural logarithm of a positive number, using the constant e (approximately 2.718) as its base. It answers the question: to what power must e be raised to get this number?
=LN(number)What does LN do?
The LN function calculates the natural logarithm of a number. In plain terms, it tells you how many times you need to multiply the constant e (about 2.71828) by itself to reach your number. For example, LN(10) returns approximately 2.3026 because e raised to the power of 2.3026 equals 10. It is the inverse of the EXP function, which raises e to a given power.
Natural logarithms are useful whenever a quantity grows or shrinks continuously at a constant rate, such as compound interest, population growth, radioactive decay, or sound intensity. In Excel, LN helps you linearise exponential trends, calculate continuous growth rates, or transform skewed data for analysis. Instead of complex manual maths, you type =LN(A2) and get an instant result.
Imagine you have monthly sales figures that seem to grow exponentially. By taking the natural log of each value, you can fit a straight line to the data and forecast future sales more reliably. Or perhaps you need to find the time required for an investment to double at a continuous interest rate; LN is the key. Office workers and students alike will find LN a quick way to handle these calculations without leaving the spreadsheet.
When to use LN
- Calculating continuous compound interest or growth rates.
- Transforming exponential data to a linear scale for trend analysis.
- Finding the half-life or decay constant in science problems.
- Converting between logarithmic and exponential forms in algebra.
- Measuring sound levels or earthquake magnitudes (decibels, Richter scale).
- Estimating the time needed for an investment to reach a target value.
LN syntax
=LN(number)| Argument | Required? | What to enter |
|---|---|---|
number | Required | The positive real number for which you want the natural logarithm. It can be a number, a cell reference, or a formula that returns a positive number. For example, =LN(10) returns approximately 2.3026. |
What it returns: The natural logarithm of the given number as a decimal value. If the number is 1, LN returns 0; if the number is e, LN returns 1.
LN examples
1 Basic natural logarithm of a single number
This example shows the simplest use of LN. The goal is to find the natural logarithm of the number in cell A2. The formula =LN(A2) takes the value 10 and returns approximately 2.302585, because e raised to 2.302585 equals 10. You can place the formula in any empty cell, here D2.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Number | ||||
| 2 | 10 | 2.302585093 | |||
| 3 | 1 | ||||
| 4 | 2.718281828 | ||||
| 5 | 100 | ||||
| 6 | 0.5 | ||||
| 7 | 20 | ||||
| 8 | 5 | ||||
| 9 |
2 Natural log of a list of numbers
Here you have several numbers and want to compute their natural logs in one go. The formula =LN(A2) is entered in B2 and then copied down to B8. Each cell returns the natural logarithm of the corresponding number in column A. For instance, LN(1) returns 0, LN(e) returns 1, and LN(0.5) returns approximately -0.693147. This is handy when you need to transform a column of data quickly.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Value | Natural Log | ||
| 2 | 10 | 2.302585093 | ||
| 3 | 1 | |||
| 4 | 2.718281828 | |||
| 5 | 100 | |||
| 6 | 0.5 | |||
| 7 | 20 | |||
| 8 | 5 | |||
| 9 |
3 Continuous growth rate from sales figures
Suppose you have monthly sales that grew from 1000 to 1500 over 12 months. To find the continuous monthly growth rate, you use the formula =LN(B2/A2)/C2, where B2 is the ending value, A2 is the starting value, and C2 is the number of periods. The LN of the ratio (1.5) is about 0.405465, and dividing by 12 gives approximately 0.033789, or 3.38% per month. This rate assumes continuous compounding.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Start Value | End Value | Periods | ||
| 2 | 1000 | 1500 | 12 | 0.03378875901 | |
| 3 |
4 Time to reach a target with continuous compounding
You want to know how long it takes for an investment to grow from 5000 to 8000 at a continuous annual rate of 5%. The formula =LN(B2/A2)/C2 uses LN of the ratio 8000/5000 = 1.6, which is about 0.470004, and divides by the rate 0.05 to get approximately 9.40008 years. This tells you it will take just over 9.4 years.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Present Value | Future Value | Annual Rate | ||
| 2 | 5000 | 8000 | 0.05 | 9.400072585 | |
| 3 |
5 Linearising exponential data for trend analysis
When data grows exponentially, taking the natural log of the y-values can make the relationship linear, which is easier to analyse. In this example, column B contains population figures. The formula =LN(B2) in C2 returns the natural log of 100, about 4.60517. Copying it down gives a new column that you can chart or use in linear regression to estimate growth parameters.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Year | Population | ||
| 2 | 2020 | 100 | 4.605170186 | |
| 3 | 2021 | 150 | ||
| 4 | 2022 | 225 | ||
| 5 | 2023 | 337.5 | ||
| 6 | 2024 | 506.25 | ||
| 7 |
Common LN errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #NUM! | The number argument is zero or negative, because the natural logarithm is undefined for non-positive numbers. | Ensure the number is greater than zero. If you have zero or negative values, use an IF function to handle them, e.g., =IF(A2>0,LN(A2),""). |
| #VALUE! | The argument is not a number, such as text or a blank cell that is interpreted as text. | Check that the cell contains a numeric value. Convert text to numbers or reference a cell with a number. |
| #NAME? | The function name is misspelled, e.g., =LN typed as =L N or =LN( missing parenthesis. | Type =LN( correctly. Excel usually suggests the function as you type. |
| #DIV/0! | This can occur if LN is used in a formula where the result is divided by zero, not directly from LN itself. | Check the entire formula for division by zero. For example, =LN(A2)/B2 will error if B2 is zero. |
Tips for using LN
- LN is the inverse of EXP:
=LN(EXP(5))returns 5. - To calculate log base 10, use LOG10 or LOG(number,10); LN always uses base e.
- Combine LN with other functions like AVERAGE or SLOPE to analyse exponential trends.
- Remember that LN(1) is 0 and LN(e) is 1; these are useful sanity checks.
- If you need the logarithm of a range, enter the formula in the first cell and drag the fill handle down.
Frequently asked questions
What is the difference between LN and LOG in Excel?
LN returns the natural logarithm (base e), while LOG returns the logarithm to any base you specify. For example, =LOG(100,10) returns 2, but =LN(100) returns about 4.605.
Can LN handle negative numbers?
No, LN returns #NUM! for zero or negative numbers because the natural logarithm is only defined for positive real numbers.
How do I calculate the natural logarithm of a cell reference?
Simply use =LN(A1) where A1 contains the number. The function works with any cell that holds a positive numeric value.
Is LN the same as log base e?
Yes, LN(x) is the logarithm of x to the base e, where e is approximately 2.71828.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. LN reference