Change of Base Formula Calculator

Calculate log_b(x) using the change of base formula log_b(x) = log_c(x) / log_c(b), evaluated with base-10 (common) or base-e (natural) logarithms.

Quick Facts

Formula
log_b(x) = log_c(x) / log_c(b)
True for any valid base c (c > 0, c ≠ 1) - most calculators use base 10 or base e since those are built in.
Domain
x > 0, b > 0, b ≠ 1
Logarithms of zero or negative numbers are undefined, and log base 1 is undefined.

Your Results

Calculated
log_b(x)
-
Logarithm of x in base b
log_c(x)
-
Numerator: log of x in the calculation base
log_c(b)
-
Denominator: log of b in the calculation base
Cross-check
-
Same result using the other log base

Ready

Enter x and b, choose a calculation base, then press Calculate.

How the change of base formula works

The change of base formula lets you evaluate a logarithm in any base b using only the logarithm functions built into a calculator or programming language — almost always base 10 (common log, often written log) and base e (natural log, ln). It states log_b(x) = log_c(x) / log_c(b), where c is any valid base you choose (c > 0, c ≠ 1). No matter which valid c you pick, the ratio produces the same value of log_b(x).

Where the formula comes from

Let y = log_b(x), which by definition means by = x. Taking log_c of both sides gives log_c(by) = log_c(x), and the power rule of logarithms turns the left side into y · log_c(b) = log_c(x). Dividing both sides by log_c(b) isolates y: y = log_c(x) / log_c(b) — the change of base formula.

Worked example

To find log₂(8) using base-10 logs: log₂(8) = log₁₀(8) / log₁₀(2) ≈ 0.90309 / 0.30103 = 3. Using natural logs instead gives the same answer: ln(8) / ln(2) ≈ 2.07944 / 0.69315 = 3. Either calculation base works because 2³ = 8, and the formula does not care which valid base you route the calculation through.

Using the result correctly

  • x must be greater than 0; logarithms of zero or negative numbers are undefined for real results.
  • The base b must be greater than 0 and cannot equal 1, since log base 1 is undefined (it would require dividing by log_c(1), which is 0).
  • The result can be negative (when 0 < x < 1 and b > 1) or exactly zero (when x = 1, since log_b(1) = 0 for any valid base).

Frequently Asked Questions

What is the change of base formula?
The change of base formula states log_b(x) = log_c(x) / log_c(b) for any valid base c (c > 0, c does not equal 1). It lets you compute a logarithm in any base using only the log functions built into a calculator, typically base 10 (common log) or base e (natural log).
Why do calculators need this formula?
Most calculators and programming languages only implement log base 10 (log10) and natural log (ln) directly. The change of base formula converts any log_b(x) into a ratio of these built-in functions, so log_2(8) can be found as log10(8)/log10(2) or ln(8)/ln(2), both equal to 3.
Does the choice of calculation base change the answer?
No. As long as c is a valid base (positive and not equal to 1), log_c(x)/log_c(b) gives the same result whether you use base 10, base e, or any other base - the change of base formula is base-independent, aside from rounding.
What input values are not allowed?
The number x must be greater than 0, since logarithms of zero or negative numbers are undefined for real results. The base b must be greater than 0 and cannot equal 1, because log base 1 is undefined - it would require dividing by log_c(1), which is 0.