Logarithm Calculator

Calculate logarithms with any base, including common log (base 10) and natural log (ln). Enter a number and base to get the result with the change-of-base formula using this free logarithm calculator.

How to Use

  1. Select logarithm type

    Choose common log (log base 10), natural log (ln), or custom base.

  2. Enter the value

    Input a positive number. For custom base, also enter the base value.

  3. View result

    Click Calculate to see the logarithm value and related properties.

What is a logarithm?

A logarithm is the inverse of exponentiation. log_b(x) = y means 'raising base b to the power y gives x', which is equivalent to b^y = x. For example, multiplying 10 by itself twice gives 100, so log₁₀(100) = 2.

Logarithms matter because they turn multiplication into addition. They let you compare very large and very small numbers at a glance, which is ideal for values that span many orders of magnitude.

  • Earthquake magnitude the Richter scale is based on the common logarithm
  • Sound intensity decibels (dB)
  • Acidity pH = -log₁₀[H⁺]
  • Algorithmic complexity O(log n)

This calculator lets you set the base freely and at the same time shows the natural, common, and binary logarithm values together.

Calculation formula

This calculator uses the change of base formula to compute a logarithm for any base.

log_b(x) = ln(x) / ln(b)

  • x: the positive number whose logarithm you want (the argument)
  • b: the base of the logarithm (b > 0, b ≠ 1)
  • ln: the natural logarithm, with the constant e (≈2.71828) as its base

Example to find log₂(8): ln(8) / ln(2) = 2.0794 / 0.6931 = 3. Indeed 2³ = 8, so the result matches. Results are shown to 10 decimal places.

Frequently Asked Questions

What is a logarithm?
A logarithm is the inverse of exponentiation. log_b(x) = y means 'raising base b to the power y gives x', the same as b^y = x. For example, log₁₀(100) = 2 because 10² = 100.
What is the difference between common and natural logarithms?
The common logarithm (log₁₀) uses base 10, while the natural logarithm (ln) uses the constant e (≈2.71828) as its base. Natural logs are mainly used in mathematics and science, common logs in engineering and everyday calculations.
Can I change the base freely?
Yes. The change of base formula log_b(x) = ln(x)/ln(b) is applied automatically to compute the logarithm for any base you want. Presets for the natural (e), common (10), and binary (2) logarithms are also provided.
Can I compute the logarithm of a negative number or zero?
In the real number domain, logarithms of numbers less than or equal to zero are undefined. The argument x must be positive, and log_b(0) diverges to negative infinity. This calculator only supports real-valued computation for positive arguments.
Where is the binary logarithm (log₂) used?
The binary logarithm uses base 2 and is essential in information theory for counting bits and in analyzing the time complexity O(log n) of computer algorithms. For example, a binary search over 1024 items needs only log₂(1024) = 10 steps.
Where are logarithms used in real life?
They are widely used for phenomena whose values span many orders of magnitude: earthquake magnitude (Richter scale), sound intensity (decibels), the acidity of a solution (pH = -log₁₀[H⁺]), information content (bits), and the brightness of stars (magnitude).
Why can't the base be 1?
If the base is 1, raising 1 to any power always gives 1, so it cannot represent any argument other than 1, and the logarithm is undefined. In the change of base formula, ln(1) = 0 makes the denominator zero, so the calculation is impossible.
What are the main properties of logarithms?
Multiplication becomes addition: log_b(xy) = log_b(x) + log_b(y); division becomes subtraction: log_b(x/y) = log_b(x) - log_b(y); and a power becomes multiplication: log_b(x^n) = n·log_b(x). Also, log_b(1) = 0 and log_b(b) = 1 always hold.
Verified 2026 formulas

Related Calculators