LOG Function

Returns the logarithm of a number to the base you choose.

Category

Math & Trig

Available in

All versions, Microsoft 365

Returns

A number

Want to practice LOG in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

LOG answers “base to what power gives this number?”. LOG(8, 2) is 3 because 2³ = 8.

Leave the base out and it uses 10. A practical use: how many periods until something doubles.

Syntax

=LOG(number, [base])

Arguments

ArgumentRequired?What it does
numberYesA positive number.
baseOptionalThe base. Default 10.

Examples

Example 1 — Years to double

At each growth rate, how many years until sales double?

B2fx=LOG(2, 1+A2)
AB
1GrowthYears
20.0514.21
30.17.27
40.23.8
=LOG(2, 1+A2) Explain

Common mistakes

  • Base 1. LOG(x, 1) returns #DIV/0! — no power of 1 changes it.

Notes

  • Related functions: LOG10, LN, POWER.
Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.