Logarithm Calculator (Log Base Any Number)
- Free
- No sign-up
- Works on phones
- Shows the working
This logarithm calculator computes \( \log_b x \) for any positive base \( b \neq 1 \): base 10 (common log), base 2, base \( e \) (natural log, ln) or any other number. It shows the answer exactly when it’s a whole number or simple fraction, the equivalent exponential statement, the change-of-base working, and the value in the three most-used bases.
It’s handy for checking log homework, solving exponential equations and converting between bases. It’s free and needs no sign-up.
How to use the logarithm calculator
- Enter x, the number you’re taking the log of. It must be positive. Expressions such as
1/4,e^2orsqrt(10)are accepted. - Enter the base b. Type
efor the natural log. - Press Calculate.
- Read \( \log_b x \), the exponential form \( b^y = x \), and the change of base \( \frac{\ln x}{\ln b} \).
Definition and formula
A logarithm answers the question “what power of b gives x?”:
$$\log_b x = y \iff b^y = x$$
Most calculators only have ln and log base 10, so other bases use the change-of-base formula:
$$\log_b x = \frac{\ln x}{\ln b} = \frac{\log_{10} x}{\log_{10} b}$$
Worked example: log base 2 of 8
\( 2^3 = 8 \), so \( \log_2 8 = 3 \). Change of base agrees: \( \frac{\ln 8}{\ln 2} = \frac{2.0794}{0.6931} = 3 \).
Worked example: a non-integer answer
\( \log_3 50 \). Since \( 3^3 = 27 \) and \( 3^4 = 81 \), the answer is between 3 and 4. Change of base gives
$$\log_3 50 = \frac{\ln 50}{\ln 3} = \frac{3.9120}{1.0986} \approx 3.5609$$
Check: \( 3^{3.5609} \approx 50 \).
Worked example: a negative log
\( \log_2 \frac14 = -2 \), because \( 2^{-2} = \frac{1}{4} \). Logs of numbers between 0 and 1 are negative whenever the base is greater than 1.
Solving an exponential equation
Solve \( 5 \cdot 2^t = 80 \). Divide by 5: \( 2^t = 16 \). Take \( \log_2 \) of both sides: \( t = \log_2 16 = 4 \). For an equation like \( 2^t = 50 \), \( t = \log_2 50 \approx 5.6439 \), which is one of the values the calculator lists.
Tips and common mistakes
- Logs of zero or negatives. \( \log_b x \) is only defined for \( x > 0 \). There’s no real power of 10 that gives \( -1 \).
- log means different things. In most school courses \( \log x \) is base 10; in many calculus and programming contexts it means ln. Check which your source uses.
- \( \log(a + b) \neq \log a + \log b \). The product rule is \( \log(ab) = \log a + \log b \). See logarithm rules for all of them.
- Base 1 is not allowed. Every power of 1 is 1, so \( \log_1 x \) can’t be defined.
Logs in calculus
The natural log is the one calculus prefers because its derivative is simple: \( \frac{d}{dx}\ln x = \frac1x \), and \( \int \frac{dx}{x} = \ln|x| + C \). For other bases, \( \frac{d}{dx}\log_b x = \frac{1}{x\ln b} \). See the derivative of ln x and the integral of 1/x.
Related guides
- Logarithm Rules and Log Properties
- Exponential Functions and Their Graphs
- Derivative of ln(x)
- Integral of 1/x
Further reading
- Logarithm (Wikipedia) — definition, history, change of base and the most common bases.
- Exponential and Logarithm Functions (Paul’s Online Math Notes) — evaluating logs, properties and graphs with examples.
FAQ
How do I calculate a log with a different base?
Use \( \log_b x = \frac{\ln x}{\ln b} \), or enter x and the base in the calculator.
What is the difference between log and ln?
ln is the logarithm with base \( e \approx 2.71828 \). log usually means base 10 in algebra courses.
What is log base 10 of 1000?
3, because \( 10^3 = 1000 \).
Can a logarithm be negative?
Yes. With a base greater than 1, the log of any number between 0 and 1 is negative, for example \( \log_{10} 0.01 = -2 \).
