Math and trigonometry functions

LOG10

Matches all 2,866 recorded answers

Recorded: 2,823 in the answer bank and 43 workbook cells. How we measure this · See the Rust code

Local names in 40 languages

Every language in the source keeps the English name.

LanguageName in Excel
ArabicLOG10
BulgarianLOG10
CzechLOG10
DanishLOG10
GermanLOG10
GreekLOG10
English (Australia)LOG10
English (United Kingdom)LOG10
English (United States)LOG10
SpanishLOG10
EstonianLOG10
FinnishLOG10
FrenchLOG10
HebrewLOG10
CroatianLOG10
HungarianLOG10
IndonesianLOG10
ItalianLOG10
JapaneseLOG10
KoreanLOG10
LithuanianLOG10
LatvianLOG10
NorwegianLOG10
DutchLOG10
PolishLOG10
Portuguese (Brazil)LOG10
Portuguese (Portugal)LOG10
RomanianLOG10
RussianLOG10
SlovakLOG10
SlovenianLOG10
Serbian (Latin)LOG10
SwedishLOG10
ThaiLOG10
TurkishLOG10
UkrainianLOG10
VietnameseLOG10
Chinese (Simplified)LOG10
Chinese (Hong Kong)LOG10
Chinese (Traditional)LOG10

Names from Microsoft's support site.

What it does

LOG10(number)

LOG10(number) returns the base-10 logarithm of a positive real number — "the power to which 10 must be raised to equal the given number", in the documentation's own gloss.

LOG10(x) = log₁₀ x = ln x / ln 10 = log₁₀(e) · ln x,   x > 0

with log₁₀(e) = 0.4342944819032518…, the constant conventionally called M_LOG10E.

Domain and range. Domain (0, ∞); range all of ℝ. Strictly increasing, concave, with the same logarithmic singularity at 0⁺ and the same absence of any finite pole as LN — the two differ only by a positive constant factor, so every structural property transfers, including the branch cut of the complex extension along the negative real axis.

What makes base 10 special is not the mathematics — it is the exactness readers expect. For integer k, log₁₀(10^k) = k exactly, and Microsoft's documented examples assert exactly that: LOG10(100000) and LOG10(10^5) are both shown as 5, and LOG10(10) as 1. Those are the easiest values to state and among the harder ones to compute, because 10^k for k > 22 is not exactly representable in binary64 and because a quotient of two inexact logarithms lands on an integer only by luck. See "Numerical notes".

The useful identities:

log₁₀(ab) = log₁₀ a + log₁₀ b       log₁₀(xᵖ) = p · log₁₀ x
log₁₀ x = LN(x) / LN(10)            ⌊log₁₀ n⌋ + 1 = the number of decimal digits of n ≥ 1

The last is the reason LOG10 appears in so many worksheets, and it is also the reason this page has a warning in it.

Arguments

ArgumentMeaningRequired
number"The positive real number for which you want the base-10 logarithm."Yes

Exactly one argument; the declared arity is one to one, and there is no base parameter — that is what LOG is for. The slot is numeric and subject to ordinary to-number coercion (coercion and lifting); the declared coercion profile is the unary numeric scalar-or-array-elementwise one, so LOG10 is a scalar kernel that lifts over arrays.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

Returns Number.

  • Zero and negative arguments produce #NUM!.
  • LOG10(TRUE) converts the logical to 1 and returns zero. Undocumented conversion.
  • Numeric text converts and evaluates.
  • The largest finite double and the smallest positive subnormal produce finite results, both host-scoped. Note that the base-10 logarithm compresses the entire positive double range into roughly the interval from −324 to +309, which is why LOG10 is the natural function for talking about magnitude.
  • An inline array lifts elementwise.
  • An empty range produces #VALUE!.

How to implement

Numerical notes

