Logarithm Calculator
Calculate common (log10), natural (ln), and custom base logarithms with antilog and change of base formula.
Reviewed by CalculatorApp.me Math Team
Logarithm Calculator — Complete Guide
Common, natural, and custom-base logarithms — properties, laws, change of base, and real-world scales.
log₁₀
Common log
ln
Natural log (base e)
log₂
Binary log
Change of Base
logₐb = ln b / ln a
What Are Logarithms?
A logarithm answers the question: "To what power must a base be raised to produce a given number?" If by = x, then logb(x) = y. For example, log10(1000) = 3 because 103 = 1000. Logarithms are the inverse of exponentiation.
Three logarithm bases dominate science and engineering: Common log (log₁₀) — used for decibels, pH, Richter scale; Natural log (ln, base e ≈ 2.71828) — used in calculus, physics, continuous growth; Binary log (log₂) — used in computer science, information theory.
Logarithms transform multiplication into addition and exponentiation into multiplication — which is why slide rules worked for 350 years before electronic calculators. Today, logarithmic scales compress enormous ranges (earthquake energy, sound intensity, hydrogen ion concentration) into human-readable numbers.
Logarithm Laws & Formulas
Definition: logₐ(x) = y ⟺ aʸ = x Product Rule: logₐ(xy) = logₐ(x) + logₐ(y) log(2×5) = log(2)+log(5) = log(10) = 1 Quotient Rule: logₐ(x/y) = logₐ(x) − logₐ(y) log(100/10) = log(100)−log(10) = 2−1 = 1 Power Rule: logₐ(xⁿ) = n × logₐ(x) log(10³) = 3 × log(10) = 3 Identities: logₐ(1) = 0 (any base) logₐ(a) = 1 (any base) a^(logₐ(x)) = x (inverse property) logₐ(aˣ) = x (inverse property)
The product and quotient rules convert multiplication/division into addition/subtraction — the fundamental trick that made slide rules and log tables possible for centuries.
Change of Base Formula:
logₐ(b) = logc(b) / logc(a)
logₐ(b) = ln(b) / ln(a)
logₐ(b) = log₁₀(b) / log₁₀(a)
Example: log₅(100)
= log₁₀(100)/log₁₀(5)
= 2/0.69897
= 2.861
Converting between bases:
log₂(x) = ln(x)/ln(2) = log₁₀(x)/0.30103
ln(x) = log₁₀(x)/log₁₀(e)
= log₁₀(x)/0.43429
= log₁₀(x) × 2.30259
Useful constants:
ln(2) ≈ 0.6931 → doubling time
ln(10) ≈ 2.3026 → log₁₀ ↔ ln conversion
log₂(10) ≈ 3.3219 → bits per digitAny calculator with log₁₀ or ln can compute any base logarithm using the change of base formula. This is how hardware calculators typically work internally.
Euler's number: e ≈ 2.718281828...
e = lim(n→∞) (1 + 1/n)ⁿ
e = 1 + 1/1! + 1/2! + 1/3! + ...
Derivatives:
d/dx ln(x) = 1/x
d/dx logₐ(x) = 1/(x·ln(a))
d/dx eˣ = eˣ (unique self-derivative)
Integral:
∫(1/x)dx = ln|x| + C
∫ln(x)dx = x·ln(x) − x + C
Continuous growth/decay:
A = A₀ × eʳᵗ
Half-life: t½ = ln(2)/λ ≈ 0.693/λ
Doubling time: t₂ = ln(2)/r ≈ 0.693/r
Rule of 72: t₂ ≈ 72/r%
At 6% interest: 72/6 = 12 yearsThe natural logarithm is 'natural' because its derivative is simply 1/x — the simplest possible form. This makes ln the default choice in calculus and physics.
Solving log equations: 1) logₐ(x) = c → x = aᶜ log₃(x) = 4 → x = 3⁴ = 81 2) log(x) + log(x−3) = 1 log(x(x−3)) = 1 x(x−3) = 10 x²−3x−10 = 0 (x−5)(x+2) = 0 x = 5 (x = −2 rejected: log domain) 3) Exponential equation: 2ˣ = 100 x·log(2) = log(100) x = 2/0.30103 x = 6.644 4) Natural log equation: eˣ = 50 x = ln(50) x ≈ 3.912 Domain: logₐ(x) defined only for x > 0 Always check solutions against domain!
When solving logarithmic equations, always verify that solutions don't produce log of zero or negative numbers — these are domain violations that must be rejected.
Logarithmic Scales in the Real World
| Scale | Base | Formula | +1 Unit = | Example |
|---|---|---|---|---|
| Richter (earthquake) | 10 | log₁₀(A/A₀) | ×10 amplitude, ×31.6 energy | M5→M6 = 31.6× more energy |
| Decibels (sound) | 10 | 10·log₁₀(I/I₀) | ×10 intensity | 60 dB → 70 dB = 10× louder |
| pH (acidity) | 10 | −log₁₀[H⁺] | ×10 [H⁺] concentration | pH 4 is 10× more acidic than pH 5 |
| Stellar magnitude | ~2.512 | −2.5·log₁₀(F/F₀) | ×2.512 brightness | 5 mag diff = 100× brightness |
| Bits (information) | 2 | log₂(states) | ×2 possible states | 10 bits = 1024 states |
| Neper (engineering) | e | ln(V₂/V₁) | ×e ≈ 2.718 ratio | Used in RF engineering |
| f-stops (camera) | √2 | log₂(N²) | ×2 light exposure | f/2.8 → f/2 doubles light |
| Musical octave | 2 | log₂(f₂/f₁) | ×2 frequency | A4=440Hz → A5=880Hz |
Applications of Logarithms
| Field | Application | Why Logs? |
|---|---|---|
| Computer Science | Algorithm complexity O(log n) | Binary search halves data each step |
| Finance | Compound interest, Rule of 72 | ln(2)/r gives doubling time |
| Machine Learning | Cross-entropy loss, log-likelihood | Log converts products → sums, prevents underflow |
| Physics | Radioactive decay, Boltzmann entropy | S = k·ln(Ω) — entropy is logarithmic |
| Biology | Population growth modeling | Logistic growth: dN/dt = rN(1-N/K) |
| Signal Processing | Fourier transform, frequency analysis | Log-frequency scales match human hearing |
History of Logarithms
Napier — Mirifici Logarithmorum Canonis Descriptio
Scottish mathematician John Napier published the first logarithm tables after 20 years of computation. His 'Naperian logarithms' weren't quite natural logs (base e), but they revolutionized computation by converting multiplication to addition.
Briggs — Common Logarithms (Base 10)
Henry Briggs collaborated with Napier and computed the first base-10 logarithm tables (Logarithmorum Chilias Prima, 1617; Arithmetica Logarithmica, 1624). These tables remained essential computational tools for 350+ years.
Oughtred — The Slide Rule
William Oughtred invented the slide rule by placing two logarithmic scales side by side. Sliding one scale along the other mechanically adds logarithms — performing multiplication. Slide rules were standard engineering tools until the 1970s.
Mercator & Newton — Natural Logarithm Series
Nicholas Mercator published ln(1+x) = x − x²/2 + x³/3 − ... Newton independently derived the series and extended it. This connected logarithms to calculus and established ln as the 'natural' logarithm for mathematical analysis.
Euler — Introductio in Analysin Infinitorum
Leonhard Euler fully developed the relationship between e, ln, and complex numbers (e^(iπ) + 1 = 0). He established modern notation and proved that e is irrational, cementing logarithms as central to all higher mathematics.
HP-35 — The Calculator That Killed Slide Rules
Hewlett-Packard's HP-35, the first scientific pocket calculator, computed logarithms electronically using CORDIC algorithms. Within a decade, slide rules effectively disappeared. Today, log is a single button press or function call.
Key Research & Data
Napier (1614) — Mirifici Logarithmorum
Invention of Logarithms
Napier spent 20 years computing tables that converted multiplication to addition. His work reduced computation time for astronomers by orders of magnitude and was described by Laplace as 'doubling the life of an astronomer.'
Shannon (1948) — Bell System Technical Journal
Information Theory Uses log₂
Claude Shannon defined information entropy as H = −Σ pᵢ log₂(pᵢ), measured in bits. This logarithmic measure of information became the foundation of data compression, error correction, and digital communication.
Benford (1938) — Proceedings of the APS
Benford's Law (log distribution)
The leading digits of many datasets follow a logarithmic distribution: 1 appears ~30% of the time, 2 appears ~17.6%, etc. P(d) = log₁₀(1+1/d). Used to detect fraud in financial data, tax returns, and election results.
Knuth (1997) — The Art of Computer Programming
Algorithm Complexity: O(log n)
Logarithmic-time algorithms (binary search, balanced BSTs, divide-and-conquer) are fundamental to efficient computing. log₂(1 billion) ≈ 30 — meaning binary search finds any item in a billion-element sorted list in ~30 steps.
Myths vs. Facts
Logarithms are an obscure math concept with no practical use.
Logarithms are everywhere: the Richter scale, decibels, pH, musical scales, camera f-stops, binary search, machine learning loss functions, compound interest, radioactive decay. They compress enormous scales into manageable numbers.
'log' always means log base 10.
Convention varies by field. In pure math and most programming languages, log means ln (natural log, base e). In engineering and high school, log typically means log₁₀. In CS, lg or log₂ is common. Always check context.
You need log tables or special calculators to compute logarithms.
Every smartphone, calculator, and programming language has log functions built in. The change of base formula (logₐb = ln b / ln a) lets you convert any base. For mental math, log₁₀ of powers of 10 is trivial: log₁₀(1000) = 3.
The natural log base e is just an arbitrary constant.
e ≈ 2.71828 is the unique number whose exponential function eˣ equals its own derivative. It arises naturally in continuous compound interest, probability (derangements), and the limit (1+1/n)ⁿ. It's as fundamental as π.
Frequently Asked Questions
What is the difference between log, ln, and lg?▼
Why is ln called the 'natural' logarithm?▼
How do I convert between log₁₀ and ln?▼
What is the domain of logarithms?▼
What is the change of base formula?▼
Why does the Richter scale use logarithms?▼
How are logarithms used in computer science?▼
What is log-log paper and when is it used?▼
What is the relationship between e and compound interest?▼
Why do ML models use log-likelihood instead of likelihood?▼
What is a logarithmic spiral?▼
How do decibels work with logarithms?▼
References
- Napier — Mirifici Logarithmorum Canonis Descriptio (1614)
- Shannon — A Mathematical Theory of Communication (1948)
- Benford — The Law of Anomalous Numbers (1938)
- Euler — Introductio in Analysin Infinitorum (1748)
- Maor — e: The Story of a Number (Princeton Univ. Press)
- Knuth — The Art of Computer Programming, Vol. 1 (1997)
Related Calculators
Explore All Math Calculators
Precision math tools for students, engineers, and scientists — CalculatorApp.me.
Browse Math Calculators →Logarithm Calculator — Answer & Method
Calculate logarithms with any base including common (log10), natural (ln), and binary (log2).
Formula: Logarithm
log_b(x) = y means b^y = x
Example Calculation
log₁₀(1000) = 3 because 10³ = 1000.
Important limitation
Check the result against your specific circumstances before making a decision.
Key Facts
- ln(e) = 1 and log₁₀(10) = 1 by definition.
- Change of base: log_b(x) = ln(x)/ln(b).