Math

Logarithm Calculator

Calculate logarithms in any base including log base 10, natural log (ln), and custom bases. See step-by-step solutions using the change-of-base formula.

Did this calculator help you?

What is Logarithm Calculator?

The logarithm is one of the most powerful and versatile mathematical concepts, forming the foundation of everything from earthquake measurement to signal processing, from information theory to chemical pH. At its core, log_b(n) asks: "What power must I raise b to in order to get n?" When b = 10, this is the common logarithm; when b = e ≈ 2.718, it is the natural logarithm — the language of growth, decay, and continuous change. This calculator handles all three standard logarithm types — log base 10, natural log (ln), and any custom base — and displays the full step-by-step solution using the change-of-base formula. Understanding this formula is key: every logarithm can be expressed as a ratio of two natural logs, making computation possible with any scientific calculator.

When to Use This Calculator

  • Solving exponential equations where the unknown is in the exponent: 2^x = 100 → x = log₂(100)
  • Calculating pH of chemical solutions: pH = −log₁₀[H⁺]
  • Converting sound intensity to decibels: dB = 10 × log₁₀(P₁/P₀)
  • Determining earthquake magnitude on the Richter scale
  • Computing continuous compound interest and finding doubling time
  • Analyzing algorithm time complexity — O(log n) algorithms scale extremely well

Steps:

  1. Enter the number n (must be positive — logarithm of zero or negatives is undefined).
  2. Select your base: log₁₀ for common logarithm, ln for natural logarithm, or enter a custom base.
  3. The calculator applies the change-of-base formula: log_b(n) = ln(n) / ln(b).
  4. Verify the result by checking: b^result ≈ n (shown as antilog).
  5. Use the reference table to compare logarithm values across different bases.

Formula

Definition: log_b(n) = x ↔ b^x = n Change of base: log_b(n) = ln(n) / ln(b) = log₁₀(n) / log₁₀(b) Logarithm rules: Product: log_b(xy) = log_b(x) + log_b(y) Quotient: log_b(x/y) = log_b(x) − log_b(y) Power: log_b(xⁿ) = n × log_b(x) Special: log_b(1) = 0, log_b(b) = 1, ln(e) = 1

Use Cases

  • Solving exponential equations in algebra and calculus
  • Computing pH of a solution: pH = −log₁₀[H⁺]
  • Calculating decibel levels: dB = 10×log₁₀(P₁/P₀)
  • Analyzing Richter scale earthquake magnitudes
  • Computing information entropy: H = −Σ p×log₂(p)
  • Continuous compound interest: A = Pe^(rt)

Key Benefits

  • Instantly compute logarithms in any base — common log, natural log, or custom base — without memorizing formulas
  • See the complete step-by-step solution using the change-of-base formula so you can understand and reproduce the calculation
  • Verify results with the antilog check: b^result ≈ n confirms your answer is correct
  • Reference table of common logarithm values for quick comparison across different bases
  • Handle real-world applications: pH calculations, decibel conversions, Richter scale, and compound interest problems
  • Learn the fundamental properties (product, quotient, power rules) through worked examples

Pro Tips

  • Always verify your logarithm by computing the antilog: if log_b(n) = x, then b^x should equal n
  • Use the change-of-base formula when your calculator only has ln or log₁₀ buttons
  • Remember that log of a negative number is undefined in the real number system — complex logarithms are needed
  • For mental math: log₁₀(10^n) = n, so log₁₀(1000) = 3, log₁₀(0.01) = −2
  • In finance, natural logs are preferred for continuous compounding: A = Pe^(rt) uses ln for solving for time
  • When comparing earthquake magnitudes, remember that each whole number is 10x the amplitude but roughly 32x the energy

Common Mistakes to Avoid

  • Confusing log₁₀ with ln: log₁₀(100) = 2 but ln(100) ≈ 4.605. Always check which base is being used.
  • Trying to compute log of zero or negative numbers: log(0) and log(−1) are undefined in real numbers
  • Forgetting that log_b(1) = 0 for any valid base, since b⁰ = 1
  • Assuming log(x + y) = log(x) + log(y) — this is WRONG. The correct property is log(xy) = log(x) + log(y)
  • Confusing log_b(n) with (log n)^b: log₁₀(100) = 2 but (log₁₀ 100)² = 4
  • Using base 10 when the problem requires natural log (ln) or vice versa — especially common in pH and finance problems

Key Terms Explained