The scaled-kernel advantage. A dedicated base-10 logarithm folds the constant log₁₀(e) into the polynomial evaluation instead of dividing by ln 10 afterwards, which removes one rounding and — more importantly — removes the error in the representation of ln 10. The standard fdlibm-family arrangement is the one described on the LN page (extract the exponent k, reduce the significand to a neighbourhood of 1, evaluate an odd polynomial in the artanh variable) with the final combination performed as

log₁₀ x = k · log₁₀2_hi + (k · log₁₀2_lo + log₁₀(e) · ln m)

where log₁₀2 is carried as a two-part Cody–Waite constant so the exponent term stays exact. Sun's fdlibm e_log10.c is the canonical source; Cephes and most current libm implementations descend from it. Muller's Elementary Functions gives the error analysis; Abramowitz & Stegun chapter 4, section 4.1 tabulates the underlying relations.

Exactness on powers of ten is not free. log₁₀(10^k) = k is trivially true in mathematics and delicate in binary64:

  1. For 0 ≤ k ≤ 22, 10^k is exactly representable, and a good implementation returns exactly k.
  2. For larger k, 10^k is not exactly representable — the stored double is a near neighbour — so the mathematically correct answer for the stored value is not the integer k, and an implementation that returns k is arguably rounding to what the user meant rather than what they wrote. Both behaviours are defensible; they are different functions.
  3. A quotient ln(x)/ln(10) will generally miss the integer even in case 1, because neither logarithm is exact and their ratio is not.

The digit-count trap. INT(LOG10(n)) + 1 is the textbook decimal-digit count, and it fails whenever LOG10 of an exact power of ten comes back a hair below the integer: the floor then drops a whole digit, and the formula reports that 1000 has three digits. This is the INT amplification hazard in its most common concrete form — a sub-ULP error in the argument of a discontinuous function becoming a whole-unit error in the answer. The robust worksheet forms are LEN(TEXT(n,"0")) for integers, or INT(LOG10(n) + 0.5*10^-9) + 1 with a deliberate, documented tolerance. The fragile form is the one everybody writes.

Relative accuracy near x = 1. As with LN, the result passes through zero at x = 1, so relative error is unbounded there for any implementation. Absolute accuracy remains excellent; the two must not be confused when reading an accuracy claim.

The host-CPU caveat attached to this page's evidence record applies here as it does to LN and LOG: the substrate identified upstream is a legacy x87 transcendental sequence whose last bit is microcode, so bit-level agreement is scoped to a machine as well as to a build.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

LOG10 · 1 lines · calc-func/src/catalogue/math.rs on GitHub
28 log10 "LOG10" (1, 1) [V "number"] |s, a, sv| { unary(s, a, k::log10_fn::log10_kernel) }

Kernels shared with other functions

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
19929Windows, bitness not recorded, CPU not recorded43
20430Windows, 64-bit, CPU not recorded2,823
  • XC-LOG10-001: build 19929 versus build 20430; 2 same-input pairs, 0 differing answers. Compared axes: excel-build. Numeric answers were compared by their recorded binary64 bits; other answers by typed value.

Agreement on these compared inputs does not establish agreement on unmeasured inputs.

Recorded environments and comparison details.

Excel 16.0 build 19929

Windows, bitness not recorded, CPU not recorded

43 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

2,823 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

Relationships

  • LN — the natural logarithm; LOG10 is LN scaled by log₁₀(e). Both are subjects of the same evidence record and share the substrate identified there.
  • POWER(10, y) — the inverse. POWER(10, LOG10(x)) returning x exactly is a stronger requirement than either function meets in general.
  • There is no real LOG2 in Excel. Base 2 goes through LOG(x, 2). Given how often base-2 logarithms appear in sizing and information-theoretic calculations, this is a notable absence, and the complex-valued IMLOG2 exists while the real one does not.
  • INT(LOG10(n)) + 1 for the digit count is the single most common use of this function and the single most common way to get a wrong answer from it — see below.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents