Logarithm Calculator (log, ln, log2, any base)

Calculate the logarithm of any positive number in any base: common log (base 10), natural log (ln, base e), binary log (base 2) or a custom base such as 3 or 16. You can also solve for the other parts of the equation, finding the antilog (the number) or the unknown base, with the change-of-base formula shown step by step.

  • 100% free
  • No sign-up
  • Private & local
  • Works on mobile
Base:
This number in other bases
Baselog

Private by design: every calculation runs locally in your browser. Nothing you type is sent to a server or stored by us.

What Is a Logarithm?

A logarithm is the inverse of an exponent. It answers the question: "To what power must I raise the base to get this number?" Because 103 = 1,000, the logarithm base 10 of 1,000 is 3, written log10(1000) = 3. In general, logb(x) = y means by = x. Logarithms turn multiplication into addition and powers into multiplication, which is why they were used for centuries in slide rules and log tables to speed up calculation.

Today, logarithms appear throughout science and everyday life. The Richter scale for earthquakes, decibels for sound, pH in chemistry and stellar magnitudes in astronomy are all logarithmic scales. Logarithms solve compound-interest and population-growth problems, measure information in bits (log2), describe algorithm complexity (O(log n)) and appear in probability, statistics and machine learning. This free log calculator works in any base and shows the working.

How to Use the Logarithm Calculator

  1. Choose what to solve for: the logarithm itself, the number (antilog), or the base.
  2. Enter the base: 10, 2, any positive number except 1, or type e for the natural log.
  3. Enter the number (which must be positive) or the logarithm value, depending on what you're solving.
  4. Read the result, along with ln, log10 and log2 of the same number, and the step-by-step working.

Common Logarithm Bases

NameNotationBaseUsed for
Common logarithmlog, log1010Science, engineering, pH, decibels, Richter scale
Natural logarithmln, logee ≈ 2.71828Calculus, growth and decay, continuous interest
Binary logarithmlog2, lb2Computer science, bits, algorithms

Change of Base Formula

Most calculators only have "log" (base 10) and "ln" (base e) buttons. To find a logarithm in any other base, use the change of base formula: logb(x) = ln(x) / ln(b) = log(x) / log(b). For example, log2(50) = ln(50) / ln(2) = 3.912 / 0.693 ≈ 5.644, meaning 25.644 ≈ 50. This calculator applies the formula automatically and shows each step.

Laws of Logarithms

LawFormulaExample
Productlog(xy) = log x + log ylog(20) = log 2 + log 10 ≈ 1.301
Quotientlog(x/y) = log x − log ylog(5) = log 10 − log 2 ≈ 0.699
Powerlog(xn) = n log xlog(1000) = 3 log 10 = 3
Log of 1logb(1) = 0because b0 = 1
Log of baselogb(b) = 1ln(e) = 1
Inverseblogbx = x10log 7 = 7

Antilogarithms

The antilog reverses a logarithm: if logb(x) = y, then x = by. The antilog of 2.5 in base 10 is 102.5 ≈ 316.23. Choose "Number / antilog" to calculate it. This is handy for converting pH back to hydrogen-ion concentration, or decibels back to power ratios.

Solving Exponential Equations with Logs

Logarithms let you solve equations where the unknown is in the exponent. How long does money take to double at 7% interest? Solve 1.07t = 2: t = log(2) / log(1.07) ≈ 10.24 years. With this calculator, set base = 1.07 and number = 2. The same approach finds half-lives, bacterial doubling times and how many bits are needed to store a number (log2).

Features

  • Any base10, e, 2 or any custom positive base.
  • Solve three waysFor the logarithm, the antilog or the base.
  • ln, log and log2 togetherEvery calculation shows all three.
  • Change of baseFormula applied step by step.
  • Multi-base tableThe same number in eight bases.
  • High precisionUp to 14 decimal places.

Frequently Asked Questions

What is log 0?

It is undefined. No power of a positive base gives 0; as x approaches 0, log(x) heads towards −∞.

Can you take the log of a negative number?

Not in real numbers. Negative inputs require complex logarithms.

What's the difference between log and ln?

"log" usually means base 10 (in maths and engineering), while "ln" is the natural log, base e ≈ 2.71828. In many programming languages, log() is the natural log.

What is log base 2 of 1024?

10, because 210 = 1,024.

Why can't the base be 1?

1 raised to any power is always 1, so it could never produce any other number.