Logarithm Calculator
Calculate the logarithm of any positive number in any base: common log (base 10), natural log (base e), binary log (base 2) or a custom base.
Last updated: October 2026
Logarithm Result
2
Formula below · 1 source (Wikipedia) · Updated Oct 2026
Compare with similar
About this calculator
The logarithm log_b(x) answers the question: to what power must b be raised to give x? So log₁₀(100) = 2 because 10² = 100, and log₂(8) = 3 because 2³ = 8.
The calculator uses the change-of-base formula, log_b(x) = ln(x) ÷ ln(b), and shows up to 10 significant digits. Results that are whole numbers to within rounding error (such as log₁₀(1000)) are shown exactly.
Common bases
Base 10, the common log (often written log), is used for orders of magnitude, pH and decibels. Base e ≈ 2.718281828, the natural log (ln), is used in calculus, growth and decay. Base 2, the binary log, is used in computing and information theory. To get ln, enter 2.718281828459045 as the base.
Rules
The number must be greater than 0, and the base must be greater than 0 and not equal to 1. log_b(1) = 0 and log_b(b) = 1 for any valid base. Numbers between 0 and 1 have negative logarithms when the base is above 1: log₁₀(0.001) = −3. Useful identities: log(xy) = log x + log y, log(x ÷ y) = log x − log y and log(xⁿ) = n × log x.
How to use
Enter the number and the base. The default, log₁₀(100), gives 2. log₁₀(2) gives 0.3010299957, log₂(50) gives 5.64385619 (2^5.64 ≈ 50), and log₁₀(0.001) gives −3. For a natural log, enter 2.718281828459045 as the base: ln(7.389056099) = 2, because e² ≈ 7.389. To solve an exponential equation such as 2ˣ = 50, the answer is x = log₂(50) = 5.644.
Frequently asked questions
What is the difference between log and ln?
Both are logarithms with different bases. On calculators and in science, log usually means base 10 and ln means base e (about 2.718). In pure mathematics and many programming languages, log can mean the natural log, and in computer science it often means base 2, so check the convention. Converting is a fixed factor: ln(x) = 2.302585 × log₁₀(x).
Why can't I take the log of zero or a negative number?
A positive base raised to any real power is always positive, so no real exponent gives 0 or a negative number. As x approaches 0 from above, log x falls toward minus infinity. Logs of negative numbers exist only as complex numbers.
How do I calculate a log with a base my calculator doesn't have?
Use change of base: log_b(x) = log(x) ÷ log(b), with log in any base you have. For example log₃(81) = log(81) ÷ log(3) = 1.9085 ÷ 0.4771 = 4.
Related calculators
Sources & references
Think a result is wrong? Report a problem with this calculator.