Compute the logarithm of any value in any base using the change-of-base formula, with quick presets for natural log, log base 10 and log base 2. Free and instant.

Result
Natural log — ln(x)
Common log — log₁₀(x)
Binary log — log₂(x)
The result uses the change-of-base formula logb(x) = ln(x) ÷ ln(b). The value must be positive and the base must be positive and not equal to 1.

About Logarithm Calculator

The Logarithm Calculator computes log base b of x for any positive value and any valid base. Quick presets cover the three logs you meet most often — natural log ln(x), common log log₁₀(x) and binary log log₂(x) — and a custom field accepts any other base.

A logarithm answers “to what power must the base be raised to get x?”: log₂(8) = 3 because 2³ = 8. For arbitrary bases the tool applies the change-of-base formula, logb(x) = ln(x) ÷ ln(b). The value must be positive, and the base must be positive and not equal to 1.

Logarithms appear everywhere exponential behavior does — pH in chemistry, decibels in audio, Richter magnitudes, algorithm complexity and compound growth. This free calculator gives an instant, in-browser answer without a scientific calculator.

How to use Logarithm Calculator

  1. Enter the value x — it must be positive.
  2. Pick a base: the ln, log₁₀ or log₂ preset, or choose Custom and type any base.
  3. Read the result, computed with the change-of-base formula.

Frequently asked questions

The inverse of exponentiation: logb(x) is the exponent that turns b into x. Since 10³ = 1000, log₁₀(1000) = 3. Logs turn multiplication into addition, which is why they tame exponential scales.

logb(x) = ln(x) ÷ ln(b) — any log can be computed from natural logs alone. It is how this calculator (and most software) evaluates logarithms in arbitrary bases like 5 or 2.5.

They differ only in base: ln uses Euler’s number e ≈ 2.71828 and dominates calculus; log₁₀ suits decimal scales like pH and decibels; log₂ appears in computing, from bits to binary search complexity.

No real power of a positive base ever produces zero or a negative result, so the logarithm is undefined there. The calculator requires x > 0 and flags anything else as invalid.

Every power of 1 is 1, so “what exponent turns 1 into x?” has no answer for any other x. Mathematically, ln(1) = 0 would force division by zero in the change-of-base formula.

Need help?
Found an issue with this tool? Let our team know.
Report an issue

Add this free tool to your own website — copy and paste the code below.