FormulaCraft

LOG

LOG returns the logarithm of a number with any base you specify; if you omit the base it defaults to 10. Use it to convert exponential data to a linear scale, compute decibels, or solve exponential equations.

Excel
=LOG(A2,2)
Google Sheets
=LOG(A2,2)

Verified example

Computed by a real spreadsheet engine on the sample data below.

ValueLog Base 2
1
2
8
64

=LOG(A2,2)0

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1A2 is the number whose logarithm you want — it must be a positive value.
  2. 22 is the base of the logarithm (binary log in this case).
  3. 3LOG(8,2) returns 3 because 2^3 = 8.

Need a version for your data?

Try: “Calculate the base-2 logarithm of numbers to measure data in bits

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: