Excel Log Formula

“excel log formula” comes up constantly, so this page leads with the exact answer, and only then explains the detail. Everything works in Excel on Windows and Mac and maps almost one-to-one to Google Sheets. Copy the answer above and get back to work, or read on to turn a one-off fix into something you never have to look up again.

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

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

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. For “excel log formula”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. 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 is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.

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. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.

In Google Sheets

Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. If you take one thing from this page on “excel log formula”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.

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.