Logarithm Calculator – Log, Ln, Any Base
Calculate log base 10, natural log (ln), log base 2, and any custom base logarithm.
About This Calculator
Calculate log base 10, natural log (ln), log base 2, and any custom base logarithm. Use the calculator above for instant results.
Understanding Logarithms as Inverse Exponents
A logarithm answers an exponent question: what power must a base be raised to in order to produce a given positive number? The statement logb(x)=y is exactly equivalent to by=x. This inverse relationship is the best way to interpret a logarithm rather than treating log as an isolated calculator key.
For real logarithms, the argument must satisfy x>0, and the base must satisfy b>0 with b≠1. Base 10 logarithms are common in measurement scales and scientific notation, natural logarithms use the constant e, and base 2 logarithms appear frequently in computing and information theory.
Logarithm laws come from exponent laws. Because bmbn=bm+n, multiplication becomes addition: logb(MN)=logbM+logbN. Division becomes subtraction, and an exponent becomes a multiplier: logb(Mk)=k logbM. These rules require positive real arguments when working in ordinary real-number algebra.
When the desired base is not available directly, use change of base: logb(x)=ln(x)/ln(b). If b>1, the logarithm increases with x. If 0<b<1, it decreases. Values between 0 and 1 have negative logarithms for bases greater than 1 because negative exponents produce reciprocals.
A graph also clarifies the inverse relationship. The curves y=bx and y=logb(x) reflect across the line y=x. That is why the domain and range swap: an exponential with positive base has positive outputs, so the corresponding real logarithm accepts only positive inputs. It is also why logb(b)=1 and logb(1)=0 are immediate consequences of b1=b and b0=1.
On exams, estimate the exponent before computing. Since 102=100 and 103=1000, log10(500) must lie between 2 and 3. A result outside that interval signals an input or base error.
Worked Examples
- 10^3 = 1000 → log10(1000) = 3
Answer: log10 = 3
- ln(7.389) = 2
Answer: ln = 2
- 2^8 = 256 → log2(256) = 8
Answer: log2 = 8
Find log5(125).
- Because 53 = 125, log5(125) = 3.
Answer: 3
Find log10(0.001).
- 0.001 = 10−3.
Answer: −3
Who Uses This Calculator?
pH, decibels, Richter scale.
Algorithm complexity O(log n).
Logarithm properties demo.
Signal processing.
Common Mistakes to Avoid
❌ log vs ln
In programming, log() is often ln. In math, log often means base 10. Check the base!
❌ Log of negatives undefined
Logarithm only defined for positive numbers. log(0) = -infinity.
❌ Taking a real logarithm of zero or a negative number
Real logarithms require a positive argument. log(0) is undefined, and log of a negative number requires complex-number methods.
❌ Distributing log across addition
log(a+b) is not log(a)+log(b). Product, quotient, and power rules apply to multiplication, division, and exponents, not ordinary sums.
Frequently Asked Questions
What is a logarithm?
logb(x)=y means b^y=x. What power of b gives x?
log vs ln?
log = base 10. ln = natural log (base e). log2 = binary (computing).
Change of base formula?
logb(x) = ln(x)/ln(b). Calculate any base from any calculator.
Why is logb(1) always zero?
For every valid base b, b0=1. Since a logarithm asks for the exponent, logb(1)=0.
Can the base of a logarithm be between 0 and 1?
Yes. A base such as 1/2 is valid because it is positive and not 1. Its logarithm function decreases as x increases, unlike logarithms with bases greater than 1.
Why is base 1 not allowed?
Every real power of 1 equals 1, so 1y cannot produce arbitrary positive x values. The inverse relationship needed to define a logarithm therefore fails.
How can I check a logarithm answer?
Rewrite the result in exponential form. If log3(81)=4, verify that 34=81. This reverse check catches many base and sign errors.
Formula Explorer connections
Interpretation: This formula describes an algebraic relationship among variables, functions, equations, roots or sequences. Assumption: Respect the expression’s domain and excluded values. Check roots in the original equation because transformations can introduce extraneous solutions.