Expert Reviewed
Prof. Emily Rodriguez, Ph.D. MathematicsUpdated June 1, 2026Our Standards →

Last updated:

Logarithm Calculator

Calculate common (log10), natural (ln), and custom base logarithms with antilog and change of base formula.

Back to Math

Logarithm Calculator

Ad-FreeAI-Powered

Free online logarithm calculator — compute common, natural, and custom base logarithms with antilog and AI insights.

Enter values above to see results.

About This Calculator

Related Articles

📊 Logarithm Calculator — Complete Guide

logₐ(x)
Log base a of x: "to what power must a be raised to get x?"
ln(x)
Natural log — base e (≈2.71828)
log₁₀(x)
Common log — base 10, used in pH, decibels
Change of Base
log_b(x) = ln(x)/ln(b)

Logarithm Laws

LawFormulaExample
Product rulelog(xy) = log(x) + log(y)log(6) = log(2) + log(3)
Quotient rulelog(x/y) = log(x) − log(y)log(5) = log(10) − log(2)
Power rulelog(xⁿ) = n·log(x)log(8) = 3·log(2)
Change of baselog_b(x) = log(x)/log(b)log₂(8) = log(8)/log(2) = 3
Inversea^(log_a(x)) = x10^(log₁₀(100)) = 100
Log of 1log_b(1) = 0 for any blog₂(1) = 0

Frequently Asked Questions

What is a logarithm?

A logarithm answers: "to what power must the base be raised to produce this number?" log₂(8) = 3 because 2³ = 8. Logarithms are the inverse operation of exponentiation.

What is the difference between log and ln?

log (common logarithm) uses base 10; it's used in pH, decibels, and Richter scale. ln (natural logarithm) uses base e ≈ 2.71828; it appears naturally in calculus, probability, and finance (compound interest).

What is the change of base formula?

log_b(x) = ln(x)/ln(b) = log(x)/log(b). This converts any logarithm to base 10 or natural log, which calculators support natively. E.g., log₂(32) = ln(32)/ln(2) = 3.466/0.693 = 5.

Can I take the log of a negative number?

No — in real numbers, logarithms are only defined for positive arguments. log(0) is undefined (approaches −∞). Complex logarithms extend to negative numbers but are beyond basic calculator scope.

Where are logarithms used in real life?

pH scale (pH = −log[H⁺]), decibels (dB = 10·log(P/P₀)), Richter magnitude scale, information theory (bits), compound interest problems, and population/bacterial growth modeling.

What is log base 2 used for?

Base 2 (binary logarithm) is fundamental in computer science: it gives the number of bits needed to represent n values (⌈log₂(n)⌉), and the depth of binary trees/search algorithms. log₂(1024) = 10 means 1024 values need 10 bits.

Explore All Math Calculators

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

Fundamental Properties
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 & Conversions
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 digit

Any calculator with log₁₀ or ln can compute any base logarithm using the change of base formula. This is how hardware calculators typically work internally.

Natural Logarithm & Calculus
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 years

The 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.

Logarithmic Equations & Solving
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

ScaleBaseFormula+1 Unit =Example
Richter (earthquake)10log₁₀(A/A₀)×10 amplitude, ×31.6 energyM5→M6 = 31.6× more energy
Decibels (sound)1010·log₁₀(I/I₀)×10 intensity60 dB → 70 dB = 10× louder
pH (acidity)10−log₁₀[H⁺]×10 [H⁺] concentrationpH 4 is 10× more acidic than pH 5
Stellar magnitude~2.512−2.5·log₁₀(F/F₀)×2.512 brightness5 mag diff = 100× brightness
Bits (information)2log₂(states)×2 possible states10 bits = 1024 states
Neper (engineering)eln(V₂/V₁)×e ≈ 2.718 ratioUsed in RF engineering
f-stops (camera)√2log₂(N²)×2 light exposuref/2.8 → f/2 doubles light
Musical octave2log₂(f₂/f₁)×2 frequencyA4=440Hz → A5=880Hz

