Logarithm Calculator — ln, log10, log2, and any base

Enter a positive number x. Choose a base or set a custom one. We’ll compute \(\ln(x)\), \(\log_{10}(x)\), \(\log_{2}(x)\), and \(\log_b(x)\) with antilog.

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)

Logarithms help you solve “exponent questions” quickly. If you know the base and the result, a logarithm tells you the missing power. In symbols, \(\log_b(x)=y\) means \(b^y=x\). This calculator makes that idea easy to use for everyday numbers by computing the natural log \(\ln(x)\), common log \(\log_{10}(x)\), binary log \(\log_{2}(x)\), and any custom base you choose.

What a logarithm means in plain language

Think of a base \(b\) as the “step size” and the logarithm as the number of steps needed to reach \(x\). Because logs are the inverse of exponentiation, they are perfect for undoing growth, comparing scales, or converting between powers. For real-number results, the input must be positive (\(x>0\)), and the base must be positive and not equal to 1. When \(x\) is between 0 and 1, the log is negative, which simply means you need a fraction of a step to reach that smaller value.

This tool uses the change-of-base idea \(\log_b(x)=\ln(x)/\ln(b)\), so any base works even if you only know \(\ln\) or \(\log_{10}\). It also shows the antilog, which is a quick check that the computed logarithm really produces the original number.

How to use the logarithm calculator

  1. Enter your number \(x\) (for example, 250, 0.0042, or 3.2e-7).
  2. Choose a base: natural log (base \(e\)), base 10, base 2, or select “custom base” to enter your own \(b\).
  3. Pick the decimal precision you want for the output.
  4. Click Calculate to see \(\log_b(x)\), plus \(\ln(x)\), \(\log_{10}(x)\), \(\log_{2}(x)\), and the antilog \(b^y\).

Why logs are useful in the real world

Many measurements are based on a logarithmic scale because they span huge ranges. Sound levels in decibels compare power ratios with \(\log_{10}\), acidity is measured with pH (also a base‑10 log), and information theory uses \(\log_{2}\) to count bits needed for a number of outcomes. In finance and science, logarithms simplify exponential growth or decay so you can solve for time, rates, or multipliers. As a quick intuition, every 10× change in a base‑10 log shifts the value by exactly 1, which makes comparisons fast and meaningful.

Quick checks to build confidence

  • \(\log_b(1)=0\) and \(\log_b(b)=1\).
  • If \(x>1\), the log is positive; if \(0<x<1\), the log is negative.
  • Changing the base changes the number, but the underlying relationship \(b^y=x\) stays the same.
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).

5 Fun Facts about Logarithms

Logs turn multiplication into addition

That’s why slide rules worked: \(\log_b(xy)=\log_b x + \log_b y\). Adding distances gave products.

Analog magic

Base switches via change-of-base

\(\log_b(x)=\ln(x)/\ln(b)\). Any calculator with ln or log10 can compute any base with this one formula.

Base freedom

Decibels are logs

Sound levels are \(10\log_{10}(P/P_0)\). Add 10 dB and you multiply intensity by 10—a tidy logarithmic ladder.

Audio math

Bits are base‑2 logs

Information in bits for \(N\) outcomes is \(\log_{2} N\). Doubling outcomes adds exactly one bit of uncertainty.

Info theory

ln is an area

\(\ln(x)\) equals the area under \(1/t\) from 1 to \(x\). Logs connect algebra, geometry, and calculus in one sweep.

Calculus link

Explore more tools