Logarithm Calculator
Calculate logarithms with any base. Compute log, ln, log₂, and log₁₀ of any number.
How to Use This Calculator
Enter the value (x) you want to take the logarithm of, and the base. Leave the base as 10 for common logarithm (log₁₀), enter "e" (≈ 2.71828) for natural logarithm (ln), or enter 2 for binary logarithm (log₂). The calculator uses the change-of-base formula internally.
Formula
The Three Most Common Logarithms
- Common logarithm log₁₀(x): Used in chemistry (pH = −log[H⁺]), decibels (dB = 10 log(P/P₀)), and earthquake magnitude (Richter scale). log₁₀(1) = 0, log₁₀(10) = 1, log₁₀(100) = 2, log₁₀(1000) = 3.
- Natural logarithm ln(x): Uses base e ≈ 2.71828. Fundamental in calculus (the derivative of ln(x) is 1/x), continuous compound interest (A = Pe^(rt)), and probability distributions. ln(1) = 0, ln(e) = 1, ln(e²) = 2.
- Binary logarithm log₂(x): Central to computer science — log₂(n) gives the number of binary digits needed to represent n values. log₂(8) = 3 because 2³ = 8. The time complexity of binary search is O(log₂ n).
Key Logarithm Properties
These properties allow simplification of complex logarithmic expressions:
- Product rule: log_b(xy) = log_b(x) + log_b(y)
- Quotient rule: log_b(x/y) = log_b(x) − log_b(y)
- Power rule: log_b(xⁿ) = n × log_b(x)
- Change of base: log_b(x) = log_a(x) / log_a(b) for any base a
- Inverse property: b^(log_b(x)) = x and log_b(b^x) = x
Real-World Applications
Logarithms compress large ranges of numbers into manageable scales. pH (acidity) uses log₁₀: each unit change represents a 10× change in hydrogen ion concentration. Sound intensity (decibels) uses log₁₀: a 10 dB increase means 10× more power. Earthquake magnitude (Richter) uses log₁₀: a magnitude 6 quake releases 32× more energy than a magnitude 5. Compound interest and population growth use ln. In data science, the log transform is frequently applied to skewed data before modeling to make distributions more symmetric.
Frequently Asked Questions
What is a logarithm?
A logarithm is the inverse of exponentiation. log_b(x) = n means b^n = x. For example, log₁₀(100) = 2 because 10² = 100.
What is the natural logarithm?
The natural logarithm (ln) uses the mathematical constant e (~2.71828) as its base.