Logarithm Calculator
Reviewed by CalcMulti Editorial Team·Last updated: February 2026
Use our free Logarithm Calculator to compute logarithms for any positive number in base 10, natural log (base e), or a custom base.
Result
About Logarithms: A logarithm answers the question: "To what power must the base be raised, to produce a given number?" This calculator supports base 10, natural logarithm (base e), and any positive custom base.
Practical Applications: Useful in mathematics, physics, engineering, finance, and data analysis for exponential growth, sound intensity, and pH calculations.
What Are Logarithms?
A logarithm is the inverse operation of exponentiation. It answers the question: "To what power must a given base be raised to produce a specific number?" In mathematical notation, if b^y = x, then the logarithm base b of x equals y.
logb(x) = y means by = x
For example, log10(1000) = 3 because 10 raised to the 3rd power equals 1000. Logarithms are used extensively in science, engineering, and finance to handle quantities that span many orders of magnitude.
Fundamental Logarithm Rules
Three core rules govern how logarithms behave. Mastering these rules makes it possible to simplify and solve complex logarithmic expressions.
Product Rule: logb(x * y) = logb(x) + logb(y)
Quotient Rule: logb(x / y) = logb(x) - logb(y)
Power Rule: logb(xn) = n * logb(x)
Additionally, the Change of Base Formula lets you convert between bases: logb(x) = logk(x) / logk(b). This is particularly useful when your calculator only supports base-10 or natural logarithms.
Natural Log vs. Common Log
The two most widely used logarithm bases are 10 and e (approximately 2.71828). The common logarithm (log10, often written simply as "log") is used in everyday calculations and in fields like chemistry (pH scale) and acoustics (decibels). The natural logarithm (loge, written as "ln") is central to calculus, continuous growth models, and most branches of higher mathematics.
Common Logarithm Values
| x | log10(x) | ln(x) |
|---|---|---|
| 1 | 0 | 0 |
| 2 | 0.3010 | 0.6931 |
| e (2.718) | 0.4343 | 1 |
| 10 | 1 | 2.3026 |
| 100 | 2 | 4.6052 |
| 1000 | 3 | 6.9078 |
Real-World Applications of Logarithms
Logarithms are far from purely theoretical -- they appear in many practical contexts:
- Richter Scale (Earthquakes): The Richter scale is logarithmic. An earthquake measuring 6.0 is ten times more powerful than one measuring 5.0, meaning each whole-number increase represents a tenfold increase in measured amplitude.
- Decibels (Sound Intensity): Sound levels are measured in decibels using a logarithmic scale. A sound at 80 dB is ten times more intense than one at 70 dB. This allows a vast range of intensities to be expressed in manageable numbers.
- pH Scale (Chemistry): The pH of a solution is defined as pH = -log10[H+], where [H+] is the hydrogen ion concentration. A pH change of 1 unit represents a tenfold change in acidity.
- Compound Interest (Finance): The natural logarithm is used to calculate the time required for an investment to reach a target value under continuous compounding.
Step-by-Step Example: log₂(64)
Let's calculate log₂(64) — the power to which 2 must be raised to equal 64.
Step 1: Identify base = 2, number = 64
Step 2: Apply change of base formula: log₂(64) = ln(64) / ln(2)
Step 3: ln(64) = 4.1589, ln(2) = 0.6931
Step 4: 4.1589 / 0.6931 = 6
Verify: 2⁶ = 64 ✓
The answer is 6, because 2 must be raised to the 6th power to produce 64. You can verify any logarithm result by checking that base^result equals the original number.
Common Mistakes with Logarithms
Mistake 1: log(a + b) ≠ log(a) + log(b)
The product rule applies to multiplication, not addition. log(a + b) cannot be simplified further. Only log(a × b) = log(a) + log(b).
Mistake 2: Confusing log₁₀ and ln
In most textbooks, "log" without a base means log₁₀. In many programming languages and scientific contexts, "log" means the natural log. Always clarify which base is intended to avoid errors.
Mistake 3: Taking log of a negative number
log(x) is only defined for x > 0 in real numbers. Attempting to compute log(−5) will return an error or undefined. Check your equation setup if this occurs.
Mistake 4: log(x/y) = log(x) / log(y) — Wrong!
The quotient rule is log(x/y) = log(x) − log(y), not division of logs. log(x) / log(y) is actually the change of base formula for log_y(x).
Logarithm Quick Reference Table
Memorize these common values — they appear frequently in exams, engineering, and science.
| Expression | Value | Explanation |
|---|---|---|
| log₁₀(1) | 0 | 10⁰ = 1 |
| log₁₀(10) | 1 | 10¹ = 10 |
| log₁₀(100) | 2 | 10² = 100 |
| log₁₀(1000) | 3 | 10³ = 1,000 |
| ln(1) | 0 | e⁰ = 1 |
| ln(e) | 1 | e¹ = e |
| ln(2) | ≈ 0.693 | Doubling time rule: 0.693/r |
| log₂(8) | 3 | 2³ = 8 (3 bits = 8 values) |
| log₂(1024) | 10 | 2¹⁰ = 1,024 (1 KB = 2¹⁰ bytes) |
Related Math Tools
Logarithms are closely related to exponents and appear throughout statistics and algebra.
Antilogarithm: Reversing the Logarithm
The antilogarithm (antilog) is the inverse operation of the logarithm. If logb(x) = y, then antilogb(y) = by = x. It answers: "What number has this logarithm?"
Base-10 antilog
antilog₁₀(y) = 10ʸ
antilog₁₀(3) = 10³ = 1,000
Natural antilog
antiln(y) = eʸ
antiln(2) = e² ≈ 7.389
| Logarithm | Value (y) | Antilog = b^y |
|---|---|---|
| log₁₀(x) = 2 | 2 | 10² = 100 |
| log₁₀(x) = 3.5 | 3.5 | 10^3.5 ≈ 3,162 |
| ln(x) = 1 | 1 | e¹ ≈ 2.718 |
| ln(x) = 4 | 4 | e⁴ ≈ 54.60 |
Doubling Time and Half-Life Using ln
Natural logarithm is the key to calculating how long exponential processes take to double or halve. Two of the most useful formulas in science and finance:
Doubling Time
T₂ = ln(2) / r ≈ 0.693 / r
Also expressed as the Rule of 72: T₂ ≈ 72 / (r × 100)
Half-Life
T½ = ln(2) / λ ≈ 0.693 / λ
Used for radioactive decay, drug clearance, and exponential decay processes.
| Scenario | Rate (r) | Doubling Time | Formula |
|---|---|---|---|
| S&P 500 (avg ~10%) | 10%/yr | ~7.3 years | ln(2)/0.10 |
| Savings account (5%) | 5%/yr | ~13.9 years | ln(2)/0.05 |
| E. coli doubling | ~100%/20 min | 20 minutes | ln(2)/ln(2) × 20 min |
| Carbon-14 decay | decay constant λ | 5,730 years | ln(2)/λ |
Logarithmic Scales: Richter, Decibels, and pH
Many measurement systems use logarithmic scales because the phenomena they measure span many orders of magnitude. A linear scale would require enormous numbers to represent the full range.
| Scale | Formula | +1 unit means | Example |
|---|---|---|---|
| Richter (earthquakes) | M = log₁₀(A/A₀) | 10× more wave amplitude | M7 is 10× stronger than M6 |
| Decibels (sound) | dB = 10·log₁₀(I/I₀) | ~26% more intensity | Jet engine: 140 dB vs library: 40 dB (10¹⁰ more intense) |
| pH (acidity) | pH = −log₁₀[H⁺] | 10× more acidic | Lemon (pH 2) is 100× more acidic than coffee (pH 4) |
pH Worked Example
If [H⁺] = 0.001 mol/L (10⁻³), then pH = −log₁₀(10⁻³) = −(−3) = 3. This corresponds to vinegar — strongly acidic. At pH 7 (neutral water), [H⁺] = 10⁻⁷ mol/L. The 4-unit difference means vinegar has 10⁴ = 10,000 times more hydrogen ions than water.
Binary Logarithm (log₂) in Computer Science
Base-2 logarithm is fundamental in computer science and algorithm analysis. It answers: "How many bits are needed?" and "How many times can you halve this?"
Algorithm Complexity (Big O)
Binary search takes log₂(n) steps to find an element in a sorted list of n items. For a list of 1,024 items: log₂(1024) = 10 comparisons maximum. For 1,000,000 items: log₂(10⁶) ≈ 20 comparisons.
Bit Count
To store n different values you need ⌈log₂(n)⌉ bits. For 256 values: log₂(256) = 8 bits (1 byte). For 65,536 values: log₂(65,536) = 16 bits (2 bytes). For 1,000 values: ⌈log₂(1000)⌉ = ⌈9.97⌉ = 10 bits.
| n values | log₂(n) bits | Binary search steps | Use case |
|---|---|---|---|
| 2 | 1 bit | 1 | Boolean (true/false) |
| 256 | 8 bits | 8 | ASCII characters (1 byte) |
| 65,536 | 16 bits | 16 | Basic Unicode (2 bytes) |
| 1,000,000 | ≈20 bits | 20 | Large database lookup |
Logarithm vs Exponent: Inverse Operations
Logarithms and exponents are inverse operations — each undoes the other. Understanding this relationship is the key to solving exponential equations.
| Question | Use exponent | Use logarithm |
|---|---|---|
| What is 2 to the power 10? | 2¹⁰ = 1,024 | — |
| How many doublings to reach 1,024? | — | log₂(1024) = 10 |
| $1,000 growing at 7% for 20 years? | 1000×1.07²⁰ = $3,870 | — |
| How long to reach $3,870 at 7%? | — | ln(3.87)/ln(1.07) ≈ 20 yrs |
Common Logarithm Values — Quick Reference Table
log₁₀ (common log), ln (natural log, base e ≈ 2.71828), and log₂ (binary log) for frequently used numbers.
| x | log₁₀(x) | ln(x) | log₂(x) | Note |
|---|---|---|---|---|
| 0.1 | −1 | −2.3026 | −3.3219 | 10⁻¹ |
| 0.5 | −0.3010 | −0.6931 | −1 | ½ |
| 1 | 0 | 0 | 0 | Always 0 |
| 2 | 0.3010 | 0.6931 | 1 | Key value |
| e ≈ 2.718 | 0.4343 | 1 | 1.4427 | ln(e) = 1 |
| 3 | 0.4771 | 1.0986 | 1.5850 | |
| 4 | 0.6021 | 1.3863 | 2 | 2² |
| 5 | 0.6990 | 1.6094 | 2.3219 | |
| 7 | 0.8451 | 1.9459 | 2.8074 | |
| 8 | 0.9031 | 2.0794 | 3 | 2³ |
| 10 | 1 | 2.3026 | 3.3219 | log₁₀=1 always |
| 16 | 1.2041 | 2.7726 | 4 | 2⁴ |
| 20 | 1.3010 | 2.9957 | 4.3219 | |
| 25 | 1.3979 | 3.2189 | 4.6439 | 5² |
| 50 | 1.6990 | 3.9120 | 5.6439 | |
| 100 | 2 | 4.6052 | 6.6439 | 10² |
| 1,000 | 3 | 6.9078 | 9.9658 | 10³ |
| 10,000 | 4 | 9.2103 | 13.2877 | 10⁴ |
| 1,000,000 | 6 | 13.8155 | 19.9316 | 10⁶ |