Logarithm: The exponent to which a base must be raised to produce a given number
Common logarithm (log₁₀): Base-10 logarithm, used in pH and decibels
Natural logarithm (ln): Base-e logarithm, fundamental in calculus and growth models
Antilogarithm: The inverse of a logarithm — b raised to the power of the log result
Change-of-base formula: log_b(n) = ln(n)/ln(b) — converts any log to computable form
Euler's number (e): Mathematical constant ≈ 2.71828, base of the natural logarithm

Related Concepts

Example

Find log₅(125): log₅(125) = ln(125)/ln(5) = 4.8283/1.6094 = 3. Verification: 5³ = 125 ✓. This makes intuitive sense because 125 = 5³.

Interpreting Your Results

The result of a logarithm tells you the exponent needed to reach the input number using the given base. A result of 3 means the base must be raised to the 3rd power. A negative result means the input is less than 1 (a fraction). A result between 0 and 1 means the input is between 1 and the base. For example, log₁₀(50) ≈ 1.699 means 10^1.699 ≈ 50 — the answer is between 1 and 2 because 50 is between 10¹ = 10 and 10² = 100. The antilog check (b^result ≈ n) confirms the calculation is correct.

Frequently Asked Questions

What is a logarithm?
A logarithm answers: "To what exponent must I raise the base to get this number?" If log_b(n) = x, then b^x = n. For example, log₁₀(1000) = 3 because 10³ = 1000. Logarithms are the inverse of exponentiation.
What is the natural logarithm (ln)?
The natural logarithm (ln) uses Euler's number e ≈ 2.71828 as its base. It appears throughout calculus, compound interest calculations, population growth models, radioactive decay, and physics. ln(x) = log_e(x). The natural log is the most important logarithm in mathematics because its derivative is simply 1/x.
What is the change-of-base formula?
The change-of-base formula: log_b(n) = ln(n)/ln(b) = log₁₀(n)/log₁₀(b). This means any logarithm can be computed using only natural logs or common logs on a standard calculator. Our calculator uses this formula to give you precise results for any base.
Why are logarithms used in science?
Logarithms compress huge ranges into manageable scales. The Richter scale (earthquakes), decibel scale (sound), pH scale (chemistry), and stellar magnitude (astronomy) all use logarithms. In computer science, O(log n) algorithms are among the most efficient possible — binary search, for instance, runs in logarithmic time.
What is log₁₀(0)?
log₁₀(0) is undefined — there is no power to which you can raise 10 to get 0. As the input approaches 0 from the positive side, the logarithm approaches negative infinity. This is why the logarithm function only accepts positive numbers.
What is the difference between log and ln?
log (without a subscript) typically means log₁₀, the common logarithm with base 10. ln is the natural logarithm with base e ≈ 2.71828. In computer science, log sometimes means log₂ (base 2). Always check the base convention in your field.
How do I convert between logarithm bases?
Use the change-of-base formula: log_b(n) = ln(n)/ln(b). For example, log₂(32) = ln(32)/ln(2) = 3.4657/0.6931 = 5. This works because 2⁵ = 32. You can use any base in the conversion — the result is always the same.
What are the key logarithm properties?
Product rule: log_b(xy) = log_b(x) + log_b(y). Quotient rule: log_b(x/y) = log_b(x) − log_b(y). Power rule: log_b(xⁿ) = n × log_b(x). These properties let you expand and compress logarithmic expressions, which is essential for solving equations and simplifying calculations.
What is the pH scale and how does it use logarithms?
pH = −log₁₀[H⁺], where [H⁺] is the hydrogen ion concentration. Each unit change in pH represents a 10-fold change in acidity. A solution with pH 3 is 10 times more acidic than one with pH 4, and 100 times more acidic than one with pH 5. The pH scale typically ranges from 0 to 14.
How are logarithms used in finance?
Logarithms appear in continuous compound interest (A = Pe^(rt)), the Rule of 72 for estimating doubling time, and log-normal distributions used in stock price modeling. Log returns are preferred in quantitative finance because they are time-additive and more statistically well-behaved than simple returns.
What is a logarithmic scale?
A logarithmic scale is a nonlinear scale where equal distances represent equal ratios (not equal differences). On a log scale, the distance from 1 to 10 equals the distance from 10 to 100. Log scales are used for earthquake magnitude, sound intensity, pH, and many other measurements spanning large ranges.

Discover More Tools

Fresh picks from across our tool library.