What Is the Change of Base Formula?
Most calculators only have buttons for the natural logarithm (ln) and the base-10 logarithm (log). The change of base formula lets you compute a logarithm in any base by rewriting it in terms of these familiar logs. The formula is \(\log_b(x) = \frac{\ln(x)}{\ln(b)}\), where x is the number you are taking the logarithm of and b is the base. You could just as easily use base-10 logs: \(\log_b(x) = \frac{\log(x)}{\log(b)}\) — the ratio gives the same answer.
How to Use This Calculator
Enter the number (x) — the value inside the logarithm — and the base (b). Press calculate and you instantly get \(\log_b(x)\), along with the intermediate values \(\ln(x)\), \(\ln(b)\), and \(\log_{10}(x)\) so you can see exactly how the result was formed. Note that x must be positive, and the base b must be positive and not equal to 1.
The Formula Explained
A logarithm answers the question: "to what power must I raise b to get x?" Since logarithm bases are linked by a constant ratio, dividing \(\ln(x)\) by \(\ln(b)\) cancels out the natural-log base entirely, leaving the pure base-b logarithm. This is why the formula works with any consistent base in the numerator and denominator.
Worked Example
Find \(\log_2(8)\). Using natural logs: \(\ln(8) \approx 2.079442\) and \(\ln(2) \approx 0.693147\). Dividing gives $$\frac{2.079442}{0.693147} = 3.$$ That checks out because \(2^3 = 8\).
FAQ
Can the base be 10 or e? Yes. With base 10 you get the common log; with base e (\(\approx 2.71828\)) you get the natural log.
Why must x be positive? Logarithms of zero or negative numbers are undefined in the real numbers.
Why can't the base be 1? \(\ln(1) = 0\), which would make the denominator zero and the result undefined.