LOG10 Function Examples in Excel, VBA, & Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on November 9, 2023
Download Example Workbook

Download the example workbook

This tutorial demonstrates how to use the LOG10 Function in Excel to calculate the base-10 logarithm of a number.

LOG10 Main Function

LOG10 Function 

The LOG10 Function returns the logarithm of a number to base 10.


LOG10 01

LOG10 Function – Decimal 

The LOG10 Function can also return the logarithm of a decimal number to base 10.


LOG10 02

LOG10 Function – Negative Number/Zero

The LOG10 Function will return an error if the argument is zero or a negative number. 


LOG10 03 01


LOG10 03 02

LOG10 Function – Power of 10

The LOG10 Function will return the exponent if the argument is expressed as a power of 10.


LOG10 04

LOG10 in Google Sheets

The LOG10 Function works exactly the same in Google Sheets as in Excel:

LOG10 Gsheet

LOG10 Examples in VBA

You can also use the LOG10 function in VBA. Type:


Executing the following VBA statements

Range("B2") = Application.WorksheetFunction.Log10(Range("A2"))
Range("B3") = Application.WorksheetFunction.Log10(Range("A3"))
Range("B4") = Application.WorksheetFunction.Log10(Range("A4"))
Range("B5") = Application.WorksheetFunction.Log10(Range("A5"))
Range("B6") = Application.WorksheetFunction.Log10(Range("A6"))
Range("B7") = Application.WorksheetFunction.Log10(Range("A7"))
Range("B8") = Application.WorksheetFunction.Log10(Range("A8"))
Range("B9") = Application.WorksheetFunction.Log10(Range("A9"))

will produce the following results:

Vba log10 function

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to List of Excel Functions