Change of Base Formula

Use the change of base formula to evaluate a logarithm of any base with the log or ln key of your calculator.

Advanced25 minLesson

Definition

Most calculators only have two logarithm keys: log (base 10) and ln (base ee). The change of base formula lets you evaluate a logarithm of any base with one of these keys:
log⁡bx=log⁡cxlog⁡cb\log_b x = \frac{\log_c x}{\log_c b}
Here x>0x > 0, b>0b > 0, b≠1b \neq 1, and the new base cc can be any positive number other than 11. In practice you choose c=10c = 10 or c=ec = e:
log⁡bx=log⁡xlog⁡b=ln⁡xln⁡b\log_b x = \frac{\log x}{\log b} = \frac{\ln x}{\ln b}
Why it works: let y=log⁡bxy = \log_b x. Then by=xb^y = x. Take the common logarithm of both sides: log⁡(by)=log⁡x\log(b^y) = \log x. The power rule turns this into y⋅log⁡b=log⁡xy \cdot \log b = \log x, so y=log⁡xlog⁡by = \dfrac{\log x}{\log b}.
Example: log⁡350=log⁡50log⁡3≈1.698970.47712≈3.56\log_3 50 = \dfrac{\log 50}{\log 3} \approx \dfrac{1.69897}{0.47712} \approx 3.56 (rounded to 2 decimal places). Check: 33.56≈503^{3.56} \approx 50.
A useful special case: swapping the base and the argument gives the reciprocal,
log⁡ba=1log⁡ab\log_b a = \frac{1}{\log_a b}
Rounding: do the whole division on the calculator and round only the final answer, to the number of decimal places the question asks for.

Try it now

Which expression is equal to log⁡520\log_5 20?

Worked Examples

Evaluate log⁡350\log_3 50. Round to 2 decimal places.

1

Write the change of base formula with base 10

log⁡350=log⁡50log⁡3\log_3 50 = \dfrac{\log 50}{\log 3}

2

Find both common logarithms on the calculator

log⁡50≈1.69897\log 50 \approx 1.69897 and log⁡3≈0.47712\log 3 \approx 0.47712 → Keep all the digits for now

3

Divide, then round only at the end

1.69897÷0.47712≈3.560881.69897 \div 0.47712 \approx 3.56088 → ≈3.56\approx 3.56

4

Check with the definition

33=273^3 = 27 and 34=813^4 = 81, so the answer must lie between 3 and 4. Also 33.56≈503^{3.56} \approx 50 → Reasonable

Common Mistakes

Writing the fraction upside down: log⁡350=log⁡3log⁡50≈0.28\log_3 50 = \dfrac{\log 3}{\log 50} \approx 0.28

Why it's wrong: The base goes in the denominator. A quick estimate shows the error: 33=273^3 = 27 and 34=813^4 = 81, so log⁡350\log_3 50 must be between 3 and 4, not below 1.

Correct: Argument on top, base on the bottom: log⁡350=log⁡50log⁡3≈3.56\log_3 50 = \dfrac{\log 50}{\log 3} \approx 3.56

Turning the quotient of logs into the log of a quotient: log⁡50log⁡3=log⁡503≈1.22\dfrac{\log 50}{\log 3} = \log\dfrac{50}{3} \approx 1.22

Why it's wrong: The quotient rule says log⁡50−log⁡3=log⁡503\log 50 - \log 3 = \log \dfrac{50}{3}. It is about a difference of logs, not a division of logs.

Correct: log⁡50log⁡3\dfrac{\log 50}{\log 3} is a plain division of two numbers: 1.69897÷0.47712≈3.561.69897 \div 0.47712 \approx 3.56

Cancelling the word log: log⁡50log⁡3=503≈16.67\dfrac{\log 50}{\log 3} = \dfrac{50}{3} \approx 16.67

Why it's wrong: log is a function, not a factor. You cannot cancel it like a common number in a fraction.

Correct: Evaluate log⁡50\log 50 and log⁡3\log 3 first, then divide: ≈3.56\approx 3.56

Rounding too early: 1.700.48≈3.54\dfrac{1.70}{0.48} \approx 3.54

Why it's wrong: Rounding log⁡50\log 50 and log⁡3\log 3 before dividing changes the second decimal place of the answer.

Correct: Divide with all the calculator digits (or type log(50)/log(3) in one go) and round only the final result: 3.563.56

Interactive Visual

Function graph

0102030405060-202468xy(50, 3.56)x = 0

Tap or hover over the graph to read off values.

Tap a name to show or hide its graph.

Asymptote

Table of values

x1231050
log(x) / log(b)00.6309312.09593.56088
ln(x) / ln(b)00.6309312.09593.56088

Interactive Sandbox

Interactive Grapher

-10-50510-10-50510xy

Tap or hover over the graph to read off values.

Try these examples:

y = 2x + 1

m=2, b=1

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

18 problems
Problem 1 of 18
Easy

Which expression is equal to log⁡520\log_5 20?

Why It Matters

The change of base formula is what makes logarithms usable in practice:
  • Any base on any calculator: log⁡2\log_2, log⁡3\log_3 or log⁡1.05\log_{1.05} become one division with the log or ln key.
  • Money and growth: the time for savings to double at 5 % per year is log⁡1.052=log⁡2log⁡1.05≈14.21\log_{1.05} 2 = \dfrac{\log 2}{\log 1.05} \approx 14.21 years.
  • Computer science: binary search and bits use base 2. Searching 1,000,000 sorted items takes about log⁡21000000≈19.93\log_2 1000000 \approx 19.93, so 20 halvings.
  • Biology: a population that triples every hour needs log⁡3500≈5.66\log_3 500 \approx 5.66 hours to grow 500 times bigger.
  • Solving equations: every exponential equation like 2x=502^x = 50 has the answer x=log⁡250x = \log_2 50, which you evaluate with this formula.
It also explains why log⁡\log and ln⁡\ln are enough: every other logarithm is just one of them divided by a constant.

Real World Applications

How Long Until Your Savings Double?

With yearly compound interest, money is multiplied by the same growth factor every year. The doubling time is a logarithm whose base is that factor.

Example:

At 3 % per year the factor is 1.031.03, so the money doubles when 1.03t=21.03^t = 2, that is after t=log⁡1.032t = \log_{1.03} 2 years.

1Try It Yourself

You put 1000 dollars into a savings account that pays 3 % interest per year, compounded once a year.

After how many years has the money doubled?

Step 1: Write the mathematical expression

Write log⁡1.032\log_{1.03} 2 as a quotient of two common logarithms (type the expression in the form log(a)/log(b), not the rounded value):

Binary Search in Computer Science

Binary search finds an item in a sorted list by halving the list again and again. The number of halvings is a base-2 logarithm, and computers evaluate it with change of base.

Example:

A sorted list of 1024 names needs log⁡21024=10\log_2 1024 = 10 halvings, because 210=10242^{10} = 1024.

2Try It Yourself

A database holds 1,000,000 sorted records. Each step of a binary search halves the number of records that are left.

How many halvings are needed to get down to one record?

Step 1: Write the mathematical expression

Write log⁡21000000\log_2 1000000 as a quotient of two common logarithms (type the expression in the form log(a)/log(b), not the rounded value):

Bacteria That Triple Every Hour

Some bacteria cultures triple every hour. The time to reach a certain size is a base-3 logarithm.

Example:

After 2 hours the culture is 32=93^2 = 9 times bigger, after 4 hours 34=813^4 = 81 times bigger.

3Try It Yourself

A culture triples every hour. A lab needs it to be 500 times bigger than at the start.

How many hours does that take?

Step 1: Write the mathematical expression

Write log⁡3500\log_3 500 as a quotient of two common logarithms (type the expression in the form log(a)/log(b), not the rounded value):

Key Takeaways

  • 1Change of base formula: log⁡bx=log⁡cxlog⁡cb\log_b x = \dfrac{\log_c x}{\log_c b} for any new base c>0c > 0, c≠1c \neq 1
  • 2On a calculator use c=10c = 10 or c=ec = e: log⁡bx=log⁡xlog⁡b=ln⁡xln⁡b\log_b x = \dfrac{\log x}{\log b} = \dfrac{\ln x}{\ln b}, both give the same answer
  • 3The argument goes on top, the base goes on the bottom
  • 4It works because by=xb^y = x gives ylog⁡b=log⁡xy \log b = \log x (power rule), so y=log⁡xlog⁡by = \dfrac{\log x}{\log b}
  • 5Swapping base and argument gives the reciprocal: log⁡ba=1log⁡ab\log_b a = \dfrac{1}{\log_a b}
  • 6Divide with all the digits and round only the final answer, to the decimal places asked for

Frequently Asked Questions

Either one. log⁡50log⁡3\dfrac{\log 50}{\log 3} and ln⁡50ln⁡3\dfrac{\ln 50}{\ln 3} are both ≈3.56\approx 3.56. Just use the same kind of logarithm on top and on the bottom.
Either one. log⁡50log⁡3\dfrac{\log 50}{\log 3} and ln⁡50ln⁡3\dfrac{\ln 50}{\ln 3} are both ≈3.56\approx 3.56. Just use the same kind of logarithm on top and on the bottom.
The key gives you the number, but the formula is still needed to find exact answers like log⁡48=32\log_4 8 = \dfrac{3}{2}, to simplify expressions, to solve equations by hand and on tests where only log and ln are allowed. The calculator key itself uses change of base internally.
As many as the question asks for. If it says nothing, 2 to 4 decimal places is usual (for example log⁡350≈3.56\log_3 50 \approx 3.56 or 3.56093.5609). Always round only once, at the very end.
With change of base, log⁡ba=log⁡alog⁡b\log_b a = \dfrac{\log a}{\log b} and log⁡ab=log⁡blog⁡a\log_a b = \dfrac{\log b}{\log a}. Multiplying the two fractions cancels everything and leaves 11. So the two logarithms are reciprocals.

Glossary

Change of base formula
The rule log⁡bx=log⁡cxlog⁡cb\log_b x = \dfrac{\log_c x}{\log_c b} that rewrites a logarithm with a new base cc
Base
The number bb in log⁡bx\log_b x, the number that is raised to a power; it must be positive and not 11
Argument
The number xx in log⁡bx\log_b x that you take the logarithm of; it must be positive
Common logarithm
The logarithm with base 10, written log⁡x\log x (the log key)
Natural logarithm
The logarithm with base e≈2.718e \approx 2.718, written ln⁡x\ln x (the ln key)
Reciprocal
The number 1a\dfrac{1}{a} for a number a≠0a \neq 0; log⁡ba\log_b a and log⁡ab\log_a b are reciprocals

Formula Card

Change of base (any base)

log⁡bx=log⁡cxlog⁡cb\log_b x = \dfrac{\log_c x}{\log_c b}

Any new base $c > 0$, $c \neq 1$

With common logarithms

log⁡bx=log⁡xlog⁡b\log_b x = \dfrac{\log x}{\log b}

Use the log key

With natural logarithms

log⁡bx=ln⁡xln⁡b\log_b x = \dfrac{\ln x}{\ln b}

Use the ln key, same result

Reciprocal rule

log⁡ba=1log⁡ab\log_b a = \dfrac{1}{\log_a b}

Swapping base and argument flips the value

More in This Topic