Logarithm Calculator (Log Base b, ln, log10)
Enter a positive number and a base. Use base 10 for the common log, 2 for binary, or 2.718281828 for the natural log.
Updated
Report a problem
Formula
log_b(x) = ln(x) ÷ ln(b), valid for x > 0, b > 0 and b ≠ 1. The common log is log10(x) and the natural log is ln(x), the log to base e.
Worked example
log base 2 of 8: ln(8) = 2.079442 and ln(2) = 0.693147, so 2.079442 ÷ 0.693147 = 3, because 2³ = 8. For 1000 in base 10: 6.907755 ÷ 2.302585 = 3.
Frequently asked questions
What is a logarithm?
The logarithm of x to base b is the power you raise b to in order to get x. Since 2 to the power of 3 is 8, the log base 2 of 8 is 3.
How do I calculate a log with any base?
Use the change of base formula: log base b of x = ln(x) ÷ ln(b). For log base 2 of 10 that is 2.302585 ÷ 0.693147 = 3.321928.
What is the natural logarithm?
The natural log, written ln, uses the base e, about 2.718282. The natural log of 10 is 2.302585. Enter e as the base to see it as the main result.
Why can't I take the log of zero or a negative number?
No power of a positive base gives zero or a negative number, so the log is undefined there. Base 1 is also not allowed because 1 to any power is 1.