Logarithm Calculator

Mathematics

Calculate natural and common logarithms

A logarithm answers a simple question: to what power must a base be raised to produce a given number? If 10³ = 1000, then log₁₀(1000) = 3. Logarithms are the inverse operation of exponentiation, and they are essential wherever quantities grow or shrink multiplicatively rather than additively — earthquake magnitude on the Richter scale, sound intensity in decibels, pH in chemistry, and compound interest and population growth in finance and biology all rely on logarithmic math.

The three logarithms used most often are the common logarithm (base 10, written log or log₁₀), the natural logarithm (base e ≈ 2.71828, written ln), and binary logarithm (base 2, common in computer science). Calculating these by hand requires either memorized values, log tables, or a scientific calculator, and converting between bases adds another layer of complexity using the change-of-base formula.

Our logarithm calculator computes any logarithm instantly — common, natural, binary, or a custom base of your choosing. Enter the number and the base, and the tool returns the precise decimal value along with the calculation shown, so you can verify your homework, check a chemistry pH calculation, or convert between logarithmic scales without digging out a table or memorizing log rules.

Because logarithms are the inverse of exponents, understanding one deepens your understanding of the other. Students moving from exponential equations into logarithmic ones often struggle with the notation shift, so seeing an instant, correctly computed answer alongside the base and argument helps reinforce which quantity plays which role in the calculation.

Why Logarithm Calculator Matters

Logarithms compress enormous ranges of numbers into manageable scales, which is why scientists, engineers, and analysts rely on them constantly:

Science and chemistry: pH is defined as -log₁₀ of hydrogen ion concentration. The Richter scale for earthquakes and the decibel scale for sound are both logarithmic — each whole-number increase represents a tenfold (or greater) increase in intensity.

Computer science: Binary logarithms (log base 2) describe the time complexity of algorithms like binary search, and they determine how many bits are needed to represent a given number of values.

Finance: Solving for the number of years it takes an investment to reach a target value, or converting continuous growth rates, requires taking the natural logarithm of a ratio.

Academics: Logarithms are a core Algebra II and Precalculus topic, appear on the SAT and ACT, and are foundational for calculus, where the derivative and integral of ln(x) are used constantly.

Audio and signal engineering: Human perception of loudness and pitch is roughly logarithmic, which is why audio engineers use decibels and musicians use logarithmic frequency ratios to describe octaves and intervals.

The Logarithm Calculator Formula, Explained

log_b(x) = y ⇔ b^y = x

Where b is the base, x is the number you are taking the logarithm of (the argument), and y is the resulting logarithm — the exponent that b must be raised to in order to equal x. The base must be positive and not equal to 1, and x must be positive (logarithms of zero or negative numbers are undefined for real numbers).

To compute a logarithm in a base your calculator doesn't have a direct button for, use the change-of-base formula: log_b(x) = ln(x) / ln(b), or equivalently log_b(x) = log₁₀(x) / log₁₀(b). This lets you compute any base using only the natural log or common log functions available on standard calculators.

Key logarithm rules: log_b(mn) = log_b(m) + log_b(n) (product rule), log_b(m/n) = log_b(m) - log_b(n) (quotient rule), and log_b(m^k) = k × log_b(m) (power rule). These rules let you break complex expressions into simpler logarithmic terms.

How to Use the Logarithm Calculator: Step by Step

  1. Choose your logarithm type

    Select common log (base 10), natural log (base e), binary log (base 2), or enter a custom base.

  2. Enter the number (argument)

    Input the positive number x you want the logarithm of. Zero and negative numbers are not valid for real-number logarithms.

  3. Enter the base (if custom)

    If using a custom base, enter it as a positive number not equal to 1.

  4. Calculate

    The calculator applies the change-of-base formula internally and returns the precise decimal result.

  5. Verify with the inverse

    Check your answer by raising the base to the resulting power — it should equal your original number x.

Logarithm Calculator Examples: Real-World Scenarios

1

Common Logarithm — pH Calculation

A chemistry student measures a hydrogen ion concentration of 1 × 10⁻³ mol/L and needs to find the solution's pH, defined as -log₁₀[H⁺].

Number (x):0.001 (1 × 10⁻³)
Base (b):10

Calculation

log₁₀(0.001) = log₁₀(10⁻³) = -3. pH = -(-3) = 3

Result

log₁₀(0.001) = -3, so the solution has a pH of 3, indicating a fairly acidic solution.

2

Natural Logarithm — Continuous Growth Time

An analyst wants to know ln(e²) as part of solving for the time it takes an investment growing continuously to double under the formula A = Pe^(rt).

Number (x):e² ≈ 7.389
Base:e (natural log)

Calculation

ln(e²) = 2 × ln(e) = 2 × 1 = 2

Result

ln(e²) = 2 exactly, demonstrating that the natural log undoes the exponential base e.

3

Binary Logarithm — Computer Science

A computer science student needs to know how many times a sorted list of 8 items can be split in half for a binary search, which equals log₂(8).

Number (x):8
Base (b):2

Calculation

log₂(8) = log₂(2³) = 3, since 2³ = 8

Result

log₂(8) = 3, meaning binary search on 8 items takes at most 3 comparisons.

Common Mistakes to Avoid

  • Trying to take the logarithm of zero or a negative number — both are undefined for real-valued logarithms because no real exponent produces a non-positive result from a positive base.
  • Confusing log (common log, base 10) with ln (natural log, base e) — many textbooks and calculators default to different bases, and mixing them up changes the answer significantly.
  • Forgetting the change-of-base formula when a calculator lacks a direct button for the needed base, leading to guessing instead of computing.
  • Misapplying the log rules, such as assuming log_b(m + n) = log_b(m) + log_b(n) — the product rule only applies to multiplication, not addition.
  • Rounding intermediate results too early, which compounds error in multi-step logarithmic calculations.

Tips & Tricks

  • Remember log₁₀(10) = 1, ln(e) = 1, and log_b(1) = 0 for any valid base — these quick checks help you sanity-test your calculator results.
  • For decibels, use the formula dB = 10 × log₁₀(P/P₀); for the Richter scale, magnitude = log₁₀(amplitude ratio) — both use common logs, not natural logs.
  • If a value is between two powers of the base (e.g., log₁₀(500) is between log₁₀(100)=2 and log₁₀(1000)=3), you can quickly estimate the answer is between 2 and 3 before calculating exactly.
  • In calculus, always use natural log (ln) unless a problem specifically states another base — it's the default in derivative and integral formulas.

Logarithms turn multiplicative and exponential relationships into simple, additive ones, which is why they underlie so many scientific scales and formulas. This calculator handles common, natural, binary, and custom-base logarithms instantly and accurately, saving you from log tables or manual change-of-base arithmetic. Whether you're solving a pH problem, evaluating algorithm complexity, or working through a precalculus assignment, enter your number and base to get a precise, verifiable result. Keep this tool handy any time a problem asks you to solve for an unknown exponent, since rewriting the equation in logarithmic form is usually the fastest path to the answer.

Logarithm Calculator — Frequently Asked Questions

Related Calculators

Authoritative References

External links open in a new tab. OmniCalc.us is not affiliated with these organisations.

Related Calculators