This free online log calculator finds the logarithm of any number to a base of your choosing, or the natural log (ln) when you need it. Enter the number and base, or toggle natural log, to get an accurate result instantly.
How to Use the Log Calculator
Enter the number (x) you want to find the logarithm of in the "Number (x)" field.
Enter the base (b) in the "Base (b)" field, for example 10 or 2.
Check "Natural log (ln)" instead if you want the base to be e.
Click "Calculate" to see the result instantly.
What a Logarithm Tells You
A logarithm answers the question "what power do I raise the base to in order to get this number?" Since 10 × 10 × 10 = 1000, the log of 1000 to base 10 is 3. It is the reverse of an exponent: if b to the power y equals x, then the log of x to base b is y.
The calculator uses the browser's built-in base-10 and natural log functions. For any other base it applies the change-of-base rule, dividing ln(x) by ln(b). The answer is rounded to 10 decimal places.
Common Logarithm Values
Expression
Result
Because
log₁₀(1000)
3
10 to the power 3 is 1000
log₁₀(0.01)
−2
Numbers between 0 and 1 have negative logs
log₂(1024)
10
2 multiplied by itself 10 times is 1024
ln(10)
2.302585093
e (about 2.71828) to this power gives 10
log₁₀(2)
0.3010299957
Often rounded to 0.301 in log tables
log of 1, any base
0
Any base to the power 0 is 1
Worked Examples from Science and Finance
pH of a solution: pH is the negative base-10 log of the hydrogen-ion concentration. For a concentration of 0.000032 mol/L, enter 0.000032 with base 10 to get −4.4948500217, so the pH is about 4.49, which is acidic.
Doubling time of money: at 8% annual compounding, the number of years to double is the log of 2 to base 1.08. Enter 2 as the number and 1.08 as the base to get 9.006 years. The well-known "Rule of 72" (72 ÷ 8 = 9) is a quick approximation of this.
Bits needed in computing: log₂(1024) = 10 tells you that 10 bits can represent 1024 different values.
Log Rules Worth Remembering
Product: log(a × b) = log(a) + log(b).
Quotient: log(a ÷ b) = log(a) − log(b).
Power: log(a to the power n) = n × log(a).
A note on notation: on most calculators and in Indian school books, "log" means base 10 and "ln" means base e. In higher mathematics and some programming languages, a plain "log" can mean the natural log, so check the context before using a result.
Frequently Asked Questions
For a base-10 log it uses log10(x); for a custom base b it uses the change-of-base formula logb(x) = ln(x) / ln(b). When "Natural log (ln)" is checked, it calculates ln(x) directly. For example, log2(8) = 3.
A positive base raised to any real power always gives a positive result, so no power can produce 0 or a negative number. That is why the log of 0 or a negative value has no real answer, and why the base itself must be positive and not equal to 1.
"log" on most calculators means the common logarithm with base 10, while "ln" is the natural logarithm with base e, about 2.71828. They differ by a constant factor: ln(x) is about 2.302585 times log₁₀(x).
An antilog reverses a logarithm. The antilog of y to base 10 is 10 raised to the power y, so the antilog of 2.5 is about 316.23. Use the Exponent Calculator with base 10 (or base e for a natural log) and exponent y.
To get a number smaller than 1 from a base greater than 1, you need a negative power. For example, 10 to the power −2 is 0.01, so log₁₀(0.01) = −2.