LN Function in Microsoft Excel: Examples, Pitfalls & Compatibility
LN in Microsoft Excel: calculate a natural logarithm for a strictly positive real input. Includes worked examples and application-specific cautions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: Use LN in Microsoft Excel to calculate a natural logarithm for a strictly positive real input. The official LN reference is the source for the function definition and platform-specific rules described below.
Availability and version history
- Introduced: Introduction version not established by the official history reviewed.
- Availability: Official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Checked: October 14, 2026; official LN reference. Documentation check, not a new native test; existing example-verification notes retain their scope.
Syntax and arguments
=LN(number)
number (required): A strictly positive real number. Zero and negative values are outside this real-valued domain.
Examples use English function names, comma argument separators and decimal points. Adapt formula separators to your workbook settings, not punctuation inside quoted text.
When to use it
Use LN to solve for an exponent in an e-based model or to transform a positive ratio. Use LOG10 or LOG when another base is specified. A negative logarithm can be valid even though a negative logarithm input is not.
Three worked examples
Each example is independent. Where input cells are listed, enter those values first; otherwise the formula is self-contained. Expected outputs are independently checked calculations or documented error expectations, not captured results from Microsoft Excel.
Example 1: Check the natural-log identity
=LN(1)
Expected result: 0.
The exponent needed to make e equal 1 is zero.
Example 2: Invert an exponential calculation
=ROUND(LN(EXP(2)),6)
Expected result: 2.
The expected mathematical inverse is 2. Explicit rounding avoids presenting this as a universal bit-for-bit identity.
Example 3: Solve e to an unknown power equals five
=ROUND(LN(5),6)
Expected result: 1.609438.
The returned exponent is approximately 1.609438. It is not the base-10 logarithm of 5.
Put it to work safely
Validate the input before the transform and keep the untransformed value beside it. A ratio below one but above zero has a negative natural logarithm, which is not an error. Do not apply ABS or add an arbitrary constant simply to suppress invalid inputs: either transformation changes the model and needs its own justification.
Common mistakes and fixes
A positive fraction produces a negative answer. That is expected for inputs between zero and one. Do not confuse the sign of the output with the allowed input domain.
Zero is included in the source data. LN is not defined at zero in this real-valued calculation. Decide how the process should represent or exclude that observation.
A rounded value of e does not invert perfectly. Use EXP to construct an e-based value and use an appropriate tolerance rather than demanding exact equality after approximate arithmetic.
Microsoft Excel-specific notes
Microsoft documents positive real inputs and the inverse relationship with EXP. The example using LN(EXP(2)) explicitly rounds its expected report rather than promising an exact machine-level inverse for every input. See the vendor reference for the current definition.
Excel and Google Sheets comparison
The positive-real mathematical interpretation matches. Exact error displays, text coercion and machine precision beyond the reported examples are not certified for either application.
Compare the LN guide for Google Sheets and its official documentation. Having a guide in both libraries establishes two documented references, not a certificate of identical behavior across releases, locales or file conversions.
Related guides
EXP, LOG, LOG10, IF · All Microsoft Excel functions.
Evidence and testing scope
Editorial verification: Official references retrieved on 2026-10-12. The three worked cases are included in this release’s reproducible Python checking suite. It checks the stated arithmetic, calendar or text model and the expected documented error classification; it is not the Microsoft Excel calculation engine. No native application run, UI screenshot, maximum-size benchmark or cross-version certification is claimed. Review the editorial testing standards before relying on a formula in a critical workbook.