WallStreetMojo

WallStreetMojo

WallStreetMojo

MENUMENU
  • Blog
  • Free Video Tutorials
  • Courses
  • All in One Bundle
  • Login
Home » Excel, VBA & Power BI » Excel Tutorials » LN Excel Function

LN Excel Function

By Madhuri ThakurMadhuri Thakur | Reviewed By Dheeraj VaidyaDheeraj Vaidya, CFA, FRM

In arithmetic, we have a logarithm function or LOG function which is just opposite of exponentiation, in excel we have a similar function to calculate the logarithm of a given number and this function is LN function in excel which takes a single number as the argument and gives the result as the logarithm.

LN Function in Excel

It is a built-in function in MS Excel. LN excel is categorized under Math Functions in MS Excel. Excel LN is used to calculate the natural logarithm of a number.

What is the Natural Logarithm Function?

The natural logarithm of a number is its logarithm to the base of the mathematical constant e, where e is an irrational and transcendental number approximately equal to 2.718281828459. The natural logarithm function of x is generally written as ln x, loge x, or sometimes, if the base e is implicit, simply log x.

So, Ln(Number) = LOG (Number, e)

Where e~= 2.7128

Below is the LN Function Graph

LN FigureIn the LN Function Graph above, the X-axis indicates the number for which log is to be calculated, and the Y-axis indicates the log values. E.g., log(1) is 0, as shown in the LN Function Graph.

LN Formula in Excel

The formula of LN function Excel is as follows: 

LN Formula

LN Formula has three arguments, out of which two are optional. Where,

  • number = This is a required parameter. It indicates the number for which the natural logarithm function is to be calculated. The number must be a positive real number.
  • If the parameter is a negative number, it returns an error with #NUM! indicating an error with the number.
  • If the parameter is zero, it returns an error with #NUM! indicating an error with the number.
  • If the parameter is a non-numeric value, it returns an error with #VALUE! indicating an error with the generated value.

How to use LN Function in Excel?

The said function is a Worksheet (WS) function. As a WS function, Excel LN Function can be entered as a part of the formula in a cell of a worksheet. Refer to the examples given below to understand better.

You can download this LN Excel Template here – LN Excel Template

Example #1 – Fractional number

LN Example 1

In this example, cell C2 has an LN formula associated with it. So, C2 is a result cell. The first argument of the LN is B2, the number for which log is to be calculated. The number is 0.5, and the log of 0.5 is -0.693147. So, the value of the resultant cell is -0.693147.

Popular Course in this category
Sale
All in One Excel VBA Bundle (35 Courses with Projects)
4.9 (1,353 ratings)
35+ Courses | 120+ Hours | Full Lifetime Access | Certificate of Completion
View Course

Example #2 – Zero number

Example 2

In this example, cell C4 has an LN formula associated with it. So, C4 is a result cell. The first argument of the LN is B4, the number for which log is to be calculated. The number is 0, and the log of 0 cannot be calculated. LN function in Excel doesn’t accept number value as zero, and hence the error is thrown in return. The error is #NUM! which indicates the number is erroneous.

Example #3 – Integer number

Example 3

In this example, cell C6 has an LN formula associated with it. So, C6 is a result cell. The first argument of the LN is B6, the number for which log is to be calculated. The number is 5, and the log of 5 is 1.609437912. So, the value in the resultant cell is 1.609437912.

Example #4 – Non-numeric Value

Example 4

In this example, cell C8 has an LN formula associated with it. So, C8 is a result cell. The first argument of the LN in excel is B8, the number for which log is to be calculated. The number is ‘abc,’ and the log of non-numeric value cannot be calculated. LN function in Excel returns an error when the log cannot be calculated for such a value. The error is #VALUE! which indicates the value is erroneous.

Example #5 – Negative Number

Example 5

In this example, cell C10 has an LN formula associated with it. So, C10 is a result cell. The first argument of the LN in Excel is B10, the number for which log is to be calculated. The number is -1.2, and the log of a negative number cannot be calculated. Since the value is negative, the LN function in Excel returns an error indicating the value is erroneous. So, the value in the resultant cell is #NUM! which indicates the number is erroneous.

Things to Remember

  • The LN function in Excel accepts only a positive real number as its parameter. The divisor cannot be zero.
  • If the parameter is a negative number, it returns an error with #NUM! indicating an error with the number.
  • If the parameter is zero, it returns an error with #NUM! indicating an error with the number.
  • If the parameter is a non-numeric value, it returns an error with #VALUE! indicating an error with the generated value.

Excel VBA for a Similar Purpose

VBA has a separate inbuilt function to calculate the natural logarithm function, which is LOG. It can be used as follows.

LN VBA Excel

Example:

Let’s look at the example given below for better understanding.

logVal = LOG (5)

logVal: 1.609437912

Here, 5 is the number for which the natural logarithm function is to be calculated. Log (5) to the base e is 1.609437912. So, the variable logVal holds value 1.609437912.

Recommended Articles

This has been a guide to LN Function in Excel. Here we discuss the LN Formula in excel and how to use the LN function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –

  • Fractions Number in Excel
  • ROW Excel Function
  • LOG in Excel
  • TAN in Excel
  • Leading Zeros in Excel
3 Shares
Share
Tweet
Share
All in One Excel VBA Bundle (35 Courses with Projects)
  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>
Primary Sidebar
Footer
COMPANY
About
Reviews
Contact
Privacy
Terms of Service
RESOURCES
Blog
Free Courses
Free Tutorials
Investment Banking Tutorials
Financial Modeling Tutorials
Excel Tutorials
Accounting Tutorials
Financial Statement Analysis
COURSES
All Courses
Financial Analyst All in One Course
Investment Banking Course
Financial Modeling Course
Private Equity Course
Venture Capital Course
Excel All in One Course

Copyright © 2021. CFA Institute Does Not Endorse, Promote, Or Warrant The Accuracy Or Quality Of WallStreetMojo. CFA® And Chartered Financial Analyst® Are Registered Trademarks Owned By CFA Institute.
Return to top

WallStreetMojo

Free Excel Course

Excel functions, Formula, Charts, Formatting creating excel dashboard & others

* Please provide your correct email id. Login details for this Free course will be emailed to you

Book Your One Instructor : One Learner Free Class
Let’s Get Started
Please select the batch
Saturday - Sunday 9 am IST to 5 pm IST
Saturday - Sunday 9 am IST to 5 pm IST

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

WallStreetMojo

Free Excel Course

Excel functions, Formula, Charts, Formatting creating excel dashboard & others

* Please provide your correct email id. Login details for this Free course will be emailed to you

Login

Forgot Password?

WallStreetMojo

Download LN Excel Template

Special Offer - All in One Excel VBA Bundle (35 Courses with Projects) View More