The logarithm expansion calculator above rewrites a logarithm using the three laws that make logarithms useful: the product rule, the quotient rule and the power rule. Point it at a single log of a complicated argument and it breaks it into a sum and difference of simple ones. Switch direction and it does the reverse, collapsing a string of separate log terms back into one. Both directions come with a numerical check that evaluates the before and after at test values, so an error in the rewrite shows up immediately as two numbers that disagree.
Arb Digital built this as an algebra tool rather than an evaluator. Our logarithm calculator answers "what is log base 2 of 64" and returns 6. This page never asks what anything equals — it changes the form of an expression while preserving its value, which is the step that appears in differentiation, in solving exponential equations, and in every derivation where a product needs to become a sum.
What This Logarithm Expansion Calculator Does
In expand mode it parses the argument of the logarithm into a structure of products, quotients, powers and roots, then applies the laws recursively until every remaining log has a single indivisible argument. Numerical constants are kept as their own terms rather than being evaluated, so log(100x) becomes log(100) + log(x) and the structure stays visible. Exponents that are themselves numbers become coefficients; exponents that are variables stay where they are, because the power rule needs a number to pull out front.
In condense mode it takes a list of coefficient-and-argument pairs and assembles the single logarithm they are equivalent to, putting positive coefficients in the numerator and negative ones in the denominator, each raised to the magnitude of its coefficient. Both directions run the same numerical verification: each distinct variable is assigned a small test value, both forms are evaluated, and the two figures appear side by side in the grid.
How to Use It
- Pick the direction. Expand is for simplifying a messy argument. Condense is usually the step before solving, since an equation with one log on each side can be attacked directly.
- Write products explicitly. Use x*y rather than xy so the parser reads two variables rather than one variable named "xy".
- Use sqrt( ) for roots. A square root becomes a coefficient of one half, which is the power rule doing its job.
- Choose the base for the check only. The algebra is identical in every base; the base changes only the two numerical values reported.
- Compare the last two grid figures. They should match to the displayed precision. If they do not, something in the input is not what you intended.
The Three Rules and How They're Applied
Everything on this page comes from three identities. The product rule: log(MN) = log(M) + log(N). The quotient rule: log(M/N) = log(M) − log(N). The power rule: log(Mᵖ) = p·log(M). All three follow directly from the laws of exponents, because a logarithm is an exponent — multiplying powers adds their exponents, so taking logs of a product adds the logs. Paul's Online Notes at Lamar University sets out the same basic properties of logarithm functions, including the common and natural logarithms this tool offers.
The NIST Digital Library of Mathematical Functions section on logarithm identities states all three formally, along with the domain restrictions that apply once complex arguments are allowed. Roots are handled by the power rule too, since a square root is a power of one half and a cube root a power of one third. That gives the fractional coefficients you will see for any sqrt term.
Work the default through. The argument is (x³·y) ÷ z². The quotient rule splits it into log(x³·y) − log(z²). The product rule splits the first part into log(x³) + log(y). The power rule pulls both exponents out front, giving 3·log(x) + log(y) − 2·log(z). Verify it numerically with x = 2, y = 3, z = 5 in base 10: the original argument is (8 × 3) ÷ 25 = 0.96, whose common log is −0.017729. The expanded form is 3(0.30103) + 0.477121 − 2(0.69897) = 0.90309 + 0.477121 − 1.39794 = −0.017729. Identical, which is what the grid reports.
The Rule That Does Not Exist
There is no law for the logarithm of a sum. log(M + N) does not equal log(M) + log(N), it does not equal log(M)·log(N), and it does not simplify at all. This is the single most common error in the subject and it survives well into calculus courses, largely because the product rule looks so much like the thing people want to write.
The numbers dispose of it instantly. In base 10, log(2 + 3) = log(5) = 0.69897, while log(2) + log(3) = 0.30103 + 0.47712 = 0.77815. Not close. What log(M) + log(N) actually equals is log(MN) = log(6) = 0.77815 — the same 0.77815, confirming that the sum of logs is the log of the product, never of the sum. This calculator will not expand a sum, because there is nothing to expand; if your argument contains addition, factor it first. log(x² − 4) goes nowhere on its own, but written as log((x − 2)(x + 2)) it becomes log(x − 2) + log(x + 2) immediately.
Domain: What Expansion Quietly Changes
Expansion is not always an equivalence, and this catches people out in equation solving. Consider log(x²). Its domain is every x except zero, since x² is positive for both signs. Apply the power rule and you get 2·log(x), whose domain is x greater than zero only. The two expressions agree wherever both are defined, but the expanded form has quietly lost the negative half of the domain.
The same thing happens in reverse with the product rule. log(x) + log(x − 3) requires both x greater than 0 and x greater than 3, so effectively x greater than 3. Condense it to log(x(x − 3)) and the argument is also positive for x less than 0, so the condensed form admits solutions the original never had. This is exactly why solving a logarithmic equation by condensing requires checking every candidate solution back in the original equation — condensing can manufacture extraneous roots, and expanding can discard valid ones. Our quadratic equation solver is often the next step once the logs are gone, and the same check applies to whatever it returns.
Why Expansion Is Worth Doing at All
Three reasons, all practical. First, differentiation: the derivative of ln((x³·y)/z²) is unpleasant by the chain rule and trivial once expanded, which is the whole basis of the technique called logarithmic differentiation. Second, solving: an equation with one log term on each side can have both sides exponentiated away, so condensing several terms into one is the move that makes the equation solvable at all.
Third, and most underappreciated, numerical stability. Multiplying many small probabilities together underflows to zero in floating point remarkably quickly — a thousand values of 0.01 multiplied together is 10 to the power minus two thousand, far below what a double can represent. Take logs and the product becomes a sum of manageable negative numbers that never underflows. This is why almost every statistical model works with log-likelihoods rather than likelihoods, and it is the product rule doing the work. Our logarithm calculator and exponent calculator handle the evaluation side of that conversion.
Change of Base, and When You Need It
The three expansion rules never change the base, so a mixed-base expression cannot be combined until the bases agree. The change-of-base formula fixes that: logb(x) = logc(x) ÷ logc(b) for any convenient base c. It is what lets a calculator that only knows base 10 and base e evaluate a base-7 logarithm, and it is also what lets you combine log₂(x) with ln(x) in the same expression.
Notice the shape of it: converting between bases multiplies by a constant. That is why the base is irrelevant to the algebra of expansion — every term picks up the same constant factor, so an identity in one base is an identity in all of them. It is also why the choice of base in this tool affects only the two numerical values in the grid. For related transformations of the underlying quantity rather than the notation, our scientific notation converter handles the powers-of-ten side of the same idea.
Arb Digital builds educational tools and content that earn links because they are genuinely correct, not because they are optimised.
Explore Content Marketing Talk To Our TeamCommon Mistakes to Avoid
- Splitting the log of a sum — log(M + N) has no expansion at all, and treating it like the product rule is the most frequent error in the topic.
- Dropping the domain restriction — expanding log(x²) to 2·log(x) silently discards every negative value of x that the original allowed.
- Skipping the check after condensing — condensing can create solutions the original equation never had, so every candidate must be substituted back.
- Applying the power rule to the whole log — log(M)ᵖ is the log raised to a power, which is not the same object as log(Mᵖ) and does not simplify.
- Combining logs of different bases — the rules only apply within one base, so change of base has to come first.
Related Free Tools From Arb Digital
Evaluate a logarithm numerically with the logarithm calculator, work with powers using the exponent calculator, move between decimal and powers of ten with the scientific notation converter, solve what is left after the logs are gone with the quadratic equation solver, or model compounding with the exponential growth calculator. Everything we publish is listed on the free online tools hub.
Frequently Asked Questions
The product rule turns log of MN into log M plus log N, the quotient rule turns log of M over N into log M minus log N, and the power rule turns log of M to the p into p times log M.
No. There is no rule for log of M plus N, and it does not equal log M plus log N. If the argument contains addition, the only route is to factor it into a product first.
Sometimes. Expanding log of x squared into two times log x restricts the domain to positive x only, even though the original was defined for negative x as well. The two agree wherever both are defined.
A root is a fractional power, so the power rule applies. A square root becomes a coefficient of one half and a cube root becomes one third.
Because combining terms can widen the domain. A condensed argument may be positive for values that made one of the original terms undefined, so every candidate solution has to be substituted back into the original equation.
No. The three rules hold in every base, because changing base multiplies every term by the same constant. The base only matters when you evaluate the expression numerically.
Because multiplying many small probabilities underflows to zero in floating-point arithmetic. The product rule turns that product into a sum of logs, which stays in a representable range.
This page explains algebraic identities for educational purposes. Expansion and condensation can change the domain of an expression, so any result used in solving an equation should be checked against the original.