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) = 3The three common bases
| Base | Written | Where it is used |
|---|---|---|
| 10 | log or log₁₀ | pH, decibels, Richter scale, orders of magnitude, scientific notation |
| 2 | log₂ or lb | Information (bits), computer science, doublings, musical octaves |
| e | ln | Calculus, 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 ≤ 0The 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
| Scale | Formula | One 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 magnitude | log₁₀ 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 information | log₂(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).