Skip to content
Google Sheets

LOG function in Google Sheets

Returns the the logarithm of a number given a base.

=LOG(value, [base])

LOG syntax and parameters

Two arguments, one required.

  • valuenumberRequired

    The value for which to calculate the logarithm given base. value must be positive.

  • basenumberOptional

    [10 by default] The base to use for calculation of the logarithm.

LOG examples

Formulas you'll actually reuse.

  1. How many halvings — a base-2 logarithm:

    =LOG(B2, 2)

    Result10

  2. Base 10 when no base is given — orders of magnitude:

    =LOG(B2)

    Result5

LOG in Excel

Same name — your formula ports as-is.

Try LOG in the playground

Edit the example — nothing to install.

Preloaded with the LOG formula from Example 1 — change anything and watch it respond.

Loading the editor…