LOG Function in Excel: Logarithm to Any Base

⏱ 1 min readUpdated 28 September 2026

MathLevel: ExpertAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. Related functions

LOG answers “what power gives this number?” — how many doublings, how many digits.

Syntax

=LOG(number, [base])
Argument What it means
base Default 10.

Examples

Example 1

=LOG(A2/B2, 2)

How many times a value doubled between B2 and A2.

Example 2

=INT(LOG(A2))+1

Number of digits in a positive whole number.

LN · EXP · POWER

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong