Excel Log Function

There are two ways to “excel log function”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: use =LOG(number, [base]) — base 10 by default, so =LOG(1000) returns 3, and =LOG(8, 2) returns 3 for base 2.

On this page8

Syntax

=LOG(number, [base])

Arguments

Argumentrequired / optionalDescription
numberrequiredA positive value. Zero or negative returns #NUM!.
baseoptionalThe logarithm base. Defaults to 10.

Related functions

LNEXPPOWER
▤Annotated stepsExcel
1

Select the result cell and type =LOG(.

2

Select the positive value or ratio.

3

Add a comma and the base if it is not 10 — 2 for doublings, EXP(1) for natural.

4

Press Enter.

Ctrl+CthenCtrl+Shift+V⌘+Cthen⌘+Ctrl+VPaste values · WindowsMac

What this does

LOG answers "what exponent turns the base into this number". Its default base is 10, and the optional second argument accepts any base, which makes it the general-purpose logarithm where LN is locked to e and LOG10 is locked to ten. The everyday uses are order-of-magnitude work — how many digits a number has, how many doublings separate two values, sizing a logarithmic chart axis — rather than pure maths. Only positive inputs are valid. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. Treat “excel log function” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected formula shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.

A worked example

How many times must capacity double to grow from 500 to 8,000? =LOG(8000/500, 2) returns 4. The order of magnitude of 47,000: =INT(LOG(47000)) returns 4. Base-2 depth for a binary structure of 1,024 items: =LOG(1024, 2) returns 10. LOG is the general logarithm — the one that answers order-of-magnitude and doubling questions without forcing you to remember which fixed-base variant to reach for. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.

In Google Sheets

Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. For “excel log function”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.

Common mistakes

  • Assuming LOG means natural log; it defaults to base 10, and LN is the natural one.
  • Passing zero or a negative value, which returns #NUM!.
  • Omitting the base when a base other than 10 was intended, which silently returns a plausible but wrong number.

Frequently asked questions

What base does LOG use by default?

Base 10. Pass a second argument for anything else, or use LN for base e.

What is the difference between LOG and LOG10?

LOG10 is base 10 only. LOG defaults to base 10 but accepts any base, so LOG covers everything LOG10 does.

How many doublings are between two numbers?

=LOG(larger/smaller, 2) gives the count of doublings directly.