Log Calculator
Enter any positive number and choose your base — base 10, natural log (ln), base 2, or a custom base. Get the exact logarithm with step-by-step verification that confirms the answer.
Enter your values above to see the results.
Tips & Notes
- ✓log(1) = 0 for every base — because any base raised to 0 equals 1. Use this as a quick sanity check: if your calculator gives anything other than 0 for log(1), something is wrong.
- ✓Change of base formula: log_b(x) = ln(x)/ln(b) = log(x)/log(b). Example: log₅(200) = ln(200)/ln(5) = 5.298/1.609 = 3.29. Verify: 5^3.29 ≈ 200. Works for any base on any calculator.
- ✓Logarithms and exponents undo each other: 10^(log₁₀ x) = x and e^(ln x) = x. To solve 10^x = 350, take log of both sides: x = log(350) ≈ 2.544. To solve e^x = 20, use x = ln(20) ≈ 2.996.
- ✓Product rule: log(a × b) = log(a) + log(b). Quotient rule: log(a/b) = log(a) - log(b). Power rule: log(aⁿ) = n × log(a). Example: log(8) = log(2³) = 3 × log(2) = 3 × 0.301 = 0.903.
- ✓Negative inputs have no real logarithm. log(0) approaches negative infinity (undefined). If you need to take a log and your argument is zero or negative, check your problem setup — a sign error is likely.
- ✓The pH scale uses log₁₀: pH = -log₁₀[H+]. Each pH unit change = 10× change in acidity. pH 4 is 10× more acidic than pH 5, and 100× more acidic than pH 6.
Common Mistakes
- ✗log(a + b) ≠ log(a) + log(b). The product rule applies to multiplication: log(a × b) = log(a) + log(b). There is no rule for simplifying the log of a sum.
- ✗log(a / b) ≠ log(a) / log(b). Division inside the log becomes subtraction: log(a/b) = log(a) - log(b). Dividing two separate logs is only valid in the change of base formula.
- ✗log(aⁿ) = n × log(a), not log(a)ⁿ. The exponent comes out as a multiplier, not as a power on the whole log. Example: log(1000) = log(10³) = 3 × log(10) = 3.
- ✗Confusing log (base 10) with ln (base e): log(100) = 2 but ln(100) ≈ 4.605. They differ by factor ln(10) ≈ 2.3026. This matters critically in pH, decibel, and exponential growth formulas.
- ✗Entering zero or negative as the argument — log(0) and log(-5) are undefined in real numbers. The calculator will return an error. Recheck whether a sign error occurred in your equation.
- ✗Mismatched bases in the change of base formula: log_b(x) = log(x)/log(b) requires the same base throughout. Mixing log₁₀ in the numerator with ln in the denominator gives wrong results.
Log Calculator Overview
The logarithm answers one of the most natural questions in mathematics: to what power must a base be raised to produce a given result? Logarithms are the inverse of exponentiation — just as subtraction undoes addition and division undoes multiplication, logarithms undo exponentiation. They compress enormously wide ranges of values into manageable numbers, which is why they appear in scales for measuring earthquakes, sound intensity, chemical acidity, and stellar brightness.
log_b(y) = x means bˣ = y
EX: log₂(8) = 3 because 2³ = 8
EX: log₁₀(100,000) = 5 because 10⁵ = 100,000Two special cases appear so frequently that their notation is standardized: log (no subscript) means base 10, and ln means base e ≈ 2.71828:
EX: log(1000) = 3 | log(0.01) = −2 | ln(e³) = 3 | ln(1) = 0The three logarithm rules you need to know Three algebraic identities govern how logarithms interact with multiplication, division, and exponentiation. These rules allow complex expressions to be simplified and equations with unknown exponents to be solved:
Product rule: log(a × b) = log(a) + log(b)
Quotient rule: log(a / b) = log(a) − log(b)
Power rule: log(aⁿ) = n × log(a)
EX: log(8) = log(2³) = 3 × log(2) = 3 × 0.301 = 0.903The change of base formula Most calculators only have log₁₀ and ln. To compute any other base, use:
log_b(x) = ln(x) / ln(b) = log(x) / log(b)
EX: log₃(81) = log(81) / log(3) = 1.908 / 0.477 = 4.0 — verify: 3⁴ = 81 ✓Which base should you use? The right base depends entirely on the field of application. Each base has become standard in its domain because it naturally fits the mathematics of that field:
| Base | Notation | Primary use cases |
|---|---|---|
| Base 10 | log or log₁₀ | pH chemistry, decibels (dB), Richter earthquake scale. Each +1 unit = 10× change in the underlying physical quantity. |
| Base e | ln (natural log) | Continuous growth and decay: compound interest, radioactive half-life, population models. Central to calculus — derivative of ln(x) = 1/x. |
| Base 2 | log₂ (binary log) | Algorithm complexity in computer science (binary search = log₂(n) steps), data compression, and information entropy measured in bits. |
Frequently Asked Questions
log (without a subscript) means base 10: log(1000) = 3 because 10³ = 1000. ln means base e ≈ 2.71828: ln(e²) = 2 because e² = e². They measure the same thing on different scales, related by ln(x) = 2.3026 × log(x). Scientists prefer ln for natural growth and decay (population, radioactive decay, compound interest) because it arises naturally in calculus. Engineers use log₁₀ for decibels, pH, and the Richter scale because base 10 aligns with decimal notation.
Use the change of base formula: log_b(x) = ln(x)/ln(b) = log₁₀(x)/log₁₀(b). Example: log₅(125) = ln(125)/ln(5) = 4.828/1.609 = 3.0 exactly — verify: 5³ = 125. Most calculators only have ln and log₁₀ buttons, so this formula converts any base. This calculator handles the conversion automatically when you select or enter a custom base.
Because earthquake energy spans an extreme range — a magnitude 9 earthquake releases about 1,000,000,000 times more energy than a magnitude 1. A linear scale would be unreadable. Logarithms compress this range so that each 1-point increase represents exactly 10× more ground motion. The same reasoning applies to decibels (sound intensity) and pH (hydrogen ion concentration) — all use log₁₀ to make enormous physical ranges practical to express and compare.
ln appears whenever a quantity changes proportionally to its current size. Compound interest: A = Pe^(rt) — solving for time t requires t = ln(A/P)/r. Radioactive decay: N = N₀e^(−λt) — solving for half-life requires ln(2)/λ. Population growth, heat dissipation, and electrical discharge all follow the same pattern. ln is also central to calculus: the derivative of ln(x) is 1/x, making it the natural antiderivative of 1/x and essential for solving differential equations.
No — log(x) is undefined for x ≤ 0 in real numbers. Logarithms ask what power the base must be raised to in order to produce x. Since any positive base raised to any real exponent always yields a positive result, no real exponent can produce a negative number or zero. Complex logarithms exist (ln(−1) = iπ in complex analysis) but are outside standard real-number calculation. If your problem requires a log of a negative, there is likely a sign error in your equation.
Information entropy is measured in bits using log₂: H = −Σ p × log₂(p), where p is the probability of each outcome. A fair coin flip has entropy of 1 bit because log₂(2) = 1. A fair six-sided die has entropy of log₂(6) ≈ 2.58 bits. Higher entropy means more unpredictability and more information per observation. This foundation drives data compression — Huffman coding assigns shorter bit sequences to frequent symbols and longer ones to rare symbols, matching the log₂ entropy of the source.