Log Calculator (Logarithm)

Created by Krishna Nelaturu
Last updated: Jul 15, 2022

Whether you want to calculate natural log, common log, or logarithm to an arbitrary base, this log calculator is your one tool to calculate them all! Here, you can calculate the logarithm of a positive real number to any base. Join us below in a brief discussion about logarithm and how to calculate the logarithm of a number to an arbitrary base using the log formula.

What is logarithm?

The logarithmic function (log for short) is the inverse function of the exponentiation operation. If b to the power a gives x, then the log of x to the base b would give a. Mathematically, we can write this as:

logb(x)=a    ba=x\log_b (x) = a \iff b^a = x

where:

  • log\log - The logarithmic function;
  • bb - The base, any positive real number (b1)(b \neq 1);
  • xx - Any positive real number; and
  • aa - The exponent, any real number.

In words, we express logb(x)\log_b (x) as the logarithm of x to the base b.

Natural log and common log

Although we can choose an arbitrary base, the two most common choices for the base are Euler's number ee and the number ten. We term the logarithm of a number to the base e as the natural logarithm. Mathematically, we distinguish it with a unique representation - ln(x)\ln (x).

ln(x)=a    ea=x\ln (x) = a \iff e^a = x

Among other applications, the natural log is useful in counting prime numbers and approximating factorials.

The common logarithm is the logarithm of a number to the base 10. There is no particular mathematical representation in this case; we write it as log10(x)\log_{10} (x). However, if no base is explicitly present in any log, we assume it refers to base 10:

log(x)=a    10a=x\log (x) = a \iff 10^a = x

Logarithm is useful in decibel calculation and pH calculation

Calculating log relies on using power series, arithmetic-geometric mean, or looking up available log tables. The answer is straightforward in some cases, say log10(100). But there is a powerful logarithmic identity or log formula for shifting base, which we can use to calculate log to any base.

Calculating logarithm to any base

The log formula for the change of base is:

logb(x)=logk(x)logk(b)\log_b(x) = \frac{\log_k (x)}{\log_k (b)}

Where

  • bb is an arbitrary base; and
  • kk is a base to which the log value is known or easy to compute. A popular choice is Euler's number e, so the formula becomes:
logb(x)=ln(x)ln(b)\log_b(x) = \frac{\ln (x)}{\ln(b)}

Say you want to calculate log to the base 2 (which is common in computer science), then you need to evaluate:

logb(x)=ln(x)ln(2)\log_b(x) = \frac{\ln (x)}{\ln(2)}

Since ln(2)\ln (2) is a known value, calculating log base 2 becomes more accessible, because you only need to calculate natural log.

How to use this log calculator

This log calculator is versatile to use. You can use it to find the logarithm value, the base, or the number you're taking the log of:

  • Enter any two known values in any order, and watch our log calculator determine the unknown automatically.
  • Make sure that the values in the logarithm calculator follow these rules:
    • Base must be a positive real number that is not equal to 1.
    • Logarithm of value must be a positive real number.
Krishna Nelaturu
Logarithm of...
with base...
is equal to...
People also viewed…

Area of a rectangle

The area of a rectangle calculator is a handy tool for calculating a rectangle's properties.

Schwarzschild radius

Discover the fundamental of black hole physics with our Schwarzschild radius calculator.

Vector addition

Use this vector addition calculator to add or subtract two vectors.
main background