Applications of Logarithms

FieldApplicationWhy Logs?
Computer ScienceAlgorithm complexity O(log n)Binary search halves data each step
FinanceCompound interest, Rule of 72ln(2)/r gives doubling time
Machine LearningCross-entropy loss, log-likelihoodLog converts products → sums, prevents underflow
PhysicsRadioactive decay, Boltzmann entropyS = k·ln(Ω) — entropy is logarithmic
BiologyPopulation growth modelingLogistic growth: dN/dt = rN(1-N/K)
Signal ProcessingFourier transform, frequency analysisLog-frequency scales match human hearing

History of Logarithms

1614

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.

1617

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.

1622

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.

1668

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.

1748

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.

1972

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

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?
log₁₀ (common log) uses base 10. ln (natural log) uses base e ≈ 2.718. lg or log₂ (binary log) uses base 2. In math notation, 'log' alone varies by context — always specify the base if ambiguous.
Why is ln called the 'natural' logarithm?
Because the derivative of ln(x) is simply 1/x — the simplest possible derivative for a logarithm. Also, eˣ is its own derivative, making e the natural base for calculus. Continuous growth and decay naturally use base e.
How do I convert between log₁₀ and ln?
Multiply: ln(x) = log₁₀(x) × 2.30259. Divide: log₁₀(x) = ln(x) / 2.30259. The conversion factor is ln(10) ≈ 2.30259.
What is the domain of logarithms?
Logarithms are only defined for positive numbers: logₐ(x) requires x > 0 and a > 0, a ≠ 1. log(0) = −∞ (undefined). log of negatives requires complex numbers (ln(−1) = iπ).
What is the change of base formula?
logₐ(b) = log_c(b) / log_c(a), where c is any convenient base. Typically: logₐ(b) = ln(b)/ln(a) or log₁₀(b)/log₁₀(a). This lets you compute any base using only ln or log₁₀.
Why does the Richter scale use logarithms?
Earthquake energy spans enormous ranges (magnitude 1 to 9 differs by ~31.6⁸ ≈ 10 billion× in energy). A linear scale would be unusable. Base-10 logs compress this range so each +1 unit = ×10 amplitude, ×31.6 energy.
How are logarithms used in computer science?
Binary search runs in O(log₂ n) time. Balanced binary trees have O(log n) height. Huffman coding uses log₂ for optimal bit lengths. Hash table analysis, sorting lower bounds (Ω(n log n)), and information theory all rely on logarithms.
What is log-log paper and when is it used?
Graph paper where both axes are logarithmic. Power law relationships (y = axⁿ) appear as straight lines on log-log paper, making the exponent n easy to determine from the slope. Used in physics, biology, and fractal analysis.
What is the relationship between e and compound interest?
If interest compounds n times per year at rate r, after 1 year: (1+r/n)ⁿ. As n→∞ (continuous compounding): eʳ. The number e was first studied by Jacob Bernoulli in precisely this compound interest context (1683).
Why do ML models use log-likelihood instead of likelihood?
Products of many small probabilities cause numerical underflow (10⁻³⁰⁰ → 0 in float). Log converts products to sums: log(∏pᵢ) = Σlog(pᵢ). Working in log-space also simplifies derivatives and makes optimization more numerically stable.
What is a logarithmic spiral?
A curve where the distance from the center increases exponentially with angle: r = ae^(bθ). Found in nautilus shells, galaxies, hurricanes, and sunflower seeds. Jacob Bernoulli was so fascinated he requested one on his tombstone.
How do decibels work with logarithms?
Sound intensity in dB = 10·log₁₀(I/I₀), where I₀ = 10⁻¹² W/m² (hearing threshold). +10 dB = ×10 intensity. +20 dB = ×100 intensity. Normal speech ≈ 60 dB. Pain threshold ≈ 130 dB = 10¹³× the hearing threshold.

References

Related Calculators

Explore All Math Calculators

Precision math tools for students, engineers, and scientists — CalculatorApp.me.

Browse Math Calculators →

See Also