Logarithm Calculator — log, ln, Custom Base
Calculate logarithms in base 10, base e (natural), base 2, or any custom base. See the change-of-base formula and antilogarithm. Everything runs in your browser — nothing is stored or sent.
What Are Logarithms?
A logarithm is the inverse of exponentiation. If by = x, then logb(x) = y. In words: the logarithm base b of x is the power to which b must be raised to produce x. Logarithms compress large ranges of numbers into manageable scales, which is why they appear throughout science, engineering, finance, and information theory.
Key Formulas
Definition: logb(x) = y means by = x
Change of base: logb(x) = ln(x) / ln(b) = log10(x) / log10(b)
Antilog: antilogb(y) = by
Logarithm Rules
- Product rule: logb(xy) = logb(x) + logb(y)
- Quotient rule: logb(x/y) = logb(x) - logb(y)
- Power rule: logb(xn) = n × logb(x)
- Identity: logb(b) = 1 and logb(1) = 0
Common Logarithm vs Natural Logarithm
The common logarithm (log10 or simply "log") uses base 10. It is used in decibel scales, pH measurements, the Richter scale for earthquakes, and order-of-magnitude estimates. The natural logarithm (ln or loge) uses Euler's number e (approximately 2.71828) as its base. It appears naturally in calculus, compound interest, population growth models, and radioactive decay.
Binary Logarithm
The binary logarithm (log2) uses base 2 and is fundamental in computer science. It tells you how many bits are needed to represent a number — for example, log2(256) = 8, meaning 256 values fit in 8 bits. It also determines the depth of balanced binary trees and the number of steps in binary search.
Antilogarithm (Inverse)
The antilogarithm reverses the logarithm operation. If log10(x) = 3, then antilog10(3) = 103 = 1000. This calculator shows the antilog for all bases so you can verify your work in both directions.
Applications
Logarithms are used to measure earthquake magnitude (Richter scale), sound intensity (decibels), acidity (pH), information entropy (bits), financial growth rates (continuously compounded interest), and algorithm complexity (O(log n) for binary search). They are one of the most practical mathematical functions you will encounter.