The logarithm of x to base b answers the question: what power do I raise b to in order to get x? Since 103 = 1,000, log10(1000) = 3. The natural logarithm ln uses the base e = 2.71828..., and log2 is common in computing. Any base can be computed with the change of base formula: logb(x) = ln(x) / ln(b).
No real power of a positive base ever produces 0 or a negative number, so the logarithm is undefined for x ≤ 0.
Always 0, because any base to the power 0 equals 1.
"log" usually means base 10 (or base 2 in computer science); "ln" always means base e.
See also: exponent calculator · square root calculator · scientific notation converter