Log Calculator
Solve logb(x) = y for any missing value — enter any two of base, argument, and result to find the third.
Solved for Result
2
log10(100) = 2
Base
10
Argument
100
Result
2
What is a Log Calculator?
A logarithm calculator solves the equation logb(x) = y — "to what power y must base b be raised to produce x?" Logarithms are the inverse of exponentiation: if by = x, then by definition logb(x) = y. This calculator solves for whichever of base, argument, or result you don't already know.
The two most common logarithm bases have their own names and shorthand notation: base 10 is called the "common log" (often just written "log" with no base shown), and base e ≈ 2.71828 is the "natural log," written "ln." Base 2 logarithms are common in computer science, since they describe doublings — how many times you can halve a value, or how many bits are needed to represent a number.
Logarithm Rules
- Product rule: logb(xy) = logb(x) + logb(y)
- Quotient rule: logb(x/y) = logb(x) − logb(y)
- Power rule: logb(xⁿ) = n × logb(x)
- Identity: logb(b) = 1, and logb(1) = 0
The Change of Base Formula
Calculators and computers typically only compute logarithms natively in base 10 or base e. To find a logarithm in any other base, the change of base formula converts it:
where k is any convenient base (usually 10 or e). This is exactly how this calculator computes results internally for an arbitrary base.
Why Logarithmic Scales Exist
Logarithms compress enormous ranges of numbers into manageable scales, which is why they show up throughout science: the Richter scale for earthquake magnitude, the decibel scale for sound intensity, and the pH scale for acidity are all logarithmic. Each one-point increase on these scales represents a tenfold (or similar) jump in the underlying quantity — a magnitude 6 earthquake releases about 32 times more energy than a magnitude 5, not just "a bit more." Logarithms make it possible to compare things that vary across many orders of magnitude on a single, readable scale.
Example — Your Current Inputs
log10(100) = 2
Additional Example — pH Scale
pH is defined as pH = −log₁₀[H⁺], the negative base-10 logarithm of hydrogen ion concentration. A solution with [H⁺] = 10⁻⁷ mol/L (neutral water) has pH = −log₁₀(10⁻⁷) = 7. A solution ten times more acidic, with [H⁺] = 10⁻⁶, has pH = 6 — one whole pH point lower for a tenfold concentration increase, exactly the compression a logarithmic scale provides.
About These Parameters
- Base
- The number being repeatedly multiplied. Must be positive and not equal to 1 (a base of 1 can never produce any result other than 1, so no exponent could solve for other arguments). Common choices are 10, e (≈2.71828), and 2.
- Argument (x)
- The number you're taking the logarithm of. Must be strictly positive — logarithms of zero or negative numbers are undefined in the real numbers.
- Result (y)
- The exponent that base must be raised to in order to produce the argument. Leave this blank to solve for it directly; fill it in along with either base or argument to solve for the other.
Frequently Asked Questions
What's the difference between "log" and "ln"?
"log" with no base written conventionally means base 10 (the common logarithm). "ln" always means base e ≈ 2.71828 (the natural logarithm), which arises naturally in calculus, continuous compound interest, and exponential growth/decay models. Some fields (especially computer science) use unlabeled "log" to mean base 2 instead — always check context when the base isn't explicit.
Why is the logarithm of a negative number undefined?
Because no real exponent applied to a positive base can ever produce a negative result — a positive number raised to any real power stays positive. (Complex analysis does define logarithms of negative numbers using imaginary numbers, but that's outside the scope of this calculator.)
Why is logb(1) always 0?
Because any nonzero base raised to the power 0 equals 1 (b⁰ = 1), and a logarithm is defined as exactly that exponent. So no matter what base you choose, the question "what power of b gives 1?" always has the same answer: 0.
How do logarithms relate to the number of digits in a number?
The base-10 logarithm of a positive integer, rounded down and added to 1, gives the number of digits it has. For example, log₁₀(999) ≈ 2.9996, so floor(2.9996) + 1 = 3 digits — correct, since 999 has three digits. This relationship is why base-10 logs are so useful for quickly estimating the scale of very large numbers.