The Quick Answer
A logarithm answers one question: "What exponent turns the base into this number?"
log_b(x) = y means b^y = x
For example: log₁₀(1000) = 3, because 10³ = 1000.
That's the entire concept. Everything else — rules, formulas, applications — follows from this one definition.
Try it yourself: use our logarithm calculator to compute log base 10, natural log (ln), log base 2, or any custom base instantly.
What Is a Logarithm?
A logarithm is the inverse of exponentiation. If raising a base to a power gives you a number, the logarithm tells you what that power was.
Think of it as asking a question backward:
- Exponentiation: "2 raised to what power gives 8?" → 2³ = 8
- Logarithm: "The log base 2 of 8 is what?" → log₂(8) = 3
The formal definition:
log_b(x) = y ⟺ b^y = x
where:
- b is the base (must be positive, and not equal to 1)
- x is the argument (must be positive)
- y is the exponent (can be any real number)
If you can understand "2³ = 8," you already understand "log₂(8) = 3." They are the same statement written two different ways.
The Three Common Logarithm Types
Common Logarithm — log₁₀(x)
Base 10. Usually written as just "log(x)" on calculators and in engineering.
- log₁₀(10) = 1, because 10¹ = 10
- log₁₀(100) = 2, because 10² = 100
- log₁₀(1000) = 3, because 10³ = 1000
- log₁₀(1) = 0, because 10⁰ = 1
- log₁₀(0.1) = −1, because 10⁻¹ = 0.1
Used in: pH scale, decibels, Richter scale, scientific notation, engineering.
Natural Logarithm — ln(x)
Base e ≈ 2.71828. Written as "ln(x)."
- ln(e) = 1, because e¹ = e
- ln(1) = 0, because e⁰ = 1
- ln(e²) = 2
- ln(7.389) ≈ 2, because e² ≈ 7.389
Used in: calculus, growth and decay models, statistics, physics, compound interest.
The number e appears naturally in continuous growth processes — population growth, radioactive decay, continuously compounded interest. That's why ln is the default logarithm in higher mathematics.
Binary Logarithm — log₂(x)
Base 2. Sometimes written as "lb(x)" or "lg(x)" in some fields.
- log₂(2) = 1
- log₂(8) = 3, because 2³ = 8
- log₂(256) = 8, because 2⁸ = 256
- log₂(1024) = 10, because 2¹⁰ = 1024
Used in: computer science (algorithm complexity, binary search, bits of information), information theory, digital signal processing.
Logarithm Rules (Properties)
All logarithm rules come from the corresponding exponent rules. Here are the essential ones:
Product Rule
log_b(x × y) = log_b(x) + log_b(y)
Multiplication inside the log becomes addition outside. This is the fundamental reason logarithms were invented — they turn multiplication into addition.
Example: log₁₀(200) = log₁₀(2 × 100) = log₁₀(2) + log₁₀(100) = 0.301 + 2 = 2.301
Quotient Rule
log_b(x / y) = log_b(x) − log_b(y)
Division inside becomes subtraction outside.
Example: log₁₀(5) = log₁₀(10/2) = log₁₀(10) − log₁₀(2) = 1 − 0.301 = 0.699
Power Rule
log_b(x^n) = n × log_b(x)
An exponent inside the log becomes a multiplier outside. This rule is especially powerful for solving exponential equations.
Example: log₁₀(10000) = log₁₀(10⁴) = 4 × log₁₀(10) = 4 × 1 = 4
Identity and Zero
- log_b(b) = 1 — The log of the base is always 1
- log_b(1) = 0 — The log of 1 is always 0 (because b⁰ = 1 for any b)
Inverse Relationships
- b^(log_b(x)) = x — Exponentiation undoes the logarithm
- log_b(b^y) = y — Logarithm undoes exponentiation
These are the "cancel out" rules, similar to how √(x²) = x.
The Change of Base Formula
If your calculator only has log₁₀ and ln buttons, you can compute any logarithm using:
log_a(x) = log_b(x) / log_b(a) = ln(x) / ln(a) = log₁₀(x) / log₁₀(a)
Worked Example
Calculate log₅(125):
Using the change of base formula with natural log:
- log₅(125) = ln(125) / ln(5) = 4.828 / 1.609 = 3
Verify: 5³ = 125 ✓
Quick Conversion Between log₁₀ and ln
- ln(x) = log₁₀(x) × 2.302585 (multiply by ln(10))
- log₁₀(x) = ln(x) × 0.434294 (multiply by log₁₀(e))
Worked Examples
Example 1: Simple Evaluation
Evaluate log₁₀(500)
Convert to the definition: 10^y = 500
Using the product rule: log₁₀(500) = log₁₀(5 × 100) = log₁₀(5) + log₁₀(100) = 0.699 + 2 = 2.699
Example 2: Solving an Exponential Equation
Solve 3^x = 81
Take log of both sides: log(3^x) = log(81)
Apply the power rule: x × log(3) = log(81)
Solve for x: x = log(81) / log(3) = 1.908 / 0.477 = 4
Verify: 3⁴ = 81 ✓
Example 3: Compound Interest — How Long to Double?
If your savings grow at 5% annually, how many years to double?
The formula: 2 = 1.05^t
Take ln of both sides: ln(2) = t × ln(1.05)
Solve: t = ln(2) / ln(1.05) = 0.6931 / 0.04879 = 14.21 years
This is the mathematical basis of the "Rule of 72" — dividing 72 by the interest rate gives a quick estimate (72/5 = 14.4 years).
Example 4: Logarithms With Fractions
Evaluate log₂(0.25)
Rewrite 0.25 as a power of 2: 0.25 = 1/4 = 2⁻²
Therefore: log₂(0.25) = log₂(2⁻²) = −2
Key insight: logarithms of numbers between 0 and 1 are always negative.
Example 5: Simplifying a Logarithmic Expression
Simplify: 2 log₁₀(5) + log₁₀(4)
Apply the power rule to the first term: log₁₀(5²) + log₁₀(4) = log₁₀(25) + log₁₀(4)
Apply the product rule: log₁₀(25 × 4) = log₁₀(100) = 2
Logarithm Domain: What You Cannot Compute
Two restrictions are absolute:
-
x must be positive (x > 0). You cannot take the log of zero or a negative number (in the real number system). There is no real exponent y such that 10^y = 0 or 10^y = −5.
-
The base must be positive and not 1 (b > 0, b ≠ 1). A base of 1 would make every exponent give 1, so log₁(x) is undefined for any x ≠ 1. A negative or zero base creates contradictions with real exponents.
These restrictions mean:
- log₁₀(0) is undefined
- log₁₀(−3) is undefined (in real numbers)
- log₁(5) is undefined
- log₋₂(4) is undefined (in real numbers)
Where Logarithms Appear in the Real World
Decibels (Sound)
Sound intensity is measured on a log₁₀ scale. Decibels = 10 × log₁₀(I/I₀), where I₀ is the threshold of hearing.
- 0 dB = threshold of hearing
- 60 dB = normal conversation (1,000,000× more intense than 0 dB)
- 120 dB = pain threshold (10¹² × more intense)
Each +10 dB means 10× more sound intensity. The logarithmic scale compresses an enormous range (1 to 10¹²) into manageable numbers (0 to 120).
pH (Chemistry)
pH = −log₁₀[H⁺], where [H⁺] is hydrogen ion concentration.
- pH 7 = neutral (water)
- pH 3 = acidic (vinegar, [H⁺] = 0.001)
- pH 1 = very acidic ([H⁺] = 0.1)
Each pH unit represents a 10× change in acidity.
Richter Scale (Earthquakes)
Each whole number increase represents 10× more ground motion and roughly 31.6× more energy release. A magnitude 7 earthquake is 10× stronger in amplitude than magnitude 6.
Algorithm Complexity (Computer Science)
Binary search through a sorted list of n items takes at most log₂(n) comparisons:
- 1,000 items → ~10 steps
- 1,000,000 items → ~20 steps
- 1,000,000,000 items → ~30 steps
This O(log n) efficiency is why logarithms are fundamental to computer science.
Radioactive Half-Life (Physics)
The time for a substance to decay to a given fraction uses natural logarithms: t = −ln(remaining fraction) / λ, where λ is the decay constant.
Common Logarithm Mistakes (and How to Fix Them)
1. Confusing log(a + b) with log(a) + log(b) log(a) + log(b) = log(a × b), NOT log(a + b). There is no simple rule for log(a + b). This is the most frequent logarithm error.
2. Applying the power rule backward log(x^n) = n × log(x) is correct. But n × log(x) ≠ log(n × x). The exponent comes out as a multiplier, not an addend inside the argument.
3. Canceling the log incorrectly If log(x) = log(y), then x = y. But if log(x) = 3, then x = 10³ = 1000 (not x = 3). To "cancel" a log, exponentiate: raise the base to both sides.
4. Forgetting domain restrictions Writing log(x − 5) requires x > 5. If x = 3, log(3 − 5) = log(−2) is undefined. Always check that arguments are positive.
5. Mixing up log and ln On scientific calculators, "log" means log₁₀ and "ln" means log_e. In many programming languages and in pure mathematics, "log" often means ln. Know which convention your context uses.
log vs ln: When to Use Which
| Situation | Use | Why |
|---|---|---|
| Decibels, pH, scientific notation | log₁₀ | These scales are defined with base 10 |
| Calculus, differential equations | ln | The derivative of ln(x) is simply 1/x |
| Growth/decay models | ln | Continuous growth uses base e |
| Computer science, bits | log₂ | Binary systems use base 2 |
| General math (no context given) | Check convention | "log" means different things in different fields |
When in doubt, the change of base formula lets you convert between any two bases.
Frequently Asked Questions
What is a logarithm in simple terms? A logarithm is the reverse of an exponent. It tells you what power you need to raise a base to in order to get a specific number. For example, log₁₀(100) = 2 because you need to raise 10 to the power of 2 to get 100.
What is the difference between log and ln? "log" typically refers to the common logarithm with base 10 (log₁₀), while "ln" is the natural logarithm with base e ≈ 2.71828. They measure the same concept — exponents — but with different bases. You can convert between them: ln(x) = log₁₀(x) × 2.3026.
Why can't you take the log of zero or a negative number? Because no real exponent can make a positive base equal zero or a negative number. For example, 10^y is always positive no matter what y is. Since logarithms ask "what exponent gives this result," there is no answer for zero or negative inputs.
What is the change of base formula? log_a(x) = log_b(x) / log_b(a). This lets you calculate a logarithm with any base using just log₁₀ or ln, which are available on all calculators. For example: log₅(125) = ln(125) / ln(5) = 3.
What is an antilogarithm? The antilogarithm reverses a logarithm. If log₁₀(x) = 3, the antilog is 10³ = 1000. In general, the antilog base b of y is b^y. It's just exponentiation — the inverse operation.
What are the main logarithm rules? The three core rules are: product rule (log(xy) = log(x) + log(y)), quotient rule (log(x/y) = log(x) − log(y)), and power rule (log(x^n) = n·log(x)). All other properties follow from these three.
Why were logarithms invented? Scottish mathematician John Napier published the first logarithm tables in 1614 to simplify multiplication and division of large numbers. By converting multiplication to addition (using the product rule), logarithms made complex calculations practical before electronic calculators existed.
Is log₂ the same as log base 2? Yes. log₂(x) means "the logarithm of x with base 2." It answers: "2 raised to what power equals x?" For example, log₂(256) = 8 because 2⁸ = 256. It is fundamental in computer science and information theory.
What does O(log n) mean in computer science? O(log n) describes an algorithm whose running time grows proportionally to the logarithm (usually base 2) of the input size. Binary search is the classic example: searching 1 billion sorted items requires only about 30 comparisons, because log₂(1,000,000,000) ≈ 30.
How do logarithmic scales work? On a logarithmic scale, each equal step represents multiplication by a fixed factor rather than addition of a fixed amount. On the Richter scale, each +1 means 10× more ground motion. On the decibel scale, each +10 dB means 10× more sound intensity. This compresses huge ranges into readable numbers.
Can logarithms be negative? Yes — the result (output) of a logarithm can be negative. Specifically, the log of any number between 0 and 1 is negative. For example, log₁₀(0.01) = −2, because 10⁻² = 0.01. However, the input (argument) must always be positive.
What is the natural logarithm used for in real life? The natural logarithm appears in compound interest calculations, radioactive decay, population growth models, electrical circuit analysis, and statistical distributions. Any process involving continuous exponential growth or decay naturally uses ln and the constant e.