logarithm calculator

Free Logarithm Calculator

Find logb(x) instantly. Enter a positive number x and a valid base b (where b > 0 and b ≠ 1).

Tip: Press Enter in either field to calculate quickly.

Formula used: logb(x) = ln(x) / ln(b)

What is a logarithm?

A logarithm answers this question: “To what power must we raise the base to get a number?” For example, if 26 = 64, then log2(64) = 6. Logarithms are just the inverse of exponents.

How to use this logarithm calculator

  • Enter the value for x (the number).
  • Enter the value for b (the base).
  • Click Calculate.
  • Read the result and verification line shown below the calculator.

This tool accepts decimals too, so you can calculate values like log3(20) or log2(0.5).

Common logarithm rules

1) Product rule

logb(MN) = logb(M) + logb(N)

2) Quotient rule

logb(M/N) = logb(M) - logb(N)

3) Power rule

logb(Mk) = k · logb(M)

4) Change-of-base formula

logb(x) = ln(x)/ln(b) — this is exactly how the calculator computes your answer.

Worked examples

Example A: log2(64)

Since 26 = 64, the answer is 6.

Example B: log10(1000)

Since 103 = 1000, the answer is 3.

Example C: log3(20)

This is not an integer, so we use approximation: log3(20) ≈ 2.7268.

Real-world uses of logarithms

  • Finance: compound growth and time-to-target calculations.
  • Science: pH scale, earthquake magnitude, and decibel intensity.
  • Computer science: algorithm complexity such as O(log n).
  • Data analysis: log transforms to reduce skew and stabilize variance.

Input rules and common mistakes

  • x must be positive. You cannot take the logarithm of zero or a negative number in real arithmetic.
  • base must be positive and not equal to 1.
  • Be careful with parentheses when typing formulas manually in other tools.

Quick FAQ

What is the difference between ln and log?

ln(x) means base e (about 2.71828). In many contexts, log(x) means base 10, but some fields use base e. Always check the convention.

Can logarithms be negative?

Yes. For example, log10(0.1) = -1 because 10-1 = 0.1.

Why does the result show decimals sometimes?

Many logarithms are irrational numbers, so a decimal approximation is expected.

🔗 Related Calculators