Logarithm Calculator
Log of a number in any base, plus natural log.
Input sheet
DIY at your own risk. Calcora's calculators and guides are general estimates and information only — not professional, engineering, legal, or safety advice. Always verify local building codes and permit requirements, and hire a licensed pro for electrical, gas, plumbing, structural, or any work you're not fully comfortable doing yourself.
A logarithm is the inverse of an exponent: it asks what power a base must be raised to in order to reach a number. Logs underpin pH, decibels, the Richter scale, and the running time of efficient algorithms.
How it works
log_b(n) = ln(n) ÷ ln(b): the power b must be raised to in order to get n.
log base b of n equals the exponent x such that b^x = n. This tool computes any base via the change-of-base rule, dividing the natural log of n by the natural log of b, and also reports the natural log, log base 10, and log base 2.
Logs are only defined for positive inputs, and the base must be positive and not equal to 1. The tool flags those cases as undefined.
log base b of n = natural log of n ÷ natural log of b
Worked examples
The base-10 logarithm of 1,000. → 3
10 raised to the 3rd power is 1,000, so the log is exactly 3.
The base-2 logarithm of 8. → 3
2 to the 3rd power is 8, so log base 2 of 8 is 3.
Tips & gotchas
- Each whole-number step in a base-10 log is a tenfold change — why earthquake and sound scales are logarithmic.
- The natural log (base e ≈ 2.718) is the default in calculus and continuous-growth formulas.
- Logs convert multiplication into addition: log(a × b) = log(a) + log(b). That property is the historical reason slide rules worked.
FAQ
What is the change-of-base formula?
log base b of n equals ln(n) ÷ ln(b), or equivalently log(n) ÷ log(b) in any consistent base. It lets one base compute logs in any other base.
Why can't I take the log of a negative number or zero?
No power of a positive base produces a negative result or zero, so the logarithm is undefined there for real numbers.
What is the difference between log and ln?
'log' usually means base 10 in everyday use, while 'ln' is the natural log, base e. Both are logarithms; only the base differs.
Related calculators
Percentage Calculator · Percent Change Calculator · Average (Mean) Calculator · Ratio Calculator · Exponent Calculator