LOG Function in Excel: Logarithm to Any Base

LOG Function in Excel: Logarithm to Any Base featured illustration

📎 This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 5 October 2026

MathLevel: ExpertAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. LOG in practice
  6. Where you will use it
  7. Worked example
  8. Mistakes people make
  9. Related functions
  10. Continue learning

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

Advertisement

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.

LOG in practice

Where you will use it

  • Logs in any base
  • Doubling periods: LOG(2,1+r)
  • Information and decibels

Worked example

LOG(2,1.08) = years to double at 8%.

NumberBaseFormulaResult
82=ROUND(LOG(A2,B2),4)3
100010=ROUND(LOG(A3,B3),4)3
21.08=ROUND(LOG(A4,B4),4)9.0065

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Missing baseDefault is 10
Base 1#DIV/0!

LN · EXP · POWER

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

⚡ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

📎 Practice files for this article

  • 📗
    Practice workbook: Math & rounding24 tasks on realistic sales data — type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX · 35 KB

Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.

✨ Ask AI about this article

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

Free · AI can be wrong