AllCalciHub logo AllCalciHub
Math

Log Calculator

Calculate logarithms with any base — log base 10, natural log (ln), log base 2, or any custom base.

=

What is Log Calculator?

A logarithm calculator finds the logarithm of a number for any base — including base 10 (common log), base e (natural log, ln), base 2 (binary log), or any custom base you specify. Logarithms are the inverse of exponentiation and appear throughout science, engineering, music, and information theory.

How to use

  1. 1 Select the base from the dropdown: base 10, base e (ln), base 2, or custom.
  2. 2 If you choose custom, enter your desired base in the field that appears.
  3. 3 Enter the number you want to take the log of in the 'of' field.
  4. 4 The result shows instantly, along with log₁₀, ln, and log₂ values for the same number.

Formula

log_b(x) = ln(x) / ln(b). Special cases: log₁₀(x) = log(x); log_e(x) = ln(x); log₂(x) = log(x) / log(2). The input x must be greater than 0.

Example calculation

log₁₀(100) = 2 because 10² = 100. ln(e) = 1 because e¹ = e. log₂(8) = 3 because 2³ = 8. For log₃(81), use the custom base field to get log₃(81) = 4.

Frequently asked questions

What is the difference between log and ln?

log (without a base specified) typically means log base 10. ln is the natural logarithm, which uses base e ≈ 2.71828. Both are available in this calculator.

Why can't I take the log of a negative number or zero?

Logarithms are only defined for positive numbers. log(0) approaches negative infinity and log of a negative number has no real solution.

What is a natural logarithm used for?

The natural log (ln) appears naturally in continuous growth and decay, probability, calculus, and physics. It's the inverse of the exponential function e^x.

How do I change the base of a logarithm?

Use the change-of-base formula: log_b(x) = log(x) / log(b) = ln(x) / ln(b). This calculator applies this formula automatically for any custom base.

What is log base 2 used for?

Log base 2 is fundamental in computer science and information theory. It tells you how many bits are needed to represent a number — for example, log₂(256) = 8 means 8 bits.