Logarithm Calculator — Any Base, ln and log₁₀

Compute log_b(x) for positive x and valid bases, plus ln(x) and log₁₀(x). Change-of-base formula explained with examples.

Inputs

Where this formula comes from

log_b(x) is the exponent you put on b to obtain x. The change-of-base formula log_b(x) = ln(x)/ln(b) lets one natural-log implementation serve every valid base.

Domain restrictions matter: x must be positive; base b must be positive and not 1. Those reject paths match real-valued logarithms taught in algebra.

Common (log₁₀) and natural (ln) logs are reported alongside a custom base so you can cross-check calculator-class results.

Common mistakes

How to use this calculator

Enter a positive x and a valid base b (positive, not 1), or use the dedicated ln / log₁₀ readouts. The engine relies on change of base: log_b(x) = ln(x)/ln(b).

Domain errors are the main student failure mode: log of zero or a negative is undefined in the reals, and base 1 is invalid. The calculator rejects those cases rather than inventing a complex value.

Cross-check with known powers: log₁₀(1000) = 3, ln(e) = 1, log₂(8) = 3. If a custom base disagrees with the ln ratio within rounding, re-enter the inputs before trusting a long calculation chain.

Logarithms turn multiplication into addition, which is why they appear in pH, decibels, and compound growth inverses. This page computes the log value itself; specialized scales may add offsets or factors on top.

Change-of-base works for any valid bases, so log₂(x) = ln(x)/ln(2) = log₁₀(x)/log₁₀(2). Prefer one implementation path to avoid compounding float noise from nested conversions.

In chemistry, pH = −log₁₀[H⁺] adds a minus sign and a concentration definition on top of log₁₀. This calculator returns raw logs; apply domain-specific offsets yourself.

Solving a^x = b for x uses x = log(b)/log(a) with matching bases. After you compute x, exponentiate to verify a^x returns b within rounding. That round-trip catch is the fastest way to spot a base typed as 0 or a negative b.

Log scales on charts compress multiplicative growth into additive vertical distance. Reading a log-axis chart still benefits from knowing log₁₀ vs ln; the calculator helps translate a displayed log value back to a linear magnitude when the axis base is known.

Information theory uses log₂ for bits. Converting ln to log₂ is a constant factor (divide by ln 2). Keep the base explicit whenever you quote an entropy-style number from a general log tool.

Slide-rule era intuition still helps: logs turn multiplication into addition of log values. When checking a long product, sum ln terms and exponentiate once instead of multiplying many floats in sequence.

Frequently asked questions

What is a logarithm?
log_b(x) is the exponent you put on b to get x. Example: log₁₀(1000) = 3 because 10³ = 1000.
Which bases are supported?
Any positive base except 1. The page also reports natural log (ln) and common log (log₁₀).
Why must x be positive?
Real-valued logs are undefined for zero or negative x.
How is change-of-base applied?
log_b(x) = ln(x) / ln(b). That identity powers the calculator.