Looker Studio is now called Data Studio. Learn more about this change.

LOG

Returns the logarithm of a number with respect to a base.

The mathematical base used by the LOG(X) function varies depending on the data source connector being used.

  • For BigQuery and most other connectors, LOG(X) computes the natural logarithm (base e).
  • For connectors such as Google Sheets, MySQL, PostgreSQL, Looker, and Extract Data, LOG(X) may default to base 2.

The function LOG(X, base) with a second argument to specify the base is NOT supported.

Sample usage

LOG(256)

Syntax

LOG( value )

Parameter

value - The value for which to calculate the logarithm using base e (Euler's number). value must be a positive number.

Examples

Example formula Input Output
LOG(My field) 2.718281828459045 1
LOG(My field) 128 4.852030264

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年08月26日 UTC.