Logarithm Calculator

Free online Logarithm Calculator — compute log base b, common log (log10), and natural log (ln) instantly with the change-of-base formula.

981.5K usesUpdated · 2026-04-28Runs locally · zero upload

How to Use Logarithm Calculator

The Logarithm Calculator makes it easy to evaluate any logarithmic expression right in your browser.

  1. Choose a mode — Select Custom Base to enter any base b, or switch to log₁₀(x) for the common logarithm, or ln(x) for the natural logarithm.
  2. Enter the argument (x) — Type the number whose logarithm you want. The Logarithm Calculator requires x to be greater than 0.
  3. Enter the base (b) — In custom-base mode, provide the base. b must be greater than 0 and not equal to 1.
  4. Set decimal precision — Choose how many decimal places the Logarithm Calculator should display (0–10).

The Logarithm Calculator updates the result instantly and displays the change-of-base formula used, helping you verify each step.

Formula & Theory — Logarithm Calculator

The Logarithm Calculator is built on the fundamental definition of a logarithm:

log_b(x) = y  ⟺  b^y = x
Symbol Meaning
x Argument — the number being evaluated (x > 0)
b Base of the logarithm (b > 0, b ≠ 1)
y Result — the exponent

Two special cases supported by the Logarithm Calculator:

  • Common logarithm: log₁₀(x) — base 10, widely used in science and engineering.
  • Natural logarithm: ln(x) = log_e(x) — base e ≈ 2.71828, fundamental in calculus and continuous growth models.

Change-of-Base Formula

The Logarithm Calculator applies the change-of-base formula to handle any base:

log_b(x) = ln(x) / ln(b)

This identity lets the calculator reduce every logarithm to natural logs, which are natively supported by JavaScript's Math.log() function.

Use Cases for Logarithm Calculator

The Logarithm Calculator serves a wide range of academic and professional scenarios:

  • Mathematics education — Quickly check logarithm homework answers, explore base-10 and base-2 logarithms, and visualize the change-of-base relationship using the Logarithm Calculator.
  • Science and engineering — pH calculations (pH = −log₁₀[H⁺]), decibel levels (dB = 10·log₁₀(P₂/P₁)), and Richter scale magnitudes all rely on the common logarithm.
  • Computer science — Algorithm complexity analysis (e.g., O(log₂ n)) uses base-2 logarithms; the Logarithm Calculator handles base 2 natively through custom-base mode.
  • Finance — Compound growth problems often use the natural logarithm to solve for time: t = ln(A/P) / (r).
  • Signal processing — Gain, attenuation, and signal-to-noise ratios are expressed in decibels using log₁₀.

The Logarithm Calculator is an essential companion for anyone working with exponential relationships in mathematics, science, or engineering.

Frequently asked questions about Logarithm Calculator

What is a logarithm?

A logarithm answers the question: to what power must the base b be raised to produce x? The Logarithm Calculator solves this for any valid base and argument.

What are the input restrictions for the Logarithm Calculator?

The argument x must be greater than 0. The base b must be greater than 0 and cannot equal 1. Entering values outside these ranges produces no result.

What is the change-of-base formula?

log_b(x) = ln(x) / ln(b). The Logarithm Calculator uses this formula internally to compute any logarithm using the natural log function.

Is my data stored?

No. All calculations happen in your browser; nothing is sent to a server.