Logarithm Base-N Calculator
A logarithm answers the question: to what power must I raise the base to get this number? This calculator finds the logarithm of any positive number to any valid base using the change-of-base formula, dividing the natural log of the number by the natural log of the base. It also reports the natural logarithm (base e) and the common logarithm (base 10) for the same number, so you have all three in one view. Logarithms appear throughout science, finance, acoustics, and computing.
Logarithm change-of-base formula
log base b of x = ln(x) / ln(b)
ln x = natural logarithm (base e, e ~ 2.71828)
log10 x = common logarithm (base 10)
Example: log base 10 of 1000 = 3
The change-of-base formula lets any base be computed from natural logs. The number must be positive and the base must be positive and not equal to 1.
Logarithm context
- log base b of 1 is always 0; log base b of b is always 1.
- Base 2 logs count doublings; base 10 logs count orders of magnitude.
- The natural log (base e) underlies continuous growth and decay.
- Logarithms turn multiplication into addition, the basis of slide rules and decibels.
- Inputs that are zero, negative, or a base of 1 return n/a.
Logarithm base-N: frequently asked questions
What is a logarithm?
The logarithm of a number x to base b is the exponent you must raise b to in order to get x. If b to the power y equals x, then log base b of x is y. For example log base 2 of 8 is 3, because 2 cubed is 8.
What is the change-of-base formula?
log base b of x equals the natural log of x divided by the natural log of b. You can use any consistent base on the right side (natural or base 10). This is how a calculator finds a logarithm to an arbitrary base from the built-in natural log.
What are common logarithm bases?
Base 10 is the common logarithm, written log. Base e (about 2.71828) is the natural logarithm, written ln, central to calculus and growth. Base 2 is used in computing and information theory.
Why must the number and base be positive?
Logarithms are only defined for positive numbers, and the base must be positive and not equal to 1. A base of 1 cannot produce different values when raised to powers, and negative or zero inputs have no real logarithm. The calculator shows n/a for invalid inputs.
What is log base b of 1?
The logarithm of 1 to any valid base is 0, because any positive base raised to the power 0 equals 1.
Official sources
- NIST Digital Library of Mathematical Functions: Logarithm (DLMF 4.7).
- NIST Digital Library of Mathematical Functions: DLMF home.
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.