totn Excel Functions

MS Excel: How to use the LOG Function (WS)

This Excel tutorial explains how to use the Excel LOG function with syntax and examples.

Description

The Microsoft Excel LOG function returns the logarithm of a number to a specified base.

The LOG function is a built-in function in Excel that is categorized as a Math/Trig Function. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the LOG function can be entered as part of a formula in a cell of a worksheet.

Please read our LOG function (VBA) page if you are looking for the VBA version of the LOG function as it has a very different syntax.

Syntax

The syntax for the LOG function in Microsoft Excel is:

LOG( number, [base] )

Parameters or Arguments

number
A numeric value that must be greater than 0.
base
Optional. This is the base to use to calculate the logarithm of a number. If this parameter is omitted, it will use a base of 10.

Returns

The LOG function returns a numeric value.

Applies To

  • Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

Type of Function

  • Worksheet function (WS)

Example (as Worksheet Function)

Let's look at some Excel LOG function examples and explore how to use the LOG function as a worksheet function in Microsoft Excel:

Microsoft Excel

Based on the Excel spreadsheet above, the following LOG examples would return:

=LOG(A1)
Result: 1.301029996

=LOG(A1, 10)
Result: 1.301029996

=LOG(A1, A2)
Result: 0.930676558

=LOG(A2, 5.1)
Result: 1.975690972

=LOG(200, 3)
Result: 4.822736302