Algebra • Logarithms, Exponents & Base Conversion

Logarithm Calculator

Evaluate natural logarithms (ln), common base-10 logs, binary base-2 logs, or custom bases, solve for unknown arguments or bases, apply change-of-base identities, and plot curves interactively.

|
Last Updated: November 2026
|
Verified Accurate: Multi-Base & Inverse Solver
Quick Values:

Logarithm Inputs

b > 0, b != 1
Result
5
2^5 = 32
Scientific Decomposition
Char k = 2
Mantissa = 0.397940

Logarithm & Reference Curve Plot

Plots y = log_b(x) alongside natural log ln(x) and highlights your evaluated coordinate

Step-by-Step Algebraic Derivation

    Direct Answer & Overview
    Verified Educational Guide

    How to Calculate Logarithms

    A logarithm computes the exponent y needed to raise a positive base b (b != 1) to reach argument x: log_b(x) = y if and only if b^y = x. Using the Change-of-Base Theorem, any base evaluates as log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b).

    Primary Mathematical Formula Logarithmic Inverse & Change-of-Base Rule
    Standard Equation
    ƒ(x)
    Q.E.D.
    log⁡b(x)=y  ⟺  by=x,log⁡b(x)=ln⁡(x)ln⁡(b)\log_b(x) = y \iff b^y = x, \qquad \log_b(x) = \frac{\ln(x)}{\ln(b)}
    Evaluates ln(x), log₁₀(x), log₂(x), and arbitrary positive bases simultaneously
    Exact Formula
    Input Parameters
    Required
    1
    Base b — Positive scalar base (b > 0, b != 1), with shortcuts for 10, e, and 2
    2
    Argument x or Exponent y — Positive argument x > 0 (forward mode) or exponent y (inverse mode)
    Expected Outputs
    Calculated
    Exact Fraction & Decimal — Logarithm output with exact rational exponents when x = b^(p/q)
    Cross-Base Comparison — Instant log₁₀(x), ln(x), log₂(x) readouts plus live curve plot
    Worked Numerical Example
    Instant Verification
    Evaluate log₂(64) and verify exponentiation.
    → Express 64 as a power of 2: 2⁶ = 64, or compute ln(64) / ln(2) = 4.158883 / 0.693147.
    Result: log₂(64) = 6 | log₁₀(64) ≈ 1.806180, ln(64) ≈ 4.158883

    Fundamental Definition and Exponential Equivalence

    In algebra, calculus, and information science, a logarithm answers an inverse question about repeated multiplication: given a fixed positive growth factor bb and an observed outcome x>0x > 0, what exponent yy maps bb onto xx? Formally, logarithmic notation and exponential notation express the exact same numerical truth in opposite directions:

    log⁡b(x)=y⟺by=x(b>0,  b≠1,  x>0)\log_b(x) = y \quad \Longleftrightarrow \quad b^y = x \qquad (b > 0,\; b \neq 1,\; x > 0)

    Base Restriction (b > 0, b != 1)

    Allowing b=1b = 1 collapses every power 1y=11^y = 1 into a constant function that cannot invert other numbers. Negative bases jump inconsistently between real and complex outputs at fractional exponents, while zero bases collapse at 0y=00^y = 0. Real-valued calculators therefore restrict bb strictly to positive values excluding 11.

    Positive Argument Domain (x > 0)

    Raising any positive base b>0b > 0 to any real exponent y∈(−∞,∞)y \in (-\infty, \infty) always produces a strictly positive value. If you ever need to evaluate logarithms of negative numbers or points on the complex plane, use our specialized complex logarithm calculator.

    Natural (ln), Common (log₁₀), and Binary (log₂) Systems

    While logarithms exist for infinitely many bases, three canonical bases anchor modern science, engineering, and computing:

    Natural Log: ln(x)

    Base e ≈ 2.71828183

    Chosen in calculus because ddxln⁡(x)=1x\frac{d}{dx}\ln(x) = \frac{1}{x} carries no extra constant factor. Essential for continuous compounding, radioactive decay, entropy, and statistical data transformation.

    Common Log: log₁₀(x)

    Base 10

    Matches decimal powers of ten directly, indexing scientific notation, pH acidity, acoustic decibels, and astronomical magnitudes. Explore dedicated tools for base-10 logarithms and base-10 antilogs.

    Binary Log: log₂(x)

    Base 2

    Measures doubling steps, Shannon information bits, balanced binary tree height, and divide-and-conquer sorting bounds such as O(nlog⁡2n)O(n \log_2 n).

    Algebraic Logarithm Laws and Simplification

    Because logarithms reverse exponent arithmetic, every law of exponents translates into a dual logarithmic simplification identity for all M,N>0M, N > 0:

    Product Rule

    log⁡b(M⋅N)=log⁡b(M)+log⁡b(N)\log_b(M \cdot N) = \log_b(M) + \log_b(N)

    Multiplication inside an argument decomposes into addition outside, available directly in our product rule calculator.

    Quotient Rule

    log⁡b ⁣(MN)=log⁡b(M)−log⁡b(N)\log_b\!\left(\frac{M}{N}\right) = \log_b(M) - \log_b(N)

    Division inside a logarithm splits into subtraction of individual logs, explored in the quotient rule calculator.

    Power Rule

    log⁡b(Mp)=p⋅log⁡b(M)\log_b(M^p) = p \cdot \log_b(M)

    Pulls inner exponents or fractional roots out in front as linear coefficients—see our interactive logarithm power rule tool.

    Identity & Reciprocal Base Rules

    log⁡b(1)=0,log⁡b(b)=1,log⁡1/b(x)=−log⁡b(x)\log_b(1) = 0, \quad \log_b(b) = 1, \quad \log_{1/b}(x) = -\log_b(x)

    Every valid curve passes through (1,0)(1, 0) and (b,1)(b, 1), while inverting a base simply reflects the graph vertically across the x-axis.

    Change of Base Theorem and Proof

    Most handheld scientific calculators provide built-in keys solely for ln⁡\ln (base ee) and log⁡10\log_{10} (base 1010). The Change-of-Base Theorem lets us compute a logarithm in any arbitrary base bb by forming the quotient of two logarithms in any convenient reference base cc:

    log⁡b(x)=log⁡c(x)log⁡c(b)=ln⁡(x)ln⁡(b)=log⁡10(x)log⁡10(b)\log_b(x) = \frac{\log_c(x)}{\log_c(b)} = \frac{\ln(x)}{\ln(b)} = \frac{\log_{10}(x)}{\log_{10}(b)}

    Proof: Let y=log⁡b(x)y = \log_b(x), which translates exponentially to by=xb^y = x. Taking log⁡c\log_c of both sides produces log⁡c(by)=log⁡c(x)\log_c(b^y) = \log_c(x). Applying the power rule pulls down yy, yielding y⋅log⁡c(b)=log⁡c(x)y \cdot \log_c(b) = \log_c(x); dividing by log⁡c(b)≠0\log_c(b) \neq 0 establishes the formula. Explore dedicated base conversions in our change-of-base logarithm tool.

    Solving Exponential and Logarithmic Equations

    Whenever an unknown variable sits inside an exponent—for instance 5⋅23x−1=1205 \cdot 2^{3x - 1} = 120—divide first to isolate the exponential power (23x−1=242^{3x-1} = 24), then apply logarithms on both sides: 3x−1=log⁡2(24)≈4.584963x - 1 = \log_2(24) \approx 4.58496, giving x≈1.86165x \approx 1.86165. Conversely, when solving multi-term logarithmic equations, condense separate logs into one combined argument via Product/Quotient rules and rewrite exponentially via by=xb^y = x using our logarithmic equation solver and exponential equation solver.

    Scientific Scales, Signal Gain, and Algorithm Complexity

    Seismology (Richter Magnitude)

    Earthquake magnitude M=log⁡10(I/S)M = \log_{10}(I / S) compresses enormous ground wave amplitude differences into a 1–10 scale where each step increases wave height tenfold.

    Acoustics & Signal Decibels

    Sound pressure level Lp=20log⁡10(p/p0)L_p = 20\log_{10}(p / p_0) mirrors the non-linear Weber–Fechner response of human hearing across trillion-fold intensity spans.

    Computer Science Complexity

    Binary search, B-trees, and divide-and-conquer sorting run in O(log⁡n)O(\log n) or O(nlog⁡n)O(n \log n) time because each halving step shrinks remaining work exponentially.

    Step-by-Step Worked Numerical Solutions

    Example 1: Exact and Non-Integer Base-3 Logarithms

    Evaluate log⁡3(81)\log_3(81) and log⁡3(50)\log_3(50). Recognizing 34=813^4 = 81 yields log⁡3(81)=4\log_3(81) = 4 immediately. For 5050, divide natural logarithms: ln⁡(50)/ln⁡(3)≈3.912023/1.098612≈3.560877\ln(50) / \ln(3) \approx 3.912023 / 1.098612 \approx 3.560877. Checking in reverse verifies 33.560877≈50.0003^{3.560877} \approx 50.000.

    Example 2: Rational Exponent Reduction log₉(27)

    Notice both 9=329 = 3^2 and 27=3327 = 3^3 share base 33. Converting to base 3 gives log⁡9(27)=log⁡3(33)log⁡3(32)=32=1.5\log_9(27) = \frac{\log_3(3^3)}{\log_3(3^2)} = \frac{3}{2} = 1.5.

    Common Pitfalls and Domain Restrictions

    Splitting Additions Inside Logs

    log⁡b(M+N)\log_b(M + N) cannot be factored into log⁡b(M)+log⁡b(N)\log_b(M) + \log_b(N); the product rule applies exclusively to multiplication inside the argument.

    Non-Positive Argument Traps

    Real-valued logarithms require strictly positive inputs x>0x > 0. Always reject algebraic equation solutions that make any logarithmic argument zero or negative.

    Confusing Quotient of Logs

    log⁡b(M)/log⁡b(N)\log_b(M) / \log_b(N) equals the change-of-base log log⁡N(M)\log_N(M), whereas log⁡b(M/N)=log⁡b(M)−log⁡b(N)\log_b(M / N) = \log_b(M) - \log_b(N).

    Computational Accuracy and Graphing Methodology

    All logarithmic computations run locally in your browser using IEEE-754 double precision (ln⁡(x)/ln⁡(b)\ln(x) / \ln(b)) paired with rational fraction detection up to denominator 1,000, inverse exponential verification, scientific characteristic/mantissa extraction, and responsive high-DPI canvas plotting comparing log⁡b(x)\log_b(x) directly against the natural logarithm baseline.

    Fact-Checked & Verified • Computational Accuracy Standards
    Updated November 2026 • Editorial Policy
    Authored By
    Sanjay Samanta

    Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

    Reviewed & Verified By
    Academic Review Board

    Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

    Found an error or have an improvement suggestion? Report a calculation issue

    Frequently Asked Questions

    What is a logarithm and how does it work?
    A logarithm is the inverse mathematical operation of exponentiation. The equation log_b(x) = y asks: to what power must base b be raised to equal x? For example, log₂(8) = 3 because 2³ = 8, and log₁₀(1000) = 3 because 10³ = 1000.
    What is the difference between Natural Log (ln) and Common Log (log₁₀)?
    Common Logarithm (log or log₁₀) uses base 10, standard in engineering decibels, chemistry pH scales, and Richter magnitudes. Natural Logarithm (ln) uses Euler’s number e ≈ 2.71828183 as its base, serving as the native logarithm in calculus, continuous compounding, and differential physics.
    How does the Change of Base Formula work?
    The Change of Base formula converts logarithms of any arbitrary base into ratios of natural or common logs: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). For instance, log₂(10) = ln(10) / ln(2) ≈ 2.302585 / 0.693147 ≈ 3.321928.
    Why can’t you take the real logarithm of zero or a negative number?
    For any positive real base b > 0 (b != 1), raising b to any real exponent y always produces a strictly positive value (b^y > 0). Because no real power can produce zero or a negative number, real logarithms require x > 0; negative inputs require complex logarithms with imaginary phase angles.
    What are the four core logarithm properties?
    The fundamental algebraic rules are: (1) Product Rule: log_b(M·N) = log_b(M) + log_b(N); (2) Quotient Rule: log_b(M/N) = log_b(M) − log_b(N); (3) Power Rule: log_b(M^k) = k · log_b(M); and (4) Identity rules: log_b(1) = 0 and log_b(b) = 1.
    How do I calculate log base 2 for computer science algorithms?
    Enter 2 as the base (or click the quick chip 2) and enter the problem size N. For example, binary search over 1,048,576 sorted entries requires at most log₂(1,048,576) = 20 comparisons.
    How are logarithms used in earthquake magnitude and sound decibels?
    Both scales apply base-10 ratios so vast physical energy spans remain compact. Adding +1 on the moment-magnitude scale marks a 10x larger seismic wave amplitude, while +10 dB represents a 10x acoustic power increase.
    How do you solve an exponential equation using logarithms?
    Isolate the exponential term b^(f(x)) = C, take the logarithm of both sides to pull the exponent down via the Power Rule (f(x) · ln(b) = ln(C)), and solve algebraically for x.