The Change of Base Rule

Any log is a quotient of logs you can compute.

A logarithm the calculator does not have

log₂ 20 asks: what power of 2 gives 20? Since 2⁴ = 16 and 2⁵ = 32, the answer is between 4 and 5, but no whole number works, and there is no log₂ key to press.

A calculator has two logarithm keys. log is the common logarithm, to base 10. ln is the natural logarithm, whose base is a number called e, about 2.718. The change of base rule turns a logarithm in any base into a quotient of logarithms in one of those two bases.

Deriving the rule

Call the unknown logarithm x, so x = log₂ 20. By the meaning of a logarithm, that says 2ˣ = 20. The unknown is now an exponent.

Take the common logarithm of both sides: log(2ˣ) = log 20. The power law of logarithms says that the logarithm of a power is the exponent times the logarithm, so the exponent comes down to the front: x log 2 = log 20. Now x is no longer an exponent, and dividing both sides by log 2 gives x = log 20 / log 2.

But x was log₂ 20 all along. So log₂ 20 = log 20 / log 2 = 1.3010 / 0.3010 = 4.322, to 3 decimal places. It lies between 4 and 5, as it should.

Any base at all

Nothing in that argument depended on 2 or on 20. For any base a, a positive number other than 1, and any positive x, write y = logₐ x, so aʸ = x. Taking common logarithms gives y log a = log x, so y = log x / log a. That is the change of base rule: logₐ x = log x / log a.

The logarithm of the number goes on top, and the logarithm of the base goes underneath. Any one base will do on the right, as long as the top and the bottom use the same base: logₐ x = ln x / ln a gives exactly the same answer. For log₂ 20 that is 2.9957 ÷ 0.6931 = 4.322 again.

Using it, and checking

Find log₅ 30. By the rule it is log 30 / log 5. A calculator gives log 30 = 1.4771 and log 5 = 0.6990, to 4 decimal places, so log₅ 30 = 1.4771 / 0.6990 = 2.113, to 3 decimal places.

A logarithm is a power, so the answer can be put back to check it: 5^2.113 = 29.99, to 2 decimal places, which is 30 to the accuracy of the rounded logarithms. The answer is also sensible: 5² = 25 and 5³ = 125, and 30 is just above 25, so the power is just above 2.

In the same way, log₃ 7 = log 7 / log 3 = 0.8451 / 0.4771 = 1.771, to 3 decimal places.

Exact answers

The rule works with any base on the right, so choose a base that makes the numbers easy. log₄ 8 = log₂ 8 / log₂ 4 = 3 / 2 = 3/2. Check: 4^(3/2) is the square root of 4, cubed, which is 2³ = 8.

In the same way log₈ 2 = log₂ 2 / log₂ 8 = 1/3, because 2 is the cube root of 8.

The rule as a stretch

The rule says log₂ x = log x × (1 / log 2), and 1 / log 2 = 3.32, to 2 decimal places. That number is the same for every x. So every value of log₂ x is the value of log x multiplied by the same 3.32, and the graph of y = log₂ x is the graph of y = log x stretched vertically by a factor of about 3.32. At x = 8, log 8 = 0.903 and log₂ 8 = 3, and 3 ÷ 0.903 = 3.32.

The same is true for every base: the graphs of all logarithms are vertical stretches of one another. All of them pass through (1, 0), because the logarithm of 1 is 0 in every base, and a stretch leaves 0 where it is.

xy

The gold curve is y = log₂ x and the white curve is y = log x. Both pass through (1, 0). At x = 8 the gold curve is at 3 and the white curve at 0.903: every height of the gold curve is about 3.32 times the height of the white one.

The usual mistakes

Turning the quotient upside down. log₂ 40 is log 40 / log 2 = 5.32, to 2 decimal places. log 2 / log 40 = 0.19 is the logarithm of 2 to base 40, a different number. The base always goes underneath.

Subtracting instead of dividing. log 40 − log 2 is log(40 / 2) = log 20 = 1.30, by the quotient law. It is not a change of base.

Dividing by the base instead of its logarithm. (log 40) / 2 = 0.80 is not log₂ 40. Both the number and the base need their logarithms taken.

