Logarithm Calculator

Calculate logarithms for any base including common (log₁₀) and natural (ln) logarithms. Shows the step-by-step process.

Enter your values above to see the results.

Tips & Notes

  • Rule of 72: years to double = 72 / annual rate%. At 8%: doubles in 72/8 = 9 years. This approximation comes from ln(2) ≈ 0.693 and uses log to solve exponential growth equations.
  • log₁₀(10ⁿ) = n exactly — this is the definition. log₁₀(1000) = 3, log₁₀(0.001) = -3, log₁₀(1) = 0. Powers of 10 always give whole-number results in base 10.
  • ln(eⁿ) = n exactly. ln(e) = 1, ln(e²) = 2, ln(1) = 0, ln(e^-1) = -1. Knowing these reference points lets you check answers quickly without a calculator.
  • Change of base: log_b(x) = ln(x)/ln(b) = log(x)/log(b). Use when your calculator only has ln and log₁₀. Example: log₃(243) = ln(243)/ln(3) = 5.493/1.099 = 5.0 exactly (because 3⁵=243).
  • log₂(n) tells you approximately how many bits are needed to store n values. log₂(256) = 8 bits (one byte), log₂(65536) = 16 bits (two bytes). Essential for computing memory and complexity analysis.
  • Logarithms convert multiplication to addition: log(a × b) = log(a) + log(b). Before electronic calculators, this let scientists multiply million-digit numbers by looking up logs, adding, and finding the antilog.

Common Mistakes

  • log(a + b) ≠ log(a) + log(b). The product rule applies only to multiplication inside: log(a × b) = log(a) + log(b). There is no rule for simplifying a logarithm of a sum.
  • log(aⁿ) = n × log(a), not log(a)ⁿ. The exponent comes out as a coefficient, not as a power on the log. Common error in pH and decibel problems where powers of 10 appear.
  • Taking log of zero or a negative number is undefined in real numbers. log(0) approaches -infinity; log(-5) does not exist. If your calculation leads here, check for a sign or setup error.
  • Using log when ln is required: compound interest and decay formulas use e and therefore ln. Doubling time = ln(2)/r, not log(2)/r. Mixing bases gives a result off by factor 2.3026.
  • Forgetting that log_b(b) = 1 always and log_b(1) = 0 always. These are fast sanity checks: if your calculator gives anything else for these inputs, there is an error.
  • Confusing log_b(x/y) with log_b(x) / log_b(y): the quotient rule says log(x/y) = log(x) - log(b). Dividing two logs is what you do in the change of base formula, not the quotient rule.

Logarithm Calculator Overview

The logarithm log_b(x) answers: to what power must b be raised to obtain x? Logarithms are the inverse of exponentiation. They convert multiplication into addition, powers into multiplication, and compress enormous ranges into manageable scales. Before electronic computers, logarithm tables and slide rules were the primary tools for scientific calculation. Today, logarithms appear in every field where quantities span many orders of magnitude: acoustics, chemistry, astronomy, information theory, and finance.

The defining relationship in both directions:

log_b(x) = y means bʸ = x
EX: log₁₀(10,000) = 4 because 10⁴ = 10,000 | log₂(64) = 6 because 2⁶ = 64 | ln(e³) = 3 because e³ = e³
The three standard logarithm forms: Common log (log₁₀ or log) — base 10: log(1) = 0, log(10) = 1, log(100) = 2, log(1000) = 3, log(0.001) = −3.
  • pH = −log₁₀[H⁺] — each pH unit equals a 10× change in acidity
  • Decibels: dB = 10 × log₁₀(P/P₀) — sound intensity scale
  • Richter scale: magnitude 7 is 10× more intense than magnitude 6
Natural log (ln) — base e ≈ 2.71828: ln(1) = 0, ln(e) = 1, ln(e²) = 2.
  • Continuous compound interest: A = Pe^(rt)
  • Radioactive decay: N = N₀e^(−λt)
  • Doubling time = ln(2) / growth rate ≈ 0.693 / r
