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
| Argument | Required? | What it does |
|---|---|---|
| number | Yes | A positive number. |
| base | Optional | The base. Default 10. |
Examples
Example 1 — Years to double
At each growth rate, how many years until sales double?
B2fx=LOG(2, 1+A2)
| A | B | |
|---|---|---|
| 1 | Growth | Years |
| 2 | 0.05 | 14.21 |
| 3 | 0.1 | 7.27 |
| 4 | 0.2 | 3.8 |
=LOG(2, 1+A2) Explain
Common mistakes
- Base 1. LOG(x, 1) returns #DIV/0! — no power of 1 changes it.
Notes

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.