Mathematics, Statistics & Geometry

Logarithm Calculator

Calculate the logarithm of any number for any base. Solve log10, ln (natural log), and log2 equations instantly with step-by-step math.

log₍10₎(100)
2
log₁₀ (Common Log)2
ln (Natural Log)4.605
log₂ (Binary Log)6.644
Calculation StepsCalculate log base 10 of 100 Using the change-of-base formula: log₍b₎(x) = ln(x) / ln(b) ln(100) = 4.60517019 ln(10) = 2.30258509 log₍10₎(100) = 4.60517019 / 2.30258509 = 2

Calculated locally in your browser. Fast, secure, and private.

What is a Logarithm?

A logarithm is simply the inverse of an exponent. While an exponent tells you what happens when you raise a base to a power (e.g., $10^2 = 100$), a logarithm asks the reverse question: "To what power must I raise this base to get this number?"

logb(x)=y    by=x\begin{aligned} \log_b(x) = y \iff b^y = x \end{aligned}

Where:
b=
The number that is raised to a power (e.g., 10 or e)
x=
The target number you want to reach
y=
The exponent you need to raise the base to

Common Logarithms You Will Encounter

  • Common Log (Base 10): Written as $\log(x)$ or $\log_{10}(x)$. This is the default on scientific calculators. For example, $\log_{10}(100) = 2$ because $10^2 = 100$.
  • Natural Log (Base e): Written as $\ln(x)$. It uses Euler's number ($e \approx 2.718$) as the base and is vital for continuous growth calculations in calculus.
  • Binary Log (Base 2): Written as $\log_2(x)$. Heavily used in computer science. For example, $\log_2(8) = 3$ because $2^3 = 8$.

The Change of Base Formula

Most scientific calculators only have buttons for log (Base 10) and ln (Base e). What happens if your homework asks you to calculate $\log_2(8)$ or $\log_3(81)$?

You must use the Change of Base Formula, which lets you rewrite any logarithm in terms of base 10 or base e:

logb(x)=log10(x)log10(b)=ln(x)ln(b)\log_b(x) = \frac{\log_{10}(x)}{\log_{10}(b)} = \frac{\ln(x)}{\ln(b)}

Example: Calculating $\log_2(8)$ on a standard calculator:

  1. Rewrite as: $\frac{\log_{10}(8)}{\log_{10}(2)}$
  2. Calculate the top: $\log_{10}(8) \approx 0.903$
  3. Calculate the bottom: $\log_{10}(2) \approx 0.301$
  4. Divide: $\frac{0.903}{0.301} = 3$

Our calculator above automatically applies the change of base formula and shows you the exact steps for any custom base you enter.

Important Logarithm Rules to Remember

When simplifying algebraic expressions, students frequently rely on these core properties:

  1. Product Rule: $\log(xy) = \log(x) + \log(y)$
  2. Quotient Rule: $\log(\frac{x}{y}) = \log(x) - \log(y)$
  3. Power Rule: $\log(x^n) = n \cdot \log(x)$
  4. Log of 1: $\log_b(1) = 0$ (because any number to the power of 0 is 1)
  5. Log of the Base: $\log_b(b) = 1$ (because $b^1 = b$)

Frequently Asked Questions

The log base 10 of 100 is 2. This is because 10 raised to the power of 2 equals 100 (10² = 100).

The log base 2 of 8 is 3. This means you must multiply 2 by itself three times to reach 8 (2 × 2 × 2 = 8, or 2³ = 8).

Since most calculators don't have a 'log base 2' button, you must use the change of base formula. Press the standard 'log' button (which is base 10), enter your number, and then divide that by the log of 2. For example, to find log₂(8), type: log(8) ÷ log(2) = 3.

ln(e) equals exactly 1. Because 'ln' is simply shorthand for 'log base e', you are asking 'to what power must I raise e to get e?' The answer is always 1.

No. In real-number mathematics, logarithms are strictly defined for positive numbers (x > 0) only. You cannot raise a positive base to any power and end up with a negative result.

The log of 0 is mathematically undefined. However, as the value of x approaches 0, the logarithm plunges towards negative infinity.