Excel LOG Function: Syntax, Examples & Tips

The LOG function calculates logarithms in Excel, enabling users to define both the number and base for flexible mathematical computations.
Excel
=LOG(number, [base])

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

Need more than a single LOG formula? Try our free AI for Excel — it reads your entire spreadsheet, answers questions in plain English, and builds charts and analysis in the same chat.

On this page
  1. Parameters
  2. What is a LOG Formula in Excel?
  3. A Practical Example
  4. LOG Formula
  5. Result of the Formula
  6. Why Use LOG?
  7. Key Takeaways:
  8. Example use case

Parameters

number:
The positive real number for which you want to calculate the logarithm.

base:
The base of the logarithm. If omitted, Excel uses base 10 by default. This can be any positive real number except for 1.

What is a LOG Formula in Excel?

The LOG function in Excel is a mathematical tool that allows you to calculate the logarithm of a number to a specified base. It is particularly useful in various fields such as finance, engineering, and data analysis, where logarithmic calculations are often required.

In simpler terms, the LOG function helps you determine how many times one number (the base) must be multiplied to obtain another number, making it easier to work with exponential growth or decay.

A Practical Example

Imagine you are analyzing the growth of a population over time, and you have the following data in an Excel spreadsheet:

Population Growth Data Table:

YearPopulation
11000
22000
34000
48000
516000

You want to find out the logarithm of the population in Year 5 with a base of 2.

LOG Formula

To calculate the logarithm of the population for Year 5, you would use the LOG formula as follows:

Excel
=LOG(B6, 2)

Breakdown of the Formula:

  • B6: This is the cell that contains the population value (16000) for Year 5.
  • 2: This is the base of the logarithm you want to use.

Result of the Formula

When you apply the formula, it calculates the logarithm of 16000 to the base of 2. The output would be:

Logarithm of Population (Base 2)
14.2877

Here, the result indicates that 2 raised to the power of approximately 14.2877 equals 16000.

Why Use LOG?

The LOG function is particularly useful when you need to analyze data that involves exponential relationships, such as population growth, financial returns, or any scenario where you want to understand the scale of growth or decay. It allows you to simplify complex calculations and make sense of large numbers.

Key Takeaways:

  • LOG: Calculates the logarithm of a number to a specified base.
  • Exponential Analysis: Helps you analyze growth or decay patterns effectively.
  • Common Use Cases: Ideal for scientific calculations, financial modeling, and any scenario where logarithmic relationships are present.

Understanding how to use the LOG function can significantly enhance your analytical capabilities in Excel, enabling you to interpret and manipulate data more effectively.

Happy calculating!

Example use case

You have a table where Column A contains the names of different products and Column B contains their corresponding prices. You can use the LOG function to calculate the logarithm of each product's price, which can help in analyzing price distributions and understanding pricing strategies. This allows for a simplified approach to identifying price trends and making data-driven decisions regarding pricing adjustments without the need for more complex statistical analyses.

Beyond the LOG function: Better Analyst is a full Excel AI that goes well past individual formulas. Upload any spreadsheet and ask questions in plain English — you'll get formulas, data analysis, and charts back in seconds. It's a free AI Excel assistant that works with any .xlsx, .xls, or .csv file — no plugins, no Microsoft 365 required.

Don't have a spreadsheet yet? Use our free AI spreadsheet generator to turn a text prompt into a downloadable Excel file — a full AI Excel sheet maker that builds headers, columns, and formulas from your description.

Need more help with Excel formulas?

Create a free account for formula help, explanations, and spreadsheet analysis. Usage limits depend on your plan.

Explore all Excel formulas

Browse our complete library of Excel formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.