Logarithm Calculator

Calculate the logarithm of any number in any base

Enter a positive number, choose the base, and get the logarithm result with antilog verification and comparison across common bases.

Logarithms: what they mean and when to use them

A logarithm answers the question: "to what power must the base be raised to produce this number?" If log base 10 of 1,000 = 3, it means 10^3 = 1,000. If the natural log of e^2 = 2, it means e^2 = e^2. The logarithm is the exponent. This simple definition makes logarithms the inverse operation of exponentiation, just as subtraction is the inverse of addition.

The three most common logarithm bases each serve a different domain. Base 10, often written as log or log10, is the common logarithm used in engineering, chemistry (pH scale), acoustics (decibels), and earthquake magnitude scales (Richter scale). Base e (approximately 2.71828), called the natural logarithm and written as ln, appears throughout calculus, differential equations, statistics, and growth and decay models. Base 2 is fundamental in computer science and information theory: the number of bits needed to represent n distinct states is log2(n).

For any other base, the change-of-base formula applies: log base b of x = ln(x) / ln(b) = log10(x) / log10(b). This means any logarithm can be computed from the natural logarithm or common logarithm that most calculators and programming languages provide natively. This calculator uses this approach for custom bases.

The output shows the result to eight decimal places, plus an antilog verification: raising the base to the computed exponent should return the original number. Small floating-point rounding errors may cause the verified value to differ from the input by a tiny margin at the last decimal place — this is expected and normal. The output also shows ln, log10, and log2 for the same number side by side, which is useful for cross-checking or converting between log bases.

Logarithm properties and identities

Several logarithm properties simplify complex calculations. The product rule states that log(a x b) = log(a) + log(b): the log of a product equals the sum of the logs. The quotient rule states log(a / b) = log(a) - log(b). The power rule states log(a^n) = n x log(a). These properties allow logarithms to convert multiplication into addition, division into subtraction, and exponentiation into multiplication. Before electronic calculators existed, these properties made logarithm tables an essential computational tool for multiplying large numbers.

Logarithms are only defined for positive numbers. The logarithm of zero is negative infinity (as the number approaches zero, its log approaches negative infinity), and the logarithm of a negative number is undefined in the real number system (though complex logarithms exist). This calculator enforces the requirement that the input number is strictly greater than zero.

Real-world applications of logarithms

The Richter scale measures earthquake energy logarithmically: a magnitude 6 earthquake releases about 31.6 times more energy than a magnitude 5, not just twice as much. The decibel scale for sound is logarithmic: 20 dB is 100 times more intense than 0 dB, not 20 times. The pH scale for acidity is logarithmic: a pH of 3 is ten times more acidic than pH 4. These scales compress enormously wide ranges of values into a small, manageable numeric range, which is the core practical benefit of logarithmic scaling.

Last updated: 2026-05-06