Discover
Random

Logarithm Calculator

Find log base b of x for any positive base and value.

3
log_2(8)
Change-of-base formula: log_b(x) = ln(x) / ln(b)
log_2(8) = ln(8) / ln(2) = 2.07944154 / 0.69314718 = 3
Check: 2^3 ≈ 8

Free Logarithm Calculator (Log Base b, ln & log₁₀)

This logarithm calculator evaluates logb(x) — "log base b of x" — for any positive base b ≠ 1 and positive real argument x > 0, displaying the exact change-of-base derivation logb(x) = ln(x) / ln(b) alongside an exponential verification check (by = x). Because standard scientific calculators and programming runtimes expose only the natural logarithm (ln, base e ≈ 2.71828183) and common logarithm (log10), the change-of-base identity is the universal method for computing arbitrary-base logarithms.

Switch to Base 10 (common log) for decibel, Richter, and pH calculations, Base e (natural log) for continuous compounding and calculus problems, or keep Base 2 (binary log) for information theory, bit-depth, and algorithm complexity analysis.

About the Logarithm Calculator

How It Works & Change-of-Base Derivation

By definition, the logarithm y = logb(x) is the inverse of the exponential equation by = x. Taking the natural logarithm (ln) of both sides yields ln(by) = ln(x). Applying the logarithm power rule brings the exponent out front as y · ln(b) = ln(x), and dividing by ln(b) (valid whenever b > 0 and b ≠ 1) produces the change-of-base formula: logb(x) = ln(x) / ln(b). This calculator computes both ln(x) and ln(b) to 8 decimal places, evaluates their quotient, and verifies the result by computing by.

Fundamental Logarithm Identities & Laws

Product Rule: log_b(x · y)

log_b(x · y) = log_b(x) + log_b(y). Multiplying arguments inside a logarithm converts into adding their individual logarithms.

Quotient Rule: log_b(x / y)

log_b(x / y) = log_b(x) − log_b(y). Dividing arguments inside a logarithm equals subtracting the denominator's log from the numerator's log.

Power Rule: log_b(x^k)

log_b(x^k) = k · log_b(x). Any exponent inside the argument moves outside as a scalar multiplier — essential for solving exponential growth equations.

Identity & Zero Properties

For any valid base b > 0 (b ≠ 1): log_b(1) = 0 because b⁰ = 1, log_b(b) = 1 because b¹ = b, and log_b(1/x) = −log_b(x).

Common Logarithm Bases & Cross-Disciplinary Applications

Different scientific disciplines standardize on specific logarithm bases depending on the underlying scale of measurement:

Binary Logarithm (log2): Fundamental to computer science and digital electronics. log2(N) determines the minimum number of bits required to encode N distinct states (⌈log2(256)⌉ = 8 bits) and expresses divide-and-conquer time complexity such as binary search and merge sort in the Big-O Complexity Calculator.

Common Logarithm (log10): Used whenever quantities span many orders of magnitude in base-10 scientific notation. In analytical chemistry, acidity is defined as pH = −log10[H+] (see the pH Calculator), while acoustics and signal processing measure power and amplitude ratios in decibels via LdB = 10 · log10(P / P0) (see the Decibel Calculator).

Natural Logarithm (ln = loge): Built on Euler's constant e ≈ 2.718281828, where the derivative d/dx ln(x) = 1/x. Natural logarithms govern continuous compounding time horizons (t = ln(A / P) / r), radioactive decay in the Half-Life Calculator, and symbolic integration in the Integral Calculator.

Authoritative Sources & Standards

  1. NIST Digital Library of Mathematical Functions (DLMF) — Elementary & Algebraic Functions — National Institute of Standards and Technology (NIST)
  2. Abramowitz and Stegun: Handbook of Mathematical Functions — National Bureau of Standards (NBS)

Frequently Asked Questions

What does log_b(x) mean?

log_b(x) answers the question: 'to what power must b be raised to get x?' For example, log₂(8) = 3 because 2³ = 8.

What is the change-of-base formula?

log_b(x) = ln(x) / ln(b) — it lets you compute a logarithm in any base using only natural log (or common log), which is what calculators and programming languages provide directly.

What's the difference between log and ln?

'log' (without a subscript) usually means base-10 (common) logarithm, while 'ln' specifically means the natural logarithm, base e (≈2.71828).

Why can't the base be 1?

1 raised to any power always equals 1, so log base 1 could never produce any value other than 1 — the function is undefined for base 1.

Why must the value be positive?

No real power of a positive base ever produces zero or a negative number, so logarithms of zero or negative numbers are undefined in the real number system.

What is e, and why is it used?

e (≈2.71828) is a fundamental mathematical constant that appears naturally in growth, decay, and calculus. The natural logarithm (base e) is the standard logarithm used throughout higher mathematics.

How do I verify a logarithm result?

Raise the base to the power of the computed result — it should equal your original value. The calculator shows this check automatically.

Can the base be a fraction?

Yes, any positive base other than 1 works, including fractions like 0.5 — the change-of-base formula handles it the same way.

Where are logarithms used?

Logarithms appear in pH calculations, decibel scales, the Richter scale, compound interest and growth models, computer science (binary logs), and solving exponential equations.

Embed Logarithm Calculator

Copy and paste this HTML snippet to embed this interactive calculator on your website or blog:

Discover more tools

Surprise me