Logarithm Calculator — ln, log10, log2, and any base
Inputs & Actions
Results
Chosen base:
—
\(\log_b(x)\) (selected):
—
Antilog \(b^{y}\) (check):
—
\(\ln(x)\):
—
\(\log_{10}(x)\):
—
\(\log_{2}(x)\):
—
Tip: You can paste numbers in E-notation like 3.2e-7.
What this calculator uses
- Change of base: \(\log_b(x)=\dfrac{\ln(x)}{\ln(b)}\) (with \(x>0\), \(b>0\), \(b\neq 1\)).
- Antilog: If \(y=\log_b(x)\) then \(x=b^y\).
- Common logs: \(\log_{10}(x)=\ln(x)/\ln(10)\), \(\log_2(x)=\ln(x)/\ln(2)\).
Logarithms Explained (ln, log10, log2, and log base b)
A logarithm answers the question: “To what power must the base be raised to get \(x\)?” In symbols, \(\log_b(x)=y \iff b^y=x\). Our calculator supports natural log \(\ln(x)\) (base \(e\)), common log \(\log_{10}(x)\), binary log \(\log_{2}(x)\), and any base \(b\) via change-of-base.
Key Formulas
- Change of base: \(\displaystyle \log_b(x)=\frac{\ln(x)}{\ln(b)}\) (\(x>0,\;b>0,\;b\neq1\)).
- Antilog (inverse): if \(y=\log_b(x)\) then \(x=b^{y}\).
- Product / Quotient: \(\log_b(xy)=\log_b x+\log_b y,\;\; \log_b\!\left(\frac{x}{y}\right)=\log_b x-\log_b y\).
- Power rule: \(\log_b(x^p)=p\,\log_b x\).
- Common bases: \(\log_{10}x=\dfrac{\ln x}{\ln 10},\;\; \log_{2}x=\dfrac{\ln x}{\ln 2}\).
Domain & Quick Checks
- For real numbers, you must have \(x>0\) and \(b>0,\;b\neq1\).
- \(\log_b(1)=0\), \(\log_b(b)=1\), and \(\ln(e)=1\).
- \(\log_b(0)\) is undefined (tends to \(-\infty\)), and \(\log_b(x<0)\) is not real.
Real-World Uses
- pH: \(\mathrm{pH}=-\log_{10}[\mathrm{H}^+]\).
- Decibels: \(L=10\log_{10}\!\left(\frac{P}{P_0}\right)\).
- Information/bits: bits for \(N\) outcomes = \(\log_{2} N\).
- Growth & half-life: \(t=\ln(x/x_0)/k\).
- Compound interest: \(t=\ln(F/P)/\ln(1+r)\).
Precision tip (optional)
For \(x\) very close to 1, \(\ln(1+u)\) with \(u=x-1\) is more stable; many browsers expose Math.log1p(u).