MATH CALCULATOR
Log Calculator
Calculate logarithms with a selectable base, including natural and common logarithms.
Logarithm formula
logb(x) = ln(x) ÷ ln(b), where x > 0, b > 0 and b ≠ 1.
Worked example
log2(8) = 3 because 2³ = 8. For base 10, log(1000) = 3.
How to use
- Enter a positive number.
- Enter a valid base greater than zero and not equal to one.
- Calculate and check the result.
Domain and common mistakes
For real-valued logarithms, the number must be positive and the base must be positive but not equal to 1. A logarithm answers the question: “To what power must the base be raised to produce this number?” For example, log base 2 of 8 is 3 because 2³ = 8. The logarithm of 1 is 0 for every valid base because any valid base raised to zero equals 1.
Do not confuse the number with the base. The calculator uses the first field as x and the second as b. It uses the change-of-base relationship to compute the result and displays eight decimal places. Very small or very large inputs can be affected by floating-point precision.
Browse all Calcora calculators
Frequently asked questions
What is the difference between log and ln?
“log” often means base 10 in school science, while “ln” means the natural logarithm with base e. Conventions can vary by field, so check which base is intended in the problem.
Can the base be 1?
No. A base of 1 cannot produce different positive values by exponentiation, so the logarithm is undefined for that base.
How can I check a result?
If log base b of x equals y, then b raised to y should equal x, subject to rounding. For example, log base 2 of 8 = 3 because 2³ = 8.
Calculation method and worked check
This calculator uses the change-of-base identity logᵦ(x) = ln(x) ÷ ln(b). The real-valued domain requires x greater than zero, b greater than zero, and b not equal to 1.
Practical example
To calculate log base 2 of 8, ask which power of 2 equals 8. Since 2³ = 8, the answer is 3. You can check any result y by evaluating bʸ; it should reproduce x apart from rounding.
Frequently asked questions
What is the difference between log and ln?
In many school and scientific contexts, log means base 10 and ln means base e, although notation can vary by field.
Why is log of zero undefined?
No finite real exponent of a valid positive base produces zero, so the real logarithm is undefined for zero and negative inputs.
What happens if the base is between zero and one?
A base between zero and one is valid when it is positive and not 1. The logarithm is decreasing in that base, so increasing x decreases the logarithm value.