Change of Base Formula: How to Use It
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator works out logarithms in any base using the change of base formula. You enter a number and a base, and it returns the logarithm in base 10 or base e, plus the result in your chosen base. The change of base formula lets you rewrite a logarithm with any base as a ratio of logarithms in a base your calculator can handle, usually 10 or e.
Formula
The change of base formula states that for any positive numbers x, b, and c, with b ≠ 1 and c ≠ 1:
logb(x) = logc(x) / logc(b)
In words: the logarithm of x in base b equals the logarithm of x in base c divided by the logarithm of b in base c. Here, x is the number you are taking the logarithm of, b is the original base, and c is the new base (often 10 or e). All logarithms must be defined for positive arguments, and the bases must be positive and not equal to 1.
Worked Example
Using the default values from the calculator: find log10(100). Here x = 100, b = 10, and we choose c = 10 (the common logarithm base).
- Write the formula: log10(100) = log10(100) / log10(10).
- Compute the numerator: log10(100) = 2 because 10² = 100.
- Compute the denominator: log10(10) = 1 because 10¹ = 10.
- Divide: 2 / 1 = 2.
The calculator returns 2.0000, which matches. For a non-trivial example, log2(8) = 3 because 2³ = 8. Using base 10: log10(8) / log10(2) ≈ 0.90309 / 0.30103 ≈ 3.0000.
Why the Formula Works
The formula comes from the definition of logarithms and the properties of exponents. If y = logb(x), then by definition by = x. Taking logc of both sides gives logc(by) = logc(x). Using the power rule, y·logc(b) = logc(x). Solving for y gives y = logc(x) / logc(b), which is exactly the formula.
This derivation holds for any valid base c, which is why you can pick c = 10 or c = e (the natural logarithm) to match your calculator buttons.
When to Use the Change of Base Formula
Most scientific calculators have only two logarithm buttons: log (base 10) and ln (base e). If you need log2(5) or log7(100), you cannot enter the base directly on many models. The change of base formula solves that by converting to base 10 or e.
- Use it when solving exponential equations like 2x = 50; take log of both sides and divide.
- Use it in computer science for log2 when analyzing algorithms (binary search, merge sort).
- Use it in chemistry for pH calculations (base 10) and in physics for entropy (natural log).
- Use it in finance for continuous compounding (natural log) or for doubling time (base 2).
It is also the standard way to graph logarithms in any base on graphing calculators or spreadsheet software that only offer log and ln.
Common Mistakes and Pitfalls
One frequent error is inverting the fraction. The correct formula is logb(x) = log(x) / log(b), not log(b) / log(x). For example, log2(8) = 3, but if you mistakenly compute log(2)/log(8) ≈ 0.333, you get the reciprocal.
Another mistake is using a negative or zero base. The base must be positive and not equal to 1. Also, the argument x must be positive; logarithms of zero or negative numbers are undefined in the real number system.
Rounding too early can cause errors in multi-step problems. Keep several decimal places during intermediate steps, then round at the end. For example, log2(3) ≈ 1.58496, not 1.58.
Choosing a New Base
You can choose any positive number other than 1 as the new base c. The result is independent of your choice—mathematically, all choices give the same answer. In practice, the choice depends on context:
- Base 10 (common log): easiest for quick mental estimates and for pH, decibels, and Richter scale.
- Base e (natural log): appears in calculus, continuous growth, and many physics formulas.
- Base 2: natural for binary systems, information theory, and algorithm complexity.
If you are solving an equation, pick the base that matches your calculator. If you are working with a formula that already uses ln, stick with ln to avoid extra conversions.
Limitations and Alternatives
The change of base formula assumes you have access to logarithms in some base (like 10 or e). If you are working entirely by hand, you might use a logarithm table or a slide rule—both now rare. For exact values, you can sometimes simplify using properties: logb(bk) = k, or logb(1) = 0.
When the argument is a power of the base, you don’t need the formula at all. For example, log2(16) = 4 because 2� = 16. But for most real numbers, the formula is the only practical way to get a decimal approximation.
The formula also works for complex logarithms, but that requires multi-valued functions and is beyond typical use. For real numbers, the domain restrictions are strict: x > 0, b > 0, b ≠ 1.
Frequently Asked Questions
Why does the change of base formula work for any new base?
Because the derivation uses only the definition of a logarithm and the power rule, which hold for any valid base. The ratio logc(x)/logc(b) cancels out the effect of the chosen base c, leaving the true value of logb(x).
Can I use the formula with a base of 1?
No. A base of 1 is invalid because 1 raised to any power equals 1, so you cannot get a unique exponent. The formula would have a zero denominator (logc(1) = 0), leading to division by zero.
What is the difference between log and ln?
log usually means base 10 (common logarithm), while ln means base e (natural logarithm), where e ≈ 2.71828. The change of base formula lets you convert between them: log(x) = ln(x) / ln(10).
How do I solve 2^x = 100 using this formula?
Take the logarithm of both sides: log(2^x) = log(100). By the power rule, x·log(2) = log(100). Then x = log(100)/log(2) ≈ 2/0.30103 ≈ 6.6439. That’s the same as log2(100).
Does the formula work on a calculator that only has ln?
Yes. Use ln(x) / ln(b) instead of log(x) / log(b). The result is identical because the ratio is base-independent.
Is the change of base formula the same as the base conversion for logarithms?
Yes, it is the same concept. Some textbooks call it the “base conversion formula� or “change of base rule.� It is a standard identity in algebra and precalculus.
Related
Formula used
in x | Number | - | 100 | 0 in b | Base | - | 10 | 2 out result | log_b(x) | - | log10(x) / log10(b) | 4 out log10 | log10(x) | - | log10(x) | 4 out ln | ln(x) | - | ln(x) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.