Logarithm Calculator

Calculate the logarithm of a positive number in your chosen base.

Your details

Your data stays in your browser

Result

Enter the number and the base, then press “Calculate”.

Analysis and suggestions

Once calculated, this shows what your result means and suggestions based on your numbers.

Behind the result

Number and base must be positive; the base cannot equal 1.

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

ln(1,000) ÷ ln(10) = 3

How it is calculated

Comprehensive Calculator Guide

A logarithm answers: to what power must the base be raised to give the number? log₁₀(1,000) = 3 because 10³ = 1,000, and log₂(1,024) = 10 because 2¹⁰ = 1,024. Enter the number and any positive base other than 1 (10, 2, e or your own) to see the result.

log, ln and changing base

log usually means base 10; ln is the natural log, base e ≈ 2.71828. Any log can be computed from another with the change-of-base rule, log_b(x) = ln(x) ÷ ln(b), which is how the calculator handles any base. For ln, enter 2.718281828 as the base: ln(20) = 2.9957.

The rules: log(ab) = log a + log b, log(a ÷ b) = log a − log b, log(aⁿ) = n log a, log_b(1) = 0 and log_b(b) = 1. Zero and negative numbers have no real logarithm, since a positive base to any power is positive.

Where logarithms show up

pH is minus the base-10 log of hydrogen-ion concentration, so 10⁻⁷ mol/L gives pH 7. Decibels and earthquake magnitudes are logarithmic scales. Doubling time at 7% growth is log base 1.07 of 2 = 10.24 years, close to the rule-of-72 estimate of 10.3. And log₂ tells you how many bits encode a set of options: 1,024 options need 10 bits.

How to Use

  1. Enter the number, which must be positive.
  2. Enter the base: 10, 2, 2.718281828 for ln, or any positive base other than 1.
  3. Read the power the base must be raised to.

Formula Used

log_b(x) = y ⟺ b^y = x | log_b(x) = ln(x) ÷ ln(b)

Practical Examples

Example 1: common log
log₁₀(1,000) = 3.
Example 2: base 2
log₂(1,024) = 10: ten bits cover 1,024 options.
Example 3: doubling time
Number 2, base 1.07: 10.24 years to double at 7% a year.

Important Tips

  • A negative result means the number is below 1: log₁₀(0.01) = −2.
  • Check a result by raising the base to it with the exponent calculator.

Common Mistakes to Avoid

  • Taking the log of zero or a negative number.
  • Mixing up log (base 10) and ln (base e).

Frequently Asked Questions

What is a logarithm, simply?
The exponent that turns the base into the number: log₁₀(100) = 2 because 10² = 100.
What is the difference between log and ln?
log is usually base 10; ln is base e, about 2.71828.
Why is there no log of a negative number?
A positive base raised to any real power is positive, so no power gives zero or a negative.
How long until money doubles?
Take log base (1 + rate) of 2: at 7%, enter 2 and base 1.07 for 10.24 years.

Read Also

Results are estimates for educational purposes and may vary depending on your situation and data sources.