Logarithm Calculator
Compute logs in any base instantly.
How to use
- 1 Enter the value (x) whose logarithm you want.
- 2 Choose a base: common (10), natural (e), binary (2) or custom.
- 3 If you picked custom, type any positive base other than 1.
- 4 Read the result and copy it.
About Logarithm Calculator
The Logarithm Calculator answers the question "to what power must I raise this base to get this number?" for any base you choose.
Enter a value and pick a base, and it returns log base b of x using the change-of-base identity log_b(x) = ln(x) / ln(b), which lets it handle bases the standard calculator functions do not expose directly.
Built-in presets cover the three logarithms you reach for most: base 10 (the common logarithm, used for orders of magnitude, decibels and the Richter scale), base e (the natural logarithm, central to calculus, growth and decay) and base 2 (the binary logarithm, used in computer science for tree depth, information entropy and algorithmic complexity).
When you need something else, switch to a custom base and type any positive number.
The tool is strict about the domain so you never see a confusing NaN.
Logarithms are only defined for arguments greater than zero, and the base must be positive and not equal to one, so entering a zero, a negative value or a base of one returns a clear, specific explanation instead of a broken result.
Fractional bases such as 0.5 are supported too.
Everything is calculated locally in your browser with double-precision floating point.
Nothing is uploaded or logged, the result updates as you type, and you can copy the answer with a single click.
FAQ
Why must the value be greater than zero?
Logarithms are only defined for positive arguments. There is no real power of a positive base that produces zero or a negative number, so those inputs return an error.
Can the base be any number?
The base must be positive and cannot equal 1. A base of 1 would make every result undefined, since 1 raised to any power is always 1.
How is the logarithm calculated for arbitrary bases?
It uses the change-of-base rule, log_b(x) = ln(x) / ln(b), computed with double-precision floating point in your browser.