3tej home
← Math

What is Logarithm Calculator?

A Logarithm Calculator computes logarithm from the inputs you provide. It applies the standard formula to the values you enter and returns the result instantly, without sending any data to a server. Compute log base b of x for any base.

Logarithm Calculator

logb(x) for any base. Auto-shows log₁₀, ln, log₂.

Inputs

log₁₀(100)

2

Common bases

About the logarithm calculator

A logarithm answers the inverse-exponent question: log_b(x) is the power to which base b must be raised to produce x. The calculator accepts any base b greater than zero (other than 1) and any positive x. Alongside your chosen base, it always shows the three most cited logarithms: common log (base 10), natural log (base e ~= 2.71828, written ln), and binary log (base 2, written lb or log_2). A verification line raises the base back to the computed power to confirm the round trip.

Logarithms underpin pH in chemistry, decibels in audio, magnitudes in earthquakes (Richter) and stars, half-life decay, compound-interest doubling time, information-theory bits, computational complexity O(log n), and every algorithm that bisects a sorted range.

The concept dates to John Napier, who published the first logarithm tables in 1614 to turn slow multiplications into fast additions. Henry Briggs then recast them to base 10 in 1617, and for the next 350 years log tables and the slide rule (a physical logarithmic scale) were the working engine of engineering and navigation. Electronic calculators retired the tables, but the mathematics is unchanged: a logarithm still converts multiplication into addition and exponentiation into multiplication, which is exactly why logarithmic axes turn exponential growth into a straight line.

How it works

log_b(x)   = ln(x) / ln(b)         (change-of-base, used internally)
log_10(x)  = ln(x) / ln(10)        common log, equals log_10
ln(x)      = log_e(x)              natural log, base Euler's number
log_2(x)   = ln(x) / ln(2)         binary log
Verify     = b^(log_b(x)) = x
  • Domain: x must be strictly positive. log_b(0) is undefined; log_b of a negative number is complex.
  • Base constraints: b > 0 and b not equal to 1. Base 1 has no inverse (1 to any power is 1).
  • Precision: JavaScript Math.log uses IEEE 754 double; expect about 15 significant digits.
  • Identities: log_b(xy) = log_b(x) + log_b(y); log_b(x^n) = n log_b(x); log_b(1) = 0; log_b(b) = 1.

Worked example

How many years does it take a 100,000 dollar investment to double at a 7 percent annual return?

  1. Setup: 100,000 x (1.07)^t = 200,000, so (1.07)^t = 2.
  2. Take logs of both sides: t = log_1.07(2).
  3. Apply change of base: t = ln(2) / ln(1.07) = 0.6931 / 0.0677 = 10.244.
  4. Round: roughly 10.24 years.
  5. Rule of 72 cross-check: 72 / 7 = 10.29 years. Within 0.5 percent. The Rule of 72 is the integer-friendly approximation; the log gives the exact answer.
Result: 100,000 dollars at 7 percent doubles in about 10.24 years. Use the calculator to test any (rate, years) pair: enter 2 in x and 1.07 in b for the doubling-time answer.

A second example shows the base-10 side. Chemistry defines pH as the negative common log of hydrogen-ion concentration: pH = -log_10[H+]. For a solution with [H+] = 0.0001 mol/L, pH = -log_10(0.0001) = -(-4) = 4, a moderately acidic value. Because the scale is logarithmic, a solution at pH 4 has ten times the hydrogen-ion concentration of one at pH 5 and a hundred times that of pH 6. The same compression is why a Richter 7 earthquake releases about 32 times the energy of a Richter 6.

Common bases reference

BaseNameNotationTypical use
10Common loglog or log_10pH, decibels, Richter, slide rules
e ~= 2.71828Natural loglnContinuous growth, calculus, statistics
2Binary loglb or log_2Information theory (bits), O(log n)
20None20 x log_10dB SPL audio amplitude ratio
1.07Customlog_1.07Doubling time at 7 percent rate
0.5Half-lifelog_0.5Radioactive decay, drug elimination

Common pitfalls

  • Negative or zero input. log of zero is negative infinity (a limit, not a finite value), and log of a negative number is complex. The calculator returns a dash with an error message in both cases.
  • Confusing log and ln. In calculus and statistics, "log" almost always means natural log (ln). In engineering and finance, "log" usually means base 10. Check the convention before quoting a result.
  • Forgetting the change-of-base formula. A scientific calculator without a custom-base button still gets log_b(x) as ln(x) / ln(b) or log_10(x) / log_10(b). Either ratio works.
  • Misreading decibels. Audio dB SPL is 20 x log_10(p / p_ref), not 10 x log. Power ratios use 10x; amplitude ratios use 20x. A 3 dB drop is half power, not half amplitude.
  • Slide-rule habit on a calculator. log_10(2) = 0.301 was memorised by every pre-1980 engineer. Calculators give it exactly. If you see 0.6931, that is ln(2), not log_10(2).

Related calculators

Frequently asked questions

What is a logarithm in plain language?

log_b(x) answers "b to the what equals x?". log_10(1000) = 3 because 10 to the third is 1000. log_2(8) = 3 because 2 cubed is 8. The logarithm is the inverse of the exponential function.

When should I use ln versus log_10?

Use ln (natural log) for any continuous-growth problem, derivatives and integrals, statistics, and finance involving continuously compounded rates. Use log_10 for pH, decibels, Richter, and any human-readable order-of-magnitude scale.

Why is log of one equal to zero?

Any positive base raised to the zero power equals 1, so log_b(1) = 0 for every valid base b. It is the only x value where every logarithm agrees.

How do I compute log_b(x) on a calculator without a custom-base button?

Apply the change-of-base formula: log_b(x) = ln(x) / ln(b), or equivalently log_10(x) / log_10(b). Both ratios give the same answer.

What real-world things grow on a logarithmic scale?

Sound pressure (dB), earthquake magnitude (Richter, base 10 of energy), star brightness (magnitude), pH (base 10 of hydrogen ion concentration), and human sensory perception (Weber-Fechner law). Each step is a constant multiplicative factor, so a logarithmic axis compresses the visual range and makes power-law relationships look linear.

IT
India Tools Editorial
Calculators & explainers maintained by the India Tools team.