Home/Calculator Tools/Logarithm Calculator
📟

Logarithm Calculator

FREE

log₁₀, log₂, ln and any custom base

Free · No sign-up required
Loading...

What the logarithm calculator does

A logarithm answers “what power do I raise this base to, to get that number?” Enter a number and the calculator returns its logarithm in base 10, base 2 and base e (the natural log), plus the log in any custom base you choose. Logarithms turn multiplication into addition and exponential growth into straight lines, which is why they appear in pH, decibels, earthquake magnitudes, information theory, algorithm analysis and every compound-growth question that asks “how long until…”. Runs in your browser.

Definitions

log_b(x) = y means bʸ = x log₁₀(1000) = 3 because 10³ = 1000 log₂(256) = 8 because 2⁸ = 256 ln(e³) = 3 because e³ = e³ (ln = log base e, e ≈ 2.71828) Change of base: log_b(x) = ln(x) ÷ ln(b) = log₁₀(x) ÷ log₁₀(b) log₅(125) = ln(125) ÷ ln(5) = 3

The three common bases

BaseWrittenWhere it is used
10log or log₁₀pH, decibels, Richter scale, orders of magnitude, scientific notation
2log₂ or lbInformation (bits), computer science, doublings, musical octaves
elnCalculus, continuous growth and decay, statistics, physics

In mathematics texts “log” with no base often means the natural log; in engineering and calculators it means base 10. The calculator labels each explicitly to avoid the ambiguity.

Rules of logarithms

log(a × b) = log a + log b log(a ÷ b) = log a − log b log(aⁿ) = n × log a log_b(b) = 1 log_b(1) = 0 log_b(x) is undefined for x ≤ 0

The power rule is the one that solves growth problems: to find n such that 1.05ⁿ = 2, take logs of both sides — n × log(1.05) = log(2), so n = log 2 ÷ log 1.05 = 14.2 years to double at 5%.

Logarithmic scales in everyday numbers

ScaleFormulaOne unit means
pH−log₁₀[H⁺]10× the hydrogen ion concentration
Decibels (power)10 × log₁₀(P/P₀)10 dB = 10× the power; 3 dB ≈ 2×
Richter / moment magnitudelog₁₀ of amplitude (energy ≈ 31.6× per unit)Magnitude 7 releases ~1,000× the energy of magnitude 5
Stellar magnitude−2.5 × log₁₀(brightness)5 magnitudes = 100× brightness
Bits of informationlog₂(number of outcomes)A fair die carries log₂(6) = 2.58 bits

Common uses

  • Doubling and halving time: n = ln(2) ÷ ln(1 + rate); the Doubling Time Calculator does this directly.
  • Algorithm complexity: binary search on a million items takes log₂(10⁶) ≈ 20 steps.
  • Plotting data that spans many orders of magnitude on a log axis so it becomes a straight line.
  • Sound and signal levels in dB, and gain calculations.
  • Chemistry: pH and pKa; finance: log returns; psychology: perceived intensity (Weber–Fechner).

Frequently asked questions

Why can't I take the log of zero or a negative number?

No real power of a positive base gives zero or a negative result. log(0) tends to −∞ and log of a negative is complex — the calculator reports it as undefined.

What is the log of a number between 0 and 1?

Negative. log₁₀(0.01) = −2 because 10⁻² = 0.01.

How do I compute a log in base 7?

Enter 7 as the custom base, or divide ln(x) by ln(7). Any base works this way.

What is the antilog?

The inverse: raising the base to the power. Antilog₁₀ of 2.5 is 10^2.5 = 316.2. Use the Exponent Calculator.

Why is ln called 'natural'?

Because e is the base at which the rate of growth of bˣ equals its value — the derivative of eˣ is eˣ — making it the natural choice in calculus and continuous processes.

Are my values stored?

No. The calculation runs in your browser.

More tools in this category

📊
Percentage Calculator
Quickly calculate percentages and ratios
📈
Percentage Change Calculator
Percentage increase or decrease between two values
🔬
Scientific Calculator
Trig, logs, powers and roots with correct operator precedence
Fraction Calculator
Add, subtract, multiply and divide fractions in lowest terms
📊
Standard Deviation Calculator
Mean, variance and standard deviation — population and sample
🔄
Unit Converter
Length, weight, volume, temperature and speed between metric and imperial