AIWalay Tools

Log Calculator

Calculate logarithms in base 10, base e (ln), base 2 or any custom base, with change-of-base working shown step by step.

About the Log Calculator

This log calculator evaluates the logarithm of any positive number in the base you choose: base 10 (the common log), base e (the natural log, ln), base 2 (the binary log used across computer science) or any custom base. It always shows all three standard logs side by side, so one input gives you the full picture.

A logarithm answers the question 'to what power must the base be raised to get this number?' — log₁₀(1000) = 3 because 10³ = 1000. For custom bases the tool applies the change-of-base identity log_b(x) = ln(x) ÷ ln(b) and displays that working line, which is exactly how you'd do it on a basic calculator that only has ln and log buttons.

Logs appear everywhere quantities span many orders of magnitude: pH in chemistry, decibels in audio, the Richter scale, algorithmic complexity (O(log n)) and doubling-time problems in finance. Inputs must be positive and a custom base must be positive and not equal to 1 — the tool explains rather than returning NaN.

How to Use the Log Calculator

  1. 1Enter the value x (must be greater than 0).
  2. 2Pick a base: 10, e, 2 or a custom base.
  3. 3Read the result plus log₁₀, ln and log₂ side by side.
  4. 4Follow the change-of-base steps to reproduce the answer by hand.

Frequently Asked Questions

How do I calculate a log in a custom base? A worked example

Use change of base: log₅(200) = ln(200) ÷ ln(5) = 5.2983 ÷ 1.6094 ≈ 3.2920. Check: 5^3.292 ≈ 200. The calculator shows this exact working for any base you enter.

What is the difference between log, ln and log₂?

They differ only in base. log usually means base 10 (log(1000) = 3), ln is base e ≈ 2.71828 (ln(e²) = 2) and log₂ is base 2 (log₂(1024) = 10). Any log is a constant multiple of any other: ln(x) = 2.3026 × log₁₀(x).

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

A positive base raised to any real power is always positive, so no real exponent produces 0 or a negative result. log(0) is undefined (it heads to −∞), and log(−5) has no real answer. The calculator asks for positive input instead of showing NaN.

What is log base 2 used for?

It counts doublings and halvings. log₂(1,048,576) = 20 means 20 doublings get you from 1 to about a million — which is why binary search needs at most ~20 steps in a million-item list, and why 20 bits address that many values.

How do logs solve exponential equations?

Take a log of both sides and pull the exponent down. To solve 1.07^t = 2 (doubling money at 7%): t = ln(2) ÷ ln(1.07) = 0.6931 ÷ 0.0677 ≈ 10.24 years — the exact form of the 'rule of 72' approximation.

Related Tools