Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Change-of-base formula

Most calculators only have log (base 10) and ln (base e). The change-of-base formula lets you find a logarithm in any base with either button.

By the Calcist team · Updated October 29, 2026 · About a 5-minute read

The formula

log_b x = log_k x / log_k b    for any base k > 0, k ≠ 1
so   log_b x = ln x / ln b = log x / log b

Divide the log of the number by the log of the base, using whatever base your calculator has. Both must use the same base k. The conditions are the usual ones for logs: x > 0, b > 0 and b ≠ 1.

Why it works

Let y = log_b x. By definition, bʸ = x. Take the log in base k of both sides: log_k(bʸ) = log_k x. The power rule for logs brings the exponent down: y · log_k b = log_k x. Divide by log_k b, and y = log_k x / log_k b.

Worked examples

1. log₂ 10. ln 10 / ln 2 = 2.302585 / 0.693147 = 3.321928. Check: 2³ = 8 and 2⁴ = 16, so the answer should be between 3 and 4.

2. log₃ 20. With base-10 logs: log 20 / log 3 = 1.301030 / 0.477121 = 2.726833. With ln instead you get the same answer: 2.995732 / 1.098612 = 2.726833.

3. log₅ 125. ln 125 / ln 5 = 3, since 5³ = 125. A calculator may show 3.0000000000000004 because of rounding inside the machine.

4. log₁/₂ 8. ln 8 / ln 0.5 = 2.079442 / (−0.693147) = −3. Bases below 1 give negative logs for numbers above 1: (1/2)⁻³ = 8.

5. Solving 1.05ᵗ = 50. t = log₁.₀₅ 50 = ln 50 / ln 1.05 = 80.1806. This is how long something growing 5% per period takes to grow 50-fold, the same math behind compound interest.

LogarithmUsing lnValue
log₂ 10ln 10 / ln 23.321928
log₂ 100ln 100 / ln 26.643856
log₃ 20ln 20 / ln 32.726833
log₇ 1000ln 1000 / ln 73.549884
log₁₆ 2ln 2 / ln 160.25

Counting doublings

Base-2 logs answer "how many times do I double?" Starting from 1, how many doublings does it take to pass 1,000,000? log₂ 1,000,000 = ln 1,000,000 / ln 2 ≈ 19.93, so it takes 20 doublings (2²⁰ = 1,048,576). The same idea tells you how many bits are needed to count to a number, or how many rounds of halving a binary search needs.

On a calculator

  • Scientific calculator: type ln(10) ÷ ln(2), or log(10) ÷ log(2). Brackets matter: ln(10/2) is a different number.
  • TI-84: newer models have logBASE( in the MATH menu, but log(10)/log(2) works on every model.
  • Spreadsheets: =LOG(10, 2) takes the base as its second argument.

Related identities

  • log_b a = 1 / log_a b. For example, log₈ 2 = 1/log₂ 8 = 1/3.
  • Switching base multiplies by a constant: log₂ x = (1/ln 2) · ln x ≈ 1.442695 · ln x. That's why every log graph has the same shape, just stretched.
  • In calculus, d/dx log_b x = 1/(x ln b) follows straight from this formula. See the derivative rules table.

Common mistakes

  • Flipping the fraction. It's log of the number over log of the base.
  • Writing ln(x/b) instead of ln x / ln b. The log of a quotient is a difference, not this formula.
  • Using a base of 1 or a negative base. Those aren't valid log bases.

Find any log, ln or antilog with the log calculator, which has a change-of-base mode. Solve for a missing exponent with the exponent calculator, and review powers in exponent rules.

Sources

Every worked example on this page was checked independently with SymPy.

Questions people ask

What is the change of base formula?

log_b x = log_k x / log_k b for any valid base k. Usually k is 10 or e: log_b x = ln x / ln b.

How do you find log base 2 on a calculator?

Divide: log₂ x = ln x / ln 2 (or log x / log 2). For example, log₂ 10 ≈ 3.321928.

Does it matter whether I use ln or log?

No, as long as you use the same one on top and bottom. The answer is the same.

Why does the change of base formula work?

If y = log_b x, then bʸ = x. Taking a log of both sides gives y·log b = log x, so y = log x / log b.

What is log base 3 of 20?

ln 20 / ln 3 ≈ 2.726833.