All versions
Math & Trig
The Excel LOG function returns the logarithm of a number to a base you choose. Leave the base out and it defaults to base 10.
Quick answer:
=LOG(100) log base 10 of 100 = 2
Syntax
=LOG(number, [base])
| Argument | Description | |
|---|---|---|
number | Required | The positive real number whose logarithm you want. |
base | Optional | The base of the logarithm. If omitted, Excel uses base 10. |
How to use it
LOG is the flexible logarithm: supply a base, or leave it off for base 10:
=LOG(100) // base 10 default = 2
=LOG(8, 2) // base 2 = 3
=LOG(1000, 10) // = 3
It asks “base to what power gives this number?” — so =LOG(8,2) = 3 because 2³ = 8. For base e use LN; for base 10 specifically, LOG10 is a shorthand for LOG(number).
Positive numbers only. Like all logs, LOG of zero or a negative number returns a #NUM! error.
Try it: interactive demo
Live demo
Pick a LOG example to see the formula and its result.
Result:
Practice workbook
Download the free LOG practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.
Frequently asked questions
What base does LOG use by default?
Base 10.
=LOG(100) returns 2. Supply a second argument to change it, e.g. =LOG(8,2) = 3.How do I take a log to base 2?
Pass 2 as the second argument:
=LOG(8,2) = 3, because 2 to the power 3 is 8.What is the difference between LOG, LOG10, and LN?
LOG takes any base (default 10); LOG10 is fixed to base 10; LN is fixed to base e.
=LOG(100) and =LOG10(100) both give 2.Why does LOG return a #NUM! error?
The number argument is zero or negative, where logarithms are undefined. Logs require a positive input.
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class