The LN function in Google Sheets returns the natural logarithm of a number — the logarithm to base e (approximately 2.718). To use it, click an empty cell, type =LN(, enter a positive number or a cell reference such as A1, close the bracket and press Enter. That is the whole job: =LN(A1) returns the natural log of whatever number sits in A1. Everything below covers the syntax, the errors you will hit, and the related log functions you may actually want instead.
What You'll Need
- A Google account with access to Google Sheets (the free web version at sheets.google.com or the mobile app works the same way).
- A spreadsheet open, either new or existing, with edit permission.
- A number greater than zero to work with — LN does not accept zero or negatives.
Step-by-Step
- Open your spreadsheet. Go to sheets.google.com, sign in, and open the file you want to work in, or create a blank one with the plus button. On mobile, open the Sheets app and pick the file from the list.
- Click the cell where the result should appear. Pick an empty cell next to your data so the output is easy to read and easy to drag down later.
- Type the formula. Start with an equals sign, then the function name, then an opening bracket: =LN(. Google Sheets will show a small tooltip describing the function as you type, which confirms you have the right name.
- Enter the argument. Type a number directly, for example =LN(10), or click a cell containing your number, for example =LN(A2). The argument must be a positive number. If you reference a cell, you can also reference a whole range such as A2:A10 and the result will spill down automatically.
- Close the bracket and press Enter. The cell now shows the natural log. For example, =LN(10) returns roughly 2.302585, because e raised to that power equals 10.
- Copy the formula down the column. Click the cell, grab the small blue square in the bottom-right corner (the fill handle) and drag down, or copy the cell and paste it into the rows below. Relative references adjust automatically, so =LN(A2) becomes =LN(A3) and so on.
- Format the result if needed. Select the output cells and use the decimal place buttons in the toolbar to round the display. Formatting changes only what you see; the underlying value keeps full precision for further calculations.
- Check your work. A quick sanity check: LN of a number below 1 is negative (LN(0.5) is about -0.693), LN(1) is exactly 0, and LN of anything above 1 is positive. If your results do not follow that pattern, something is wrong with the input.
Common Mistakes
Feeding it zero or a negative number. LN is only defined for positive values. =LN(0) and =LN(-5) both return #NUM!, not a number. If your data can legitimately contain zeros or negatives, wrap the formula in a check such as =IF(A2>0, LN(A2), "") so the sheet stays clean.
Confusing LN with LOG. In Google Sheets, LOG defaults to base 10, not base e. =LOG(100) returns 2, while =LN(100) returns about 4.605. If you want base 10, use LOG or LOG10; if you want base e, use LN. If you want another base, LOG takes a second argument: =LOG(8, 2) returns 3.
Typing text instead of numbers. A cell containing a number stored as text — often pasted from another system, with an apostrophe in front or a stray space — will make LN return #VALUE!. Look for the small green triangle warning in the corner of the cell and convert the text to a real number.
Forgetting the equals sign. Without it, Sheets treats =LN(A1) as plain text and shows the formula rather than the result.
Using commas incorrectly in some locales. In regions where the decimal separator is a comma, argument separators may be semicolons. Sheets usually handles this automatically, but if a formula will not parse, check which separator your locale expects.
Tips
Use LN for continuous growth and decay maths: converting a growth rate into a log return, working with exponential models, or linearising data that grows geometrically. For base-10 work, LOG10 is clearer than LOG with a default argument.
Combine LN with EXP to reverse it. =EXP(LN(x)) returns x, which is a handy way to check a formula is behaving. To raise e to a power directly, use =EXP(power).
If you are working with an entire column, put the formula in the first row and either drag the fill handle or use an array formula like =ARRAYFORMULA(LN(A2:A100)) to fill the whole range in one go. Just remember every cell in that range must be a positive number, or the whole array returns an error.
Keep the raw numbers in one column and the log values in another rather than overwriting the source data. You will almost always want the original values back for charting or comparison.
Troubleshooting
You see #NUM!. The argument is zero or negative. Check the referenced cell, and look out for formulas upstream that occasionally produce zero.
You see #VALUE!. The argument is text or a blank cell that Sheets cannot coerce into a number. Blank cells are treated as zero by some functions, so an empty referenced cell can also trigger this. Point the formula at a cell that definitely holds a number.
You see #NAME?. The function name is misspelled or the equals sign is missing. It should read exactly LN, with no spaces inside the name.
The result looks wrong. Confirm you are not accidentally using LOG. Also check that the cell is not formatted as text before you typed the formula — reformat it as a number and re-enter the formula.
Nothing updates when you change the source number. The output cell may contain a hard-typed value rather than a formula. Click it and check the formula bar at the top.
The formula works on desktop but not on mobile. Function names and syntax are identical across the web and mobile apps; the usual culprit is a smart apostrophe or autocorrect inserting a character. Retype the formula manually.
Frequently Asked Questions
What does the LN function do in Google Sheets?
It returns the natural logarithm of a positive number — the power to which e (about 2.718) must be raised to produce that number.
What is the difference between LN and LOG in Google Sheets?
LN uses base e. LOG uses base 10 by default and accepts an optional second argument to set a different base.
Can LN return a negative number?
Yes. Any input between 0 and 1 gives a negative result, for example =LN(0.25) is about -1.386. The input itself must still be positive.
Why does LN give me an error for zero?
There is no power you can raise e to that gives zero, so the natural log of zero is undefined. Sheets returns #NUM! rather than a number.
How do I undo a natural log?
Use EXP. =EXP(LN(x)) returns x, because EXP raises e to the given power.
Does LN work on a range of cells?
Yes, in an array context. =ARRAYFORMULA(LN(A2:A50)) fills the results down the column, provided every cell in the range holds a positive number.