Log Calculator (Logarithm Calculator)

Solve \(\log_b(x)=y\) by entering any two values and leaving the missing value blank. Supports ln, log10, log2, any base, antilog, worked steps, and graphing.

Author: Starlight Tools math editors

Reviewer: Starlight Robotics calculation QA

Last reviewed: July 5, 2026

Accuracy note: Results use JavaScript Math.log, Math.exp, and change-of-base formulas in your browser.

Solve logb(x) = y

logb(x) = y

Results

Solved value
Enter any two values.
Base \(b\):
Argument \(x\):
Result \(y\):
Verification \(b^y\):
\(\ln(x)\):
\(\log_{10}(x)\):
\(\log_{2}(x)\):

Step-by-step work

  1. Enter any two values above, then calculate.
The dashed line marks the vertical asymptote at \(x=0\).

Tip: You can paste numbers in E-notation like 3.2e-7. Leave exactly one input blank.

Advertisement

What this calculator uses

  • Solve for \(y\): \(\log_b(x)=\dfrac{\ln(x)}{\ln(b)}\).
  • Solve for \(x\): If \(y=\log_b(x)\), then \(x=b^y\). This is the antilog.
  • Solve for \(b\): If \(y\neq 0\), then \(b=x^{1/y}\).
  • Domain: \(x>0\), \(b>0\), and \(b\neq 1\) for real-number logarithms.

Common Logarithm Values

xln(x)log10(x)log2(x)
0.001-6.9078-3-9.9658
0.01-4.6052-2-6.6439
0.1-2.3026-1-3.3219
1000
20.69310.30101
102.302613.3219
1004.605226.6439
10006.907839.9658

Logarithms Explained (ln, log10, log2, and log base b)

Logarithms help you solve “exponent questions” quickly. In symbols, \(\log_b(x)=y\) means \(b^y=x\). This calculator makes that relationship practical by solving for the missing argument \(x\), base \(b\), or result \(y\).

What a logarithm means in plain language

Think of a base \(b\) as the “step size” and the logarithm as the number of steps needed to reach \(x\). Because logs are the inverse of exponentiation, they are perfect for undoing growth, comparing scales, or converting between powers. For real-number results, the input must be positive (\(x>0\)), and the base must be positive and not equal to 1. When \(x\) is between 0 and 1, the log is negative, which simply means you need a fraction of a step to reach that smaller value.

This tool uses the change-of-base idea \(\log_b(x)=\ln(x)/\ln(b)\), so any base works even if you only know \(\ln\) or \(\log_{10}\). It also verifies the answer by checking the exponential form \(b^y=x\).

How to use the logarithm calculator

  1. Enter any two values in \(\log_b(x)=y\). Use e for natural log.
  2. Leave the value you want to solve blank: \(x\), \(b\), or \(y\).
  3. Pick the decimal precision you want for the output.
  4. Click Calculate to see the answer, worked steps, verification, and graph.

Why logs are useful in the real world

Many measurements are based on a logarithmic scale because they span huge ranges. Sound levels in decibels compare power ratios with \(\log_{10}\), acidity is measured with pH (also a base‑10 log), and information theory uses \(\log_{2}\) to count bits needed for a number of outcomes. In finance and science, logarithms simplify exponential growth or decay so you can solve for time, rates, or multipliers. As a quick intuition, every 10× change in a base‑10 log shifts the value by exactly 1, which makes comparisons fast and meaningful.

Quick checks to build confidence

  • \(\log_b(1)=0\) and \(\log_b(b)=1\).
  • If \(x>1\), the log is positive; if \(0<x<1\), the log is negative.
  • Changing the base changes the number, but the underlying relationship \(b^y=x\) stays the same.
Precision tip (optional)

For \(x\) very close to 1, \(\ln(1+u)\) with \(u=x-1\) is more stable; many browsers expose Math.log1p(u).

Log Rules

Product rule\(\log_b(MN)=\log_b M+\log_b N\)
Example: \(\log_2(8\cdot4)=3+2=5\).
Quotient rule\(\log_b(M/N)=\log_b M-\log_b N\)
Example: \(\log_2(32/4)=5-2=3\).
Power rule\(\log_b(M^p)=p\log_b M\)
Example: \(\log_{10}(100^3)=3\cdot2=6\).
Change of base\(\log_b(x)=\ln(x)/\ln(b)\)
Example: \(\log_3(81)=\ln(81)/\ln(3)=4\).
Reciprocal base\(\log_{1/b}(x)=-\log_b(x)\)
Example: \(\log_{1/2}(8)=-3\).
Log of 1\(\log_b(1)=0\)
Example: \(\log_7(1)=0\).
Log of the base\(\log_b(b)=1\)
Example: \(\log_5(5)=1\).
Undefined/domain rule\(x>0\), \(b>0\), \(b\neq1\)
Example: \(\log_2(-8)\) has no real value.

Frequently Asked Questions

How do I calculate log base 2?

Use \(\log_2(x)=\ln(x)/\ln(2)\). For example, \(\log_2(64)=6\) because \(2^6=64\).

Does log mean base 10 or natural log?

In many school and calculator contexts, log means base 10 and ln means base \(e\). Some advanced math contexts use log for natural log, so check the convention.

How do you solve for x from logb(x)=y?

Rewrite the logarithm as \(x=b^y\). For example, \(\log_3(x)=4\) gives \(x=3^4=81\).

Why are logs of negative numbers invalid in real numbers?

For a positive real base \(b\neq1\), \(b^y\) is always positive. It cannot produce a negative \(x\), so \(\log_b(x)\) is undefined for negative \(x\) in real numbers.

What does antilog mean?

Antilog is the inverse operation. If \(y=\log_b(x)\), then \(x=b^y\).

What happens when 0 < x < 1?

For bases greater than 1, \(\log_b(x)\) is negative between 0 and 1. For bases between 0 and 1, the sign reverses.

What is the domain of the logarithm?

For real numbers, \(x>0\), \(b>0\), and \(b\neq1\). The exponent result \(y\) can be any real number when the domain is valid.

Is my data private?

Yes. The calculator runs locally in your browser; values are not uploaded.

5 Fun Facts about Logarithms

Logs turn multiplication into addition

That’s why slide rules worked: \(\log_b(xy)=\log_b x + \log_b y\). Adding distances gave products.

Analog magic

Base switches via change-of-base

\(\log_b(x)=\ln(x)/\ln(b)\). Any calculator with ln or log10 can compute any base with this one formula.

Base freedom

Decibels are logs

Sound levels are \(10\log_{10}(P/P_0)\). Add 10 dB and you multiply intensity by 10—a tidy logarithmic ladder.

Audio math

Bits are base‑2 logs

Information in bits for \(N\) outcomes is \(\log_{2} N\). Doubling outcomes adds exactly one bit of uncertainty.

Info theory

ln is an area

\(\ln(x)\) equals the area under \(1/t\) from 1 to \(x\). Logs connect algebra, geometry, and calculus in one sweep.

Calculus link

Explore more tools