Logarithm Calculator

Any base, change of base, and the log rules — with AI-powered step-by-step working
log_2(32)
log_7(200)
log(500)
log_3(x) = 4

What log_b(x) Is Asking

A logarithm answers an exponent question. logbx\log_b x is the power you must raise bb to in order to get xx:

logbx=y    by=x\log_b x = y \iff b^{\,y} = x

So log232=5\log_2 32 = 5 because 25=322^5 = 32, and log101000=3\log_{10} 1000 = 3 because 103=100010^3 = 1000. Reading the definition aloud in that form turns most log questions into a fact you already know about powers.

Two bases have their own notation:

  • logx\log x with no base written means base 10 on virtually every calculator and in most school work.
  • lnx\ln x means base e2.71828e \approx 2.71828, the natural logarithm.

The domain is strictly positive: x>0x > 0. There is no power of a positive base that produces 0 or a negative number, so log0\log 0 and log(5)\log(-5) are undefined and your calculator will return an error, not a number.

Because of that inverse relationship, every logarithm question can be rewritten as a question about exponents, which is almost always the faster route by hand.

Change of Base, and the Log Rules

A calculator normally offers only log\log and ln\ln. For any other base, use change of base:

logbx=logxlogb=lnxlnb\log_b x = \frac{\log x}{\log b} = \frac{\ln x}{\ln b}

Either version works and both give the same value, because the constant factor between log\log and ln\ln cancels in the quotient. That same relationship converts between them directly: lnx=logxloge2.302585logx\ln x = \dfrac{\log x}{\log e} \approx 2.302585\,\log x, and logx=lnxln10\log x = \dfrac{\ln x}{\ln 10}.

The three rules turn products into sums, which is what logarithms were invented for:

logb(MN)=logbM+logbN\log_b(MN) = \log_b M + \log_b N
logb ⁣(MN)=logbMlogbN\log_b\!\left(\frac{M}{N}\right) = \log_b M - \log_b N
logb(Mp)=plogbM\log_b(M^{\,p}) = p\,\log_b M

Plus two values worth memorising: logb1=0\log_b 1 = 0 and logbb=1\log_b b = 1.

To solve logbx=c\log_b x = c, rewrite it in exponential form as x=bcx = b^{\,c}.

Common Mistakes to Avoid

  • Splitting a log over a sum. log(M+N)\log(M + N) is not logM+logN\log M + \log N. The sum rule applies to a product inside the log, never to an addition.
  • Dividing instead of subtracting. logMlogN\dfrac{\log M}{\log N} is a change of base, not log ⁣(MN)\log\!\left(\frac{M}{N}\right). These are genuinely different numbers.
  • Putting the base in the wrong place. Change of base is log(argument)log(base)\dfrac{\log(\text{argument})}{\log(\text{base})}; flipping it gives the reciprocal.
  • Assuming log\log means base ee. On a calculator log\log is base 10; in some university texts it means base ee. Check which convention your course uses.
  • Taking the log of a negative number — undefined over the reals, so an equation step that produces one has produced an extraneous solution.
  • Forgetting that logbbx=x\log_b b^{\,x} = x, which is often a one-line shortcut past a page of algebra.

示例题目

Step 1: Rewrite as an exponent question: 2y=322^{\,y} = 32.
Step 2: List the powers of 2: 21=22^1 = 2, 22=42^2 = 4, 23=82^3 = 8, 24=162^4 = 16, 25=322^5 = 32.
Step 3: The power that works is 5.
Step 4: No calculator needed — the base and argument are both powers of 2.
Answer: log232=5\log_2 32 = 5

Step 1: Apply change of base: log7200=ln200ln7\log_7 200 = \dfrac{\ln 200}{\ln 7}.
Step 2: ln2005.29832\ln 200 \approx 5.29832 and ln71.94591\ln 7 \approx 1.94591.
Step 3: Divide: 5.29832÷1.945912.72295.29832 \div 1.94591 \approx 2.7229.
Step 4: Sanity check: 72=497^2 = 49 and 73=3437^3 = 343, so the answer must sit between 2 and 3 ✓
Answer: log72002.7229\log_7 200 \approx 2.7229

Step 1: Rewrite 500 as a product: 500=5×100=5×102500 = 5 \times 100 = 5 \times 10^2.
Step 2: Apply the product rule: log500=log5+log102\log 500 = \log 5 + \log 10^2.
Step 3: The second term collapses: log102=2log10=2\log 10^2 = 2\log 10 = 2.
Step 4: log50.69897\log 5 \approx 0.69897, so the total is 0.69897+20.69897 + 2.
Step 5: Check the magnitude: 500 is between 10210^2 and 10310^3, so the log must be between 2 and 3 ✓
Answer: log5002.69897\log 500 \approx 2.69897

常见问题

The log key is base 10 and the ln key is base e, roughly 2.71828. If a question writes log with no base and comes from a school or engineering context, base 10 is intended; some university and computer science texts use log for base e or base 2, so check the convention.

Use the change-of-base formula: divide the log of the argument by the log of the base. For log base 7 of 200, compute ln 200 divided by ln 7, which gives about 2.7229. It does not matter whether you use log or ln, as long as you use the same one top and bottom.

Multiply by the natural log of 10: ln x equals log x times 2.302585. Going the other way, divide by the same constant, so log x equals ln x divided by 2.302585. The constant is simply ln 10, and it comes straight out of the change-of-base formula.

Because no real power of a positive base produces a negative result. Raising 10 to any real exponent always gives a positive number, so there is no value that log of -5 could take. If an equation leads you to the log of a negative quantity, that solution is extraneous and must be rejected.

相关求解器

相关学习指南

免费试用 AI-Math

任何数学问题都能获得分步解答。拍照上传或输入问题即可。

开始解题