Change of base and the calculator

How to calculate log₂ 7 using only the log and ln keys.

Section: Logarithms Updated:
AI assistant

Articles /logarithms-change-of-base-calculator
Change of base and the calculator

6 min

Open the lab · Back to the index

How to calculate log₂ 7 using only the log and ln keys.

The problem: the key is missing

We want x = log₂ 7, the exponent for which 2ˣ = 7. Since 2² = 4 and 2³ = 8, the answer must lie between 2 and 3.

Where does the formula come from?

Write bˣ = y and choose an auxiliary base c, positive and different from 1. Take the base-c logarithm of both sides. By the power rule, log_c(bˣ) = x·log_c b. Since b ≠ 1, that logarithm is nonzero. Divide by it to find x.

bˣ = y
log_c(bˣ) = log_c(y)
x·log_c(b) = log_c(y)
x = log_c(y)/log_c(b) = log_b(y)

What to type

With log, usually base 10, type log(7) ÷ log(2). With ln, base e, type ln(7) ÷ ln(2). Both yield about 2.807355. The two logarithms in the ratio must use the same base. Round the final quotient, not intermediate values.

What if the base is less than 1?

For log_(1/2) 8, type ln(8) ÷ ln(0.5). The numerator is positive and the denominator negative, so the answer is −3. Check: (1/2)⁻³ = 8.

Try it: how do you use ln to find log₅ 12? Between which integers is it?

Show solution

Compute ln(12) ÷ ln(5) ≈ 1.543959. It is between 1 and 2 because 5¹ < 12 < 5².