Log Calculator (Logarithm)

Solve log_b(x) = y for any one missing value. Leave one field blank — the calculator fills it in. Enter e in the base field for the natural log (ln).

Enter any two of the three values in log_b(x) = y. Type e in the base field for the natural log.

What is a logarithm?

A logarithm is the inverse of exponentiation. The equation x = b^y and the equation y = log_b(x) say exactly the same thing: y is the power the base b must be raised to in order to produce x. Three bases show up almost everywhere — base 10 (written log, used in decibels, pH, Richter), base e (written ln, used in calculus and continuous growth) and base 2 (the binary log used in computer science).

Logarithms, rule by rule

Each card explains one identity, shows the formula, and gives a worked value you can verify against the calculator.

Log is the inverse of exponent

Every logarithm question is really an exponent question in disguise. "log base b of x equals y" is the same statement as "b to the power y equals x" — the log just isolates the exponent.

log_b(x) = y  ⟺  b^y
= x
bbase (b > 0, b ≠ 1)·xargument (x > 0)·ythe exponent you're solving for
log₁₀(1000) = ?
10^? = 1000
y = 3
Example
Given
b = 10
x = 1000
Substitute
10^y = 1000
Answer
y = 3

The three common bases — 10, e and 2

log means base 10 in most engineering and everyday use; ln means base e ≈ 2.71828 and is the natural log used across calculus and finance; base 2 counts halvings and is standard in computer science.

log(x) = log₁₀(x)
ln(x) = log_e(x)
lg(x) = log₂(x)
eEuler's constant ≈ 2.71828
log(100) = 2
ln(e) = 1
log₂(8) = 3
Example
Given
x = 100 in base 10
Substitute
10^y = 100
Answer
y = 2

Product and quotient rules — turn ×/÷ into +/−

Logs convert multiplication into addition and division into subtraction. This is why they made pre-calculator arithmetic possible — slide rules are just physical log scales.

log_b(x · y) = log_b(x) + log_b(y)
log_b(x / y) = log_b(x) − log_b(y)
x, ypositive real numbers
log(10 / 2)
= log(10) − log(2)
≈ 0.699
Example
Given
log(10 / 2)
Substitute
log(10) − log(2) ≈ 1 − 0.301
Answer
0.699

Power rule — pull the exponent to the front

A power inside a log becomes a multiplier outside it. This is the trick behind solving equations where the unknown sits in an exponent — take the log of both sides and the exponent drops down.

log_b(x^k) = k · log_b(x)
kany real exponent·xpositive base of the power
log(2^6)
= 6 · log(2)
≈ 1.806
Example
Given
log(2^6)
Substitute
6 · log(2) ≈ 6 × 0.301
Answer
1.806

Change of base — compute any log with ln or log

Most calculators only have log and ln. To get a log in any other base, divide two logs in a base you do have. This is exactly what this calculator does under the hood.

log_b(x) = log_k(x) / log_k(b)
bbase you want·kany convenient base (10 or e)
log₇(20)
= ln(20) / ln(7)
≈ 1.540
Example
Given
b = 7
x = 20
k = e
Substitute
ln(20) / ln(7) ≈ 2.996 / 1.946
Answer
1.540

Features of this calculator

  • Solves for any of the three variables (base, argument, or result)
  • Accepts e in the base field for natural logarithms (ln)
  • Shows every step using the change-of-base formula
  • Guards against invalid inputs (non-positive x, base ≤ 0 or = 1)
  • Plots the curve y = log_b(x) with your point marked

Frequently asked questions

+What is the difference between log and ln?

log usually means base 10, while ln means base e ≈ 2.71828. They are both logarithms — just different bases.

+How do I change the base of a logarithm?

Use log_b(x) = log_k(x) / log_k(b). Any base k works.

+Why is log of 0 undefined?

No finite exponent y makes b^y equal 0; as x → 0, log_b(x) → −∞.

+Can the base or argument be negative?

For real logarithms both must be positive, and the base cannot be 1.

Related calculators