calc.ing

Logarithm

Inverse exponent function.

What does Logarithm mean?

A logarithm answers the question: to what power must a given base be raised to produce a certain number? For example, log₁₀(1000) = 3 because 10³ = 1000. Logarithms are the inverse of exponentiation and appear throughout mathematics, science, engineering, and finance — from measuring earthquake intensity (Richter scale) to calculating compound interest and analyzing algorithm complexity.

How to calculate Logarithm

The logarithm base b of a value x is calculated as log_b(x) = ln(x) / ln(b), where ln is the natural logarithm. The natural logarithm (ln) uses base e ≈ 2.71828, and the common logarithm (log₁₀) uses base 10. For example, log₂(8) = ln(8) / ln(2) = 2.0794 / 0.6931 = 3, because 2³ = 8.

FAQ

ln (natural log) uses base e ≈ 2.71828 and is common in calculus and continuous growth models. log (common log or log₁₀) uses base 10 and is used in scales like decibels and pH. log₂ (binary log) uses base 2 and is fundamental in computer science and information theory.

A base of 1 is undefined because 1 raised to any power is always 1, so it can never produce other numbers. Negative bases are problematic because they produce complex (imaginary) results for non-integer exponents. The base must be a positive number other than 1.

In real number mathematics, logarithms are only defined for positive numbers. You cannot raise a positive base to any real power and get zero or a negative result. The logarithm of zero is undefined (it approaches negative infinity), and logarithms of negative numbers require complex numbers.

Logarithms are used extensively: the Richter scale (earthquakes), decibels (sound intensity), pH scale (acidity), compound interest calculations, radioactive decay, algorithm time complexity (O(log n)), data compression, and signal processing are all based on logarithmic relationships.

The main rules are: log(a × b) = log(a) + log(b) (product rule), log(a / b) = log(a) − log(b) (quotient rule), log(aⁿ) = n × log(a) (power rule), and log_b(a) = log(a) / log(b) (change of base formula). These rules apply to logarithms of any base.

Related calculators