Binary log (log₂) — base 2: log₂(1) = 0, log₂(2) = 1, log₂(8) = 3, log₂(1024) = 10.
  • Algorithm complexity: binary search on n items takes log₂(n) steps
  • Data storage: log₂(256) = 8 bits per byte
  • Sorting 1,000,000 items requires about 20 comparison levels
The four logarithm laws:
log(ab) = log(a) + log(b) | log(a/b) = log(a) − log(b) | log(aⁿ) = n·log(a) | log_b(x) = log(x)/log(b)
EX: log(8000) = log(8×1000) = log(8) + log(1000) = 3log(2) + 3 = 3(0.301) + 3 = 3.903
Change of base formula — compute any logarithm using log or ln:
EX: log₃(81) = log(81)/log(3) = 1.908/0.477 = 4 | verify: 3⁴ = 81 ✓
Logarithms are most useful where quantities span extreme ranges. The pH scale compresses hydrogen ion concentrations from 10⁻¹⁴ to 10⁰ into a simple 0 to 14 range. Sound intensity in decibels makes a trillion-to-one power ratio readable as 0 to 120 dB. The change of base formula log_b(x) = ln(x)/ln(b) converts between any two bases when only one is available on a calculator. Select your base and value above to see the calculation with full step-by-step verification.

Frequently Asked Questions

A logarithm is the inverse of exponentiation. log_b(x) = y means b^y = x — the base b raised to the power y equals x. Example: log₂(32) = 5 because 2⁵ = 32. log₁₀(10000) = 4 because 10⁴ = 10000. Logarithms were invented to convert multiplication into addition — log(a×b) = log(a) + log(b) — which simplified arithmetic enormously before calculators. Today they model exponential growth, signal strength, and information theory.

Any base b where b > 0 and b ≠ 1 can be a valid logarithm base. Common bases: base 10 (common logarithm, written log or log₁₀) used in pH and decibels; base e ≈ 2.71828 (natural logarithm, written ln) used in calculus and continuous growth; base 2 (binary logarithm, written log₂ or lb) used in computer science and information theory. The number 1 cannot be a base because 1ʸ = 1 for all y — there is no power of 1 that gives any other number.

The three essential rules are the product rule: log(ab) = log(a) + log(b); the quotient rule: log(a/b) = log(a) − log(b); and the power rule: log(aⁿ) = n·log(a). These allow any logarithmic expression to be simplified. Example: log₂(32/4) = log₂(32) − log₂(4) = 5 − 2 = 3. Example: log(10⁷) = 7·log(10) = 7×1 = 7. Memorizing these three rules covers the vast majority of logarithm problems.

logᵦ(x) = log(x)/log(b) or equivalently ln(x)/ln(b), where log and ln are any consistent base. Example: log₇(343) = log(343)/log(7) = 2.5353/0.8451 = 3.0 exactly (since 7³ = 343). Example: log₃(50) = ln(50)/ln(3) = 3.912/1.099 = 3.56. This formula is how scientific calculators compute logarithms of any base using only their built-in log₁₀ or ln functions.

Take the logarithm of both sides to bring the exponent down, then solve algebraically. Example: 5ˣ = 200 → log(5ˣ) = log(200) → x·log(5) = log(200) → x = log(200)/log(5) = 2.301/0.699 = 3.29. Verify: 5³·²⁹ ≈ 200 ✓. For equations with the variable inside the logarithm: log₃(x) = 4 → x = 3⁴ = 81. Always check that the solution produces a positive argument in the original logarithm.

pH = −log₁₀([H⁺]) measures hydrogen ion concentration. Pure water: [H⁺] = 10⁻⁷ mol/L → pH = 7. Lemon juice: [H⁺] = 10⁻² → pH = 2. Each pH unit represents a 10× change in concentration. Decibels: dB = 10·log₁₀(P/P₀). Earthquake magnitude: each 1.0 increase = 10× ground motion amplitude. Information entropy: bits = −log₂(probability). Logarithms appear wherever quantities span many orders of magnitude and a linear scale would be unreadable.