Logarithm calculator
Compute the logarithm of x to any base; log₁₀(100) = 2 and log₂(8) = 3, with checks for x > 0 and valid bases.
- Runs in your browser
- No upload
- Instant result
Assumptions & formula
Formula and assumptions
log_b(x)=ln(x)/ln(b); x>0,b>0,b≠1
Results
Enter values and press Calculate to see the result here.
How to use this calculator
- Set inputs and units
Enter a positive argument and a positive base other than 1. Use e as a number if you want natural logarithms.
- Calculate
Check this worked example: value=100, base=10 → 2; 10²=100
- Results
Check by raising the base to the result. Bases between 0 and 1 give negative logs for arguments above 1, which is correct.
Questions and limits
Why use a change-of-base formula?
ln(x)/ln(b) computes log_b(x). A base close to 1 can amplify the sensitivity to input and floating-point errors.
Which input errors should I correct?
Zero and negative arguments, and base 1, are outside the domain of the real logarithm. Don't quietly replace them with absolute values.
What does this calculation leave out?
Finite real floating-point results only. No complex logarithm branches and no exact symbolic simplification.