# How to use the LOG function

**What is the LOG function?**

The LOG function calculates the logarithm of a number to a specific base. The log function uses base 10 if a base is not specified.

**What is a logarithm?**

A logarithm is a mathematical operation that tells you how many times you need to multiply a certain number, called the base, by itself to get another number.

For example, if you want to know how many times you need to multiply 2 by itself to get 16: 2^{x} = 16

you can use a logarithm with base 2 and write it as log2(16) which equals 4.

Now we know the exponent: 2^{4} = 16 or 2 * 2 * 2 * 2 = 16

**What is a base?**

In logarithms, the base is the number that is raised to a power to produce the desired output. It is the foundation of the logarithmic function.

For example, the logarithm log10(100):

- 10 is the base
- 100 is the input number
- 2 is the exponent that makes 10 return 100 because 10
^{2}= 100

The most common bases are

- 10
- e (natural log), and
- 2 (for computers).

But any positive number besides 1 can be a base.

**What is an exponent?**

An exponent is a number that indicates the power or times that a base number is multiplied by itself.

Exponents are written as a small raised number, like x^{2}, y^{3}, or 10^{4}. The base number is being multiplied by itself as many times as the exponent value. Exponents are also referred to as "raising to a power".

**What is the definition of a logarithm with an arbitrary base?**

A logarithm with an arbitrary base b can also be defined using a limit definition, similar to how the natural logarithm is defined:

For a base b > 0, b â‰ 1:

logb(x) = lim (n->infinity) (x^(1/n) - 1) * n / logb(e)

Where:

- b is the base
- x is the input number
- e is the mathematical constant

Here is an example:

b = 3

x = 100

e = 2.718281828

n = large number, here I use 99999999

(100^(1/99999999) - 1) * 99999999/ log3(e) = 4.191806641

=LOG(100,3) returns 4.191806549

**What are the other logarithmic functions in Excel?**

Excel function | Description |
---|---|

LOG | Returns the logarithm with a given base. |

LN | Returns the natural logarithm (base e) of a number |

LOG10 | Returns the base-10 logarithm of a number |

LOG2 | Returns the base-2 logarithm of a number |

**The corresponding inverse functions for the logarithm functions in Excel:**

Logarithm | Power to |
---|---|

LOG | Arbitrary base, base^{x} or POWER(number, power) |

LN | EXP(number) |

LOG10 | 10^{x} or POWER(10,x) |

LOG2 | 2^{x} or POWER(2,x) |

### Excel Function Syntax

LOG(*number*, [*base*])

### Arguments

number |
Required. The positive numerical value for which you want the logarithm. |

[base] |
Optional.Â The base of the logarithm. Default value is 10. |

Formula in cell C3:

ghfhh

### Useful links

Logarithm - wikipedia

Euler's Number - UTSA

### Functions in 'Math and trigonometry' category

The LOG function function is one of 73 functions in the 'Math and trigonometry' category.

## How to comment

How to add a formula to your comment<code>Insert your formula here.</code>

Convert less than and larger than signsUse html character entities instead of less than and larger than signs.

< becomes < and > becomes >

How to add VBA code to your comment[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

How to add a picture to your comment:Upload picture to postimage.org or imgur

Paste image link to your comment.

Contact OscarYou can contact me through this contact form