About the Logarithm Calculator
A logarithm is an exponent looked at from the other end.
Exponents ask: what do I get if I raise 10 to the power 3? Answer, 1000. Logarithms ask the reverse: what power of 10 gives 1000? Answer, 3. Written log₁₀(1000) = 3.
That is the entire idea. Everything else — natural logs, change of base, log scales, the reason earthquakes are measured this way — follows from it.
Logarithms have a second property that made them historically indispensable and still makes them useful: they turn multiplication into addition. Before electronic calculators, multiplying two large numbers meant looking up their logs, adding, and looking up the answer. Slide rules are physical logarithm tables, and that is why they worked.
This calculator finds logarithms in any base, undoes them, and solves for the base itself.
How to Use the Logarithm Calculator
Find the logarithm takes a number and a base. Base 10 is the common log, base e is the natural log written ln, base 2 is the binary log used in computing. Pick "something else" to enter any other base.
Find the number (antilog) goes the other way: given a logarithm value and a base, it returns the number. This is just raising the base to that power.
Find the base takes a number and its logarithm, and works out which base makes the statement true.
Press Calculate. Along with the answer you get the relationship written out as a power, and the same number's logarithm in all three common bases — useful context, since the bases differ only by a constant factor.
How Logarithms Are Calculated
The definition is a restatement of a power:
log_b(x) = n means exactly b^n = x
Reading it aloud helps: "log base b of x is n" means "b to the power n is x".
Calculators do not implement a separate routine for every base. They compute one logarithm — usually the natural log — and convert. That conversion is the change-of-base formula:
log_b(x) = ln(x) / ln(b)
The two logarithms on the right can be in any base you like, as long as both use the same one, and the answer comes out identical. This is why a calculator with only log and ln keys can still give you log base 7 of 343.
Why it works: if log_b(x) = n, then b^n = x. Take the natural log of both sides, and the exponent comes down in front: n × ln(b) = ln(x). Divide by ln(b) and you have n.
Which base to use depends on the question:
- Base 10 for anything measured in orders of magnitude — sound, acidity,
earthquake energy.
- Base e for anything growing or decaying continuously. It appears
unavoidably in calculus, which is why it is called natural.
- Base 2 for anything that doubles — data sizes, binary search, information
measured in bits.
Logarithm Formula
Definition:
log_b(x) = n <-> b^n = x
Change of base:
log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b)
The laws:
log(a x b) = log(a) + log(b) multiplication becomes addition
log(a / b) = log(a) - log(b) division becomes subtraction
log(a^n) = n x log(a) powers come down in front
log_b(b) = 1
log_b(1) = 0
The third law is the one that solves equations. If you need to find n in 2ⁿ = 1000, take the log of both sides: n × log(2) = log(1000), so n = 9.966. Without logarithms there is no direct way to get an unknown down out of an exponent.
The first two laws are the historical ones. They convert the hard operations into easy ones, which is precisely what slide rules exploited.
Step-by-Step Example
Find log₂(64).
Step 1 — restate it as a power. 2 to what power gives 64?
Step 2 — count the doublings. 2, 4, 8, 16, 32, 64 — that is six doublings. So log₂(64) = 6.
Step 3 — confirm with change of base.
ln(64) = 4.158883
ln(2) = 0.693147
4.158883 / 0.693147 = 6
Both routes agree, and the second one works for values you cannot count in your head.
Now a practical one, and the case logarithms exist for. An investment grows 7% a year. How long until it doubles?
Step 1: set up the equation 1.07^n = 2
Step 2: take logs of both sides n x log(1.07) = log(2)
Step 3: solve n = log(2) / log(1.07)
= 0.301030 / 0.029384
= 10.24 years
Just over ten years. This is the arithmetic behind the "rule of 72" shortcut: 72 ÷ 7 ≈ 10.3, which is close because the rule is a linear approximation of exactly this logarithm.
Understanding Your Result
The answer is the logarithm — that is, the exponent.
Written out restates the result as a power, which is the quickest way to check it looks right. If it says 10³ = 1000, the logarithm was 3.
In other bases gives the same number's logarithm in base 10, base e and base
- These differ only by a constant multiplier, which is what change of base
means: ln(x) is always about 2.303 times log₁₀(x), whatever x is.
Some intuition for reading logarithms:
- A logarithm of 0 means the number is 1, in any base.
- A negative logarithm means the number is between 0 and 1. log₁₀(0.001) is
−3.
- Adding 1 to a base-10 logarithm multiplies the number by 10. This is what a
"log scale" means, and why each step on the Richter scale is ten times the amplitude.
When Should You Use This Calculator?
Solving for an exponent. Doubling time, half-life, how many periods of compound growth reach a target. Any time the unknown is up in the exponent.
pH and acidity. pH is −log₁₀ of hydrogen ion concentration, which is why a change of one pH unit is a tenfold change in concentration.
Sound and decibels. Decibels are a logarithmic ratio, which is why 10 dB louder is ten times the power but only about twice as loud to the ear.
Earthquakes. Magnitude is a base-10 log of amplitude. A magnitude 7 is ten times the shaking of a magnitude 6, and roughly 32 times the energy.
Computing. Binary search takes log₂(n) steps. Ten thousand items need about 14 comparisons, which is why sorted data is worth having.
Data presentation. Plotting on a log scale makes exponential growth appear as a straight line, and makes data spanning many orders of magnitude legible.
Common Mistakes
Taking the log of zero or a negative number. Undefined for both. No power of a positive base ever reaches zero — raising 10 to increasingly negative powers gives ever smaller positive values that approach zero without arriving.
Splitting a log across addition. log(a + b) is not log(a) + log(b). The addition law works the other way: log(a × b) = log(a) + log(b). Multiplication inside becomes addition outside, never addition inside.
Assuming log means base 10 everywhere. In mathematics and many programming languages, bare log means the natural log. In engineering and on calculator keys it usually means base 10. Check before you trust it.
Confusing ln with 1/n or with log. ln is the natural logarithm, base e ≈ 2.71828. It is a different function from log₁₀, though the two are proportional.
Forgetting that the base must be positive and not 1. Base 1 fails because 1 to any power is 1, so the logarithm cannot distinguish between exponents.
Mishandling a change-of-base division. It is log(x) ÷ log(b), not log(x ÷ b) and not log(x) − log(b). Both alternatives give wrong answers that look plausible.
Reading a log scale linearly. On a base-10 log axis, the gap from 1 to 10 is the same width as the gap from 10 to 100. Treating the scale as linear dramatically understates the larger values.