Logarithm Calculator
Calculate a logarithm in any valid base and compare natural, common and binary logarithms.
For real-number logarithms, the value must be positive and the base must be positive and not equal to 1. Displayed decimals are rounded.
How to use this calculator
Enter a positive number and a valid base. Base 10 gives the common logarithm, base e gives the natural logarithm, and base 2 is common in computing.
Formula
log base b of x = ln(x) ÷ ln(b). It is the exponent y that satisfies bʸ = x.
Calculator credits
Calculator developmentJulia Edwards
Editorial supervisionSamad Aslam Khan
Expert reviewIfrahMSc Mathematics
Published byThe Calculatorz
Last updated
Read how we research, test, review and correct our calculators in our editorial policy.
Frequently asked questions
Why can the base not equal 1?
Every power of 1 equals 1, so it cannot produce a one-to-one logarithm function.
Can I calculate the logarithm of zero?
Not as a real finite number. As x approaches zero from the positive side, ln(x) decreases without bound.
What is the difference between ln and log?
ln uses base e. In many contexts log means base 10, though notation can vary by subject.
What are the main logarithm rules?
log(ab) = log a + log b, log(a ÷ b) = log a − log b, and log(aⁿ) = n log a, for the same base.
Where are logarithms used in real life?
Logarithmic scales measure earthquake magnitude, sound in decibels and acidity as pH. Logarithms also solve exponential growth problems such as compound interest.
How do I calculate log base 2?
Use the change-of-base rule: log₂(x) = ln(x) ÷ ln(2), or log₁₀(x) ÷ log₁₀(2). For example, log₂(32) = 5 because 2⁵ = 32.
References & methodology sources
These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.
- Abramson, J. (2021). College algebra 2e. OpenStax. View source
- Abramson, J. (2021). Precalculus 2e. OpenStax. View source
- Olver, F. W. J., Lozier, D. W., Boisvert, R. F., & Clark, C. W. (Eds.). (2024). NIST Digital Library of Mathematical Functions. National Institute of Standards and Technology. View source
- International Organization for Standardization. (2019). ISO 80000-2: Quantities and units—Part 2: Mathematics. View source
- Stewart, J., Clegg, D. K., & Watson, S. (2021). Calculus: Early transcendentals (9th ed.). Cengage. View source