School · Maths · Advanced

Logarithm calculator

A logarithm answers one question: what power do I raise this base to, in order to get this number? Fill in two of the three and this finds the third, showing the change of base rule where it applies.

logb(x) = y   means   by = x
Leave exactly one blank. Common bases: 10 for "log", e ≈ 2.71828 for "ln", and 2 in computing. The base must be positive and not 1, and x must be positive.

What a logarithm actually is

A logarithm is the inverse of raising to a power. If 2⁶ = 64, then log₂(64) = 6. The log is asking: how many times do I multiply 2 by itself to reach 64? The answer is the exponent.

That is the whole idea. Every log question is an index question written the other way round, and switching between the two forms is usually the fastest way to see what a question wants.

Reading the notation: "log" written with no base usually means base 10, though in some higher-level and computing contexts it means base e or base 2. "ln" always means base e, the natural logarithm. "lg" means base 10 under ISO 80000-2, which reserves "lb" for base 2 and states that lg should not be used for the binary logarithm. If a question just says log and it matters, check what your syllabus assumes.

The log laws

These three come directly from the index laws, which is worth seeing rather than memorising blindly. Multiplying powers adds exponents, so multiplying inside a log adds the logs.

LawRuleComes from
Productlog(xy) = log x + log ybᵐ × bⁿ = bᵐ⁺ⁿ
Quotientlog(x ÷ y) = log x − log ybᵐ ÷ bⁿ = bᵐ⁻ⁿ
Powerlog(xⁿ) = n log x(bᵐ)ⁿ = bᵐⁿ
Change of baselog_b x = log x ÷ log blets you use any calculator

Two useful facts fall out of these. log_b(1) = 0 for any base, because anything to the power zero is 1. And log_b(b) = 1, because a base to the power one is itself.

The mistake that costs the most marks

log(x + y) is not log x + log y. The product law applies to multiplication inside the log, not addition. There is no law that simplifies the log of a sum, and trying to split one is probably the single most common error in this topic.

Similarly, log(x) ÷ log(y) is not log(x ÷ y). The quotient law is about division inside the log. A ratio of two separate logs is the change of base formula, which is a different thing entirely.

Common questions

Why can't the base be 1?
Because 1 raised to any power is always 1. There would be no exponent that gives you 5, and infinitely many that give you 1, so the log would be either undefined or ambiguous. The base also cannot be zero or negative for similar reasons.
Why can't I take the log of a negative number?
At school level, because no real power of a positive base gives a negative result. 2 raised to anything is always positive. Logs of negative numbers do exist in complex numbers, which is beyond most syllabuses.
When would I actually use logarithms?
Whenever the unknown is in an exponent, such as compound interest or radioactive decay questions asking how long something takes. Logs are also used for scales that span huge ranges, like pH, decibels and the Richter scale.
What is e and why is it special?
e ≈ 2.71828 is the base where the rate of growth equals the current value at every point, which makes calculus with it unusually clean. That is why natural logs appear throughout higher maths, physics and finance.