### Excel LOG Function

##### Associated Files Download Links

In this Article

This Excel Tutorial demonstrates how to use the **Excel LOG Function** in Excel to calculate the logarithm of a number to a specified base, with formula examples.

## LOG Function Description:

The LOG Function Calculates the logarithm of a number to a specified base.

## Formula Examples:

Example | Formula | Result |
---|---|---|

1 | =LOG(C5) | 1 |

2 | =LOG(C6) | 1.30102999566398 |

3 | =LOG(C7) | 2 |

4 | =LOG(C8,D8) | 1.43067655807339 |

## Syntax and Arguments:

The Syntax for the LOG Formula is:

1 |
=LOG(number,base) |

### Function Arguments ( Inputs ):

**number** – A number.

**base** – OPTIONAL. The base of the logarithm. Blank as default.

## Additional Notes

Use the LOG Function to calculate the logarithm of a number to a specified base. Simply enter any number directly into the formula, or reference a cell containing a number.

## LOG Examples in VBA

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

`application.worksheetfunction.log(number,base)`

For the function arguments (number, etc.), you can either enter them directly into the function, or define variables to use instead.

Return to the List of all Functions in Excel

## How to use the LOG Function in Excel:

To use the AND Excel Worksheet Function, type the following into a cell:

`=AND(`

After entering it in the cell, notice how the AND formula inputs appear below the cell:

You will need to enter these inputs into the function. The function inputs are covered in more detail in the next section. However, if you ever need more help with the function, after typing “=LOG(” into a cell, without leaving the cell, use the shortcut **CTRL + A** (**A** for **A**rguments) to open the “Insert Function Dialog Box” for detailed instructions:

For more information about the LOG Formula visit the

Microsoft Website.