Worked example: Prices That Rise by 5% a Year: The Time They Take to Double, and How Much Longer That Is at a Target of 2% a Year

Question Prices in a country rise by 5% a year, so an item that costs P dollars today costs P × 1.05n dollars after n years. (a) Show that the number of years it takes for prices to double is log1.05 2, and use the change of base rule to find it, to 1 decimal place. (b) The central bank's target is for prices to rise by 2% a year. How many more years would prices take to double at that rate than at 5%? Give your answer to 1 decimal place.

  1. 1.Prices have doubled when P × 1.05n = 2P. Divide both sides by P: 1.05n = 2. So n is the power of 1.05 that gives 2, which is n = log1.05 2. The price P has canceled, so the answer is the same for every item.

    11.52010203040years, nprices, as a multiple of today5% a yearP × 1.05n= 2P, so 1.05n= 2n = log of 2 to the base 1.05
    11.52010203040years, nprices, as a multiple of today5% a yearP × 1.05n= 2P, so 1.05n= 2n = log of 2 to the base 1.05
    Prices have doubled when 1.05n = 2, so n = log1.05 2: the curve meets the dashed line at that n.
  2. 2.By the change of base rule, log1.05 2 = log10 2log10 1.05. A calculator gives log10 2 = 0.30103 and log10 1.05 = 0.021189, so n = 0.301030.021189 = 14.207.

    11.52010203040years, nprices, as a multiple of today5% a yearchange of base: log 2 / log 1.05= 0.30103 / 0.021189 = 14.207
    11.52010203040years, nprices, as a multiple of today5% a yearchange of base: log 2 / log 1.05= 0.30103 / 0.021189 = 14.207
    The change of base rule: log1.05 2 = log10 2log10 1.05 = 0.301030.021189 = 14.207.
  3. 3.(a) Prices double after 14.2 years. Check: 1.0514 ≈ 1.980 and 1.0515 ≈ 2.079, so the doubling falls between the 14th year and the 15th.

    11.52010203040years, nprices, as a multiple of today5% a year14.2prices double after 14.2 yearscheck: 1.0514= 1.980 and 1.0515= 2.079
    11.52010203040years, nprices, as a multiple of today5% a year14.2prices double after 14.2 yearscheck: 1.0514= 1.980 and 1.0515= 2.079
    (a) At 5% a year prices double after 14.2 years, between the 14th year and the 15th.
  4. 4.At 2% a year the yearly factor is 1.02, and the doubling time is log1.02 2 = log10 2log10 1.02 = 0.301030.0086002 = 35.003 years. Check: 1.0235 ≈ 2.000.

    11.52010203040years, nprices, as a multiple of today5% a year2% a year14.2at 2%: log 2 / log 1.02= 0.30103 / 0.0086002 = 35.003
    11.52010203040years, nprices, as a multiple of today5% a year2% a year14.2at 2%: log 2 / log 1.02= 0.30103 / 0.0086002 = 35.003
    At 2% a year the curve is flatter: log1.02 2 = 0.301030.0086002 = 35.003 years.
  5. 5.(b) 35.003 − 14.207 = 20.796, so prices would take about 20.8 more years to double. Subtracting the unrounded times and rounding at the end keeps the first decimal place right.

    11.52010203040years, nprices, as a multiple of today5% a year2% a year14.235.035.003 − 14.207 = 20.796about 20.8 more years
    11.52010203040years, nprices, as a multiple of today5% a year2% a year14.235.035.003 − 14.207 = 20.796about 20.8 more years
    (b) 35.003 − 14.207 = 20.796: prices take about 20.8 more years to double at 2% a year.

Answer: (a) 14.2 years; (b) about 20.8 more years, since at 2% prices take about 35.0 years to double

Common mistakes

  • Turning the rule upside down, as log10 1.05log10 2 = 0.070 years. The base of the logarithm goes underneath: log1.05 2 asks how many factors of 1.05 make 2, and that takes many years, not a small part of one.
  • Rounding log10 1.05 to 0.02 before dividing, which gives 0.301030.02 = 15.1 years. The logarithm of a number close to 1 is small, so rounding it changes the quotient a great deal. Keep five significant figures until the last step.

More functions problems, worked step by step →

Practice The Change of Base Rule in the app