Math

Logarithm Calculator

Compute logarithms in base 10, base e, base 2 or any custom base, with the change-of-base formula and worked examples for log 100, log₂ 1024 and log₅ 125.

Inputs

Results update as you type — essentials first

Saved scenarios

Store input snapshots on this device — load anytime.

No saved scenarios yet.

Formula / how it works

log_b(x) = y means b^y = x. Change of base: log_b(x) = ln x ÷ ln b. The input x must be positive and the base must be positive and not 1.

Detailed guide

What it is, how to use it, how to read the numbers, common mistakes, a worked example, formulas, and FAQs.

What this calculator is

A logarithm answers the question: to what power must the base be raised to get this number? Since 10² = 100, log₁₀ 100 = 2. Logarithms turn multiplication into addition and make huge ranges manageable, which is why they appear in decibels, pH, earthquake magnitude and the analysis of exponential growth. This calculator offers the common base-10 logarithm, the natural logarithm (base e ≈ 2.71828), base 2 used in computing, and a custom base. It uses the change-of-base formula for custom values. Logarithms are only defined for positive inputs.

When to use / who it helps

  • You are solving an exponential equation.
  • You need log₂ for bits or algorithm analysis.
  • You are converting between a number and its order of magnitude.
  • You are checking a calculator result for homework.
  • You are working with pH, decibels or Richter-type scales.

How to use

Steps

  1. Enter the value x, which must be positive.
  2. Choose the base: 10, e, 2 or custom.
  3. If custom, enter the base.
  4. Read the logarithm.
  5. Check by raising the base to the result.
  6. Use log rules to combine logs when simplifying.

How to interpret results

  • log(1) is 0 in every base.
  • If x is greater than 1, the log is positive; between 0 and 1 it is negative.
  • Each increase of 1 in log₁₀ means a tenfold increase in x.
  • Natural logs are used in calculus and continuous growth.
  • Logarithms of zero or negatives are undefined.

Common mistakes & gotchas

  • Taking a logarithm of zero or a negative number.
  • Using base 1, which is invalid.
  • Confusing log with ln.
  • Adding logs when you should multiply the arguments.
  • Forgetting to change base correctly.

Worked example

Worked example — log₁₀ 100, log₂ 1024 and log₅ 125

  1. log₁₀ 100 = 2 because 10² = 100.
  2. log₂ 1024 = 10 because 2¹⁰ = 1,024.
  3. log₅ 125 = ln 125 ÷ ln 5 = 4.8283 ÷ 1.6094 = 3, since 5³ = 125.
  4. ln 20 ≈ 2.9957.

Result: log₁₀ 100 = 2.

To load the form's own demo values, tap Try example above the Calculate button.

How to calculate / formula

log_b(x) = y means b^y = x. Change of base: log_b(x) = ln x ÷ ln b. The input x must be positive and the base must be positive and not 1.

Frequently asked questions

What is a logarithm?

The exponent to which a base must be raised to produce a given number.

What is the difference between log and ln?

log usually means base 10 and ln means base e.

What is the change of base formula?

log_b x = ln x ÷ ln b.

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

No real power of a positive base gives a negative result.

What is log base 2 used for?

Computing, such as the number of bits needed to represent a value.

How do I find the log of a product?

log(ab) = log a + log b.