LN Function (Gnumeric)
Learn the LN function in Gnumeric: Calculates the natural logarithm of a number.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
LN returns the logarithm to base e. It answers the question “to what power must e be raised to obtain this positive value?” Use it for multiplicative ratios, exponential models and transformations that specifically require natural rather than base-10 logarithms.
Syntax and real domain
=LN(x)
x is one required positive numeric argument. Zero and negative values return #NUM! in the inspected Gnumeric callback. LN(1) is 0. Values between 0 and 1 produce negative logarithms; values above 1 produce positive logarithms. A negative result is therefore not itself an error.
There is no optional base argument. For another base, choose an appropriate logarithm function or a mathematically justified change-of-base expression. The base must match the model rather than being chosen just to make a result look familiar.
Retained starting example
=LN(EXP(1))
The expected result is approximately 1 because EXP raises e to the supplied power and LN reverses that operation. Finite-precision calculations can leave small round-trip differences, so use an appropriate tolerance when comparing computed results.
Work through a ratio table
Put 0.5, 1, 2 and 10 in A2:A5. Enter =LN(A2) in B2 and fill down. Approximate results are -0.6931471806, 0, 0.6931471806 and 2.302585093.
The reciprocal pair 0.5 and 2 has opposite logarithms because ln(1/x)=-ln(x). A forward control =EXP(B2) should reproduce A2 to normal numerical precision. Keep the unrounded B values for that check rather than retyping their displayed decimals.
Advanced use: logarithmic change
For an initial positive amount 100 and later amount 120, =LN(120/100) gives approximately 0.1823215568. The ordinary fractional increase is 120/100-1, or 0.2. A logarithmic change and an ordinary percentage change use different definitions even though both describe the same ratio.
For a second change from 120 to 150, the logarithmic change is LN(150/120). Adding the two logarithmic changes gives LN(150/100), approximately 0.4054651081. This follows because logarithms turn multiplication of positive ratios into addition.
If a model uses x = EXP(k*t), solve for k with LN(x)/t when x is positive and t is nonzero. State the time unit so the inferred rate has a clear meaning. This algebraic example does not determine which model is appropriate for a real dataset.
Errors and numerical cautions
=LN(0) and =LN(-1) return #NUM!. Do not add an arbitrary offset merely to suppress the error without understanding how it changes the transformation. Inspect whether zero means a valid observation, missing data or an upstream calculation problem.
Very small changes near 1 can lose information when a preceding calculation rounds the ratio to exactly 1. The expression being logged must retain the needed precision. Extremely large intermediate exponentials can overflow before LN gets a usable value, even when a symbolic simplification seems possible.
These controls use moderate positive values and ordinary domain errors. They do not certify every overflow boundary, imported-text conversion or extreme-condition accuracy requirement.
Availability and verification
Version coverage: Gnumeric 1.12.57 has the scoped checks below. The 1.12.62 evidence is a documentation/source check dated October 14, 2026.
- Introduced: Original introduction not established. The earliest demonstrated support in this guide is 1.12.57.
- Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
- Scope: Desktop; the fn-math function module must be included and enabled.
- Checked: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.
The executable contract is also present in the official Gnumeric 1.12.57 fn-math source. The saved source was originally retrieved on October 17, 2026 and re-inspected for this guide. The last functioning release is not established; support in a named version is not a retirement claim.
On October 17, 2026, Gnumeric ssconvert 1.12.57 recalculated a synthetic workbook in the C.UTF-8 locale. Scoped controls: =LN(EXP(1)) → 1; =LN(1) → 0; =LN(2) → 0.6931471805599453; =LN(0) → #NUM!; =LN(-1) → #NUM!; =LN(120/100) → 0.1823215567939546. These are native calculation-engine results, not GUI tests or screenshots. Other tutorial layouts and displayed outputs are independent expectations unless covered by these exact formulas. Input/output files, preserved formulas, raw values and hashes were retained. The XLSX importer logged an unused workbookProtection-element warning; changed-input controls and recorded results were checked.