Converting Between Logarithm Bases Without a Table
You're working through a problem and you need log base 3 of 17, but your calculator only does base 10 or base e. You could set up a whole system of equations, but there is a much faster shortcut that most textbooks bury three chapters too late. Here is the formula itself, stripped of any decoration: log_b(a) equals log_c(a) divided by log_c(b), where c is any positive number other than 1. You pick whichever base c is available on your tool of choice. In practice that means c is almost always 10 or e. The natural log version looks like ln(a) over ln(b). The common log version looks like log(a) over log(b). They give the same numerical result. It is worth checking both when you are debugging something, because floating point rounding can differ slightly between the two paths on cheap calculators. I used to derive this from scratch every time I needed it, writing out exponents and cross-multiplying. It takes about two minutes and then you forget the algebra after a week. Now I just apply it directly. The derivation is straightforward if you ever need it: let x equal log_b(a), rewrite that as b to the x equals a, take the log base c of both sides, use the power rule to pull x down, and solve. That is the entire proof. Three lines.
The formula works in reverse too, which people rarely use. If you have log_c(a) divided by log_c(b), you can collapse it back into log_b(a). I ran into a situation recently where I was simplifying a ratio of logarithms in a signal processing filter design, and the expression had been written as ln(8) over ln(2) in some intermediate step. Recognizing it as log base 2 of 8 immediately told me the answer was 3 without any computation. That kind of recognition saves more time than most people realize.
Practical Use Cases Where This Actually Matters
The most common scenario is evaluation on hardware that does not support arbitrary bases. Standard scientific calculators from the last thirty years only have buttons for log and ln. Engineers, students, and anyone doing quick estimations use the formula constantly. But it also comes up in entropy calculations in information theory, where you might be converting between natural log nats and log base 2 bits. The conversion factor is exactly 1 over ln(2), which is roughly 1.4427. That number shows up everywhere in compression and coding theory, and it is just the change of base formula applied to the constant function log_2(e). There is also the case where you are comparing growth rates across different bases. Log base 10 of a million is 6. Log base 2 of a million is about 19.93. The change of base formula lets you translate between them directly instead of computing each from scratch. That matters when you are doing complexity analysis and need to show that log base 2 of n and log base 10 of n differ only by a constant factor, which is why computer science big-O notation ignores the base entirely.
Get the Full Details

A Specific Edge Case I Encountered
Last year I was working on a batch script that computed log base 7 of several hundred sensor readings stored in a CSV file. Python's math.log function takes an optional second argument for the base, but the older environment we were deploying to had Python 2.6, which does not support that second argument. I had to implement the formula manually using the common log function. The straightforward division approach worked fine for most values, but I hit a wall when some readings were extremely small, approaching machine epsilon. The numerator and denominator both approached zero, and the division introduced significant rounding error. My workaround was to use the natural log instead of the common log and to switch to the decimal module for the problematic entries. That extra precision step reduced the error from about 0.003 relative to the known answer down to below 1e-12. Not a glamorous fix, but it kept the pipeline from producing garbage output on the tail end of the distribution. The first mistake people make is reversing the numerator and the denominator. log_b(a) is log_c(a) over log_c(b), not the other way around. Put the argument you are taking the log of on top, and the base you are converting away from on the bottom. I have seen this error cost students points on exams repeatedly, and it shows up in code reviews when someone implements a log conversion function without checking the identity against a known value. The second mistake is picking a base c that is problematic for your computational environment. If you are working in a system where floating point underflow is a real concern, choosing c equals 1/2 can produce wildly inaccurate results compared to c equals 10 or e. There is no mathematical difference, but there is a huge numerical one. Always use 10 or e unless you have a reason not to.
A third issue is assuming the formula works when the base equals 1. It does not. Log base 1 is undefined, and plugging c equals 1 into the formula gives you 0 divided by 0, which is meaningless. This is obvious if you think about it, but I have seen it slip through in automated grading scripts that do not validate input domains.
When the Formula Falls Apart
The change of base formula assumes you are working within the standard real-valued logarithm framework. It breaks down in a few specific contexts. First, if a or b is negative or zero, the logarithm is undefined in the reals, and the formula gives you a domain error. Complex logarithms exist but they introduce branch cut ambiguities that the simple formula does not account for. Second, if b equals 1, you get division by zero since log_c(1) is always 0 regardless of c. Third, in modular arithmetic contexts where discrete logarithms are used, the change of base concept does not translate directly because there is no continuous logarithm function to divide. If you are dealing with discrete logarithms in cryptography, for example in Diffie-Hellman key exchange computations, you need completely different tools. The change of base formula will not help you there. Similarly, if you are computing logarithms in finite fields, the notion of changing base is not well-defined in the same way. These are edge cases most people will never encounter outside of graduate-level number theory or applied cryptography, but they are worth knowing so you do not waste time applying the wrong tool.

Quick Reference For Common Conversions
log base 2 of x equals ln(x) divided by 0.693147, approximately. Log base 10 of x equals ln(x) divided by 2.302585, approximately. Log base e of x is just ln(x), obviously. Converting from natural log to base 2 multiplies by about 1.4427. Converting from base 2 to natural log multiplies by about 0.6931. Keeping these factors in your head speeds things up more than you might expect, especially during timed exams or quick engineering estimates. One thing that rarely gets mentioned is that you can chain the formula. If you need log base 3 of 5 and your only available base is 7, you can go log_7(5) over log_7(3). The intermediate base does not have to be 10 or e. It just has to be a base your calculator supports and that is positive and not equal to 1. This flexibility is useful in situations where a custom base is built into your measurement system, like certain decibel-like scales in acoustics where the reference quantity is neither 10 nor e. The formula is simple enough that most people learn it once and never think about it again. That is also its weakness. It is easy to forget the order of the terms when you are tired or pressed for time, and unlike something like the quadratic formula, it does not have a memorable rhythmic quality that locks it into long-term recall. Writing it out once and verifying it against a known value, like confirming that log_2(8) equals ln(8) over ln(2) and both sides give 3, is the fastest way to make sure you have it right before you start applying it to anything that matters.