Algebra • Arbitrary-Base Logarithms & Exponents

Logarithm Calculator

Evaluate logarithms for any base (10, e, 2, fractional, or custom), solve for an unknown argument x or base b, inspect exact rational exponents, and visualize logarithmic curves dynamically.

|
Last Updated: November 2026
|
Verified Accurate: Change-of-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

    Universal Logarithm Definition and Base Conversion

    A logarithm log_b(x) returns the exponent y such that base b raised to y equals x (b^y = x). For any valid positive base b != 1 and positive argument x, the Change-of-Base formula log_b(x) = ln(x) / ln(b) converts every arbitrary base into standard natural or common logarithms.

    Primary Mathematical Formula Exponential Inverse & Change-of-Base Theorem
    Standard Equation
    ƒ(x)
    Q.E.D.
    y=log⁡b(x)  ⟺  by=x,log⁡b(x)=ln⁡(x)ln⁡(b)=log⁡10(x)log⁡10(b)y = \log_b(x) \iff b^y = x, \qquad \log_b(x) = \frac{\ln(x)}{\ln(b)} = \frac{\log_{10}(x)}{\log_{10}(b)}
    Solves for exponent y, argument x = b^y, or unknown base b = x^(1/y)
    Exact Formula
    Input Parameters
    Required
    1
    Base b — Any positive constant (b != 1), including shortcuts for 10, e, and 2
    2
    Argument x or Exponent y — Positive number x > 0 to evaluate log_b(x), or real y to compute x = b^y
    Expected Outputs
    Calculated
    Solved Value & Exact Fraction — Decimal value plus simplified fraction whenever x and b share rational powers
    Cross-Base & Curve Graph — Side-by-side log₁₀(x), ln(x), log₂(x) readouts plus interactive graph
    Worked Numerical Example
    Instant Verification
    Evaluate log₈(4) using common base reduction.
    → Both 8 and 4 are powers of 2 (8 = 2³, 4 = 2²). By change of base: log₈(4) = log₂(4) / log₂(8) = 2 / 3.
    Result: log₈(4) = 2/3 ≈ 0.666667 | Check: 8^(2/3) = (∛8)² = 4

    Logarithmic and Exponential Equivalence

    Understanding logarithms starts with one bidirectional translation rule linking exponential growth to logarithmic scaling. For any real base b>0b > 0 (b≠1b \neq 1) and positive argument x>0x > 0:

    log⁡b(x)=y⟺by=x\log_b(x) = y \quad \Longleftrightarrow \quad b^y = x

    From this single equivalence follow the two cancellation identities: blog⁡b(x)=xb^{\log_b(x)} = x and log⁡b(by)=y\log_b(b^y) = y. Whenever you need to isolate an exponent trapped inside an algebraic equation, taking log⁡b\log_b on both sides brings the variable down into a linear coefficient—explore multi-step symbolic cases inside our exponential equation solver and logarithmic equation solver.

    Change-of-Base Theorem and Exact Rational Powers

    Starting from by=xb^y = x and applying log⁡c\log_c to both sides gives ylog⁡c(b)=log⁡c(x)y \log_c(b) = \log_c(x) by the power rule, yielding the universal change-of-base formula:

    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)}

    A neat corollary is the reciprocal base-swap identity log⁡b(a)=1/log⁡a(b)\log_b(a) = 1 / \log_a(b). Moreover, whenever b=rpb = r^p and x=rqx = r^q share a common root rr, the logarithm simplifies cleanly to the exact fraction q/pq / p, which our calculator displays automatically alongside the decimal expansion.

    Comparing Common (Base 10), Natural (Base e), and Binary (Base 2) Logs

    Logarithm Name Notation & Base Derivative Primary Domains
    Common Logarithm log₁₀(x), b = 10 1 / (x ln 10) pH chemistry, dB acoustics, scientific scales
    Natural Logarithm ln(x), b = e ≈ 2.71828 1 / x Calculus, continuous growth, statistical regression
    Binary Logarithm log₂(x), b = 2 1 / (x ln 2) Information bits, tree depth, O(n log n) sorting

    Fundamental Algebraic Identities and Solving Equations

    Product & Quotient Rules

    log⁡b(xy)=log⁡b(x)+log⁡b(y)\log_b(xy) = \log_b(x) + \log_b(y) and log⁡b(x/y)=log⁡b(x)−log⁡b(y)\log_b(x/y) = \log_b(x) - \log_b(y) for all positive x,yx, y.

    Power & Root Rule

    log⁡b(xp)=p log⁡b(x)\log_b(x^p) = p\,\log_b(x) and log⁡b(xn)=1nlog⁡b(x)\log_b(\sqrt[n]{x}) = \frac{1}{n}\log_b(x).

    Base Scaling Identity

    Raising the base to power kk divides the logarithm by kk: log⁡bk(x)=1klog⁡b(x)\log_{b^k}(x) = \frac{1}{k}\log_b(x).

    Monotonicity & One-to-One Rule

    Because log⁡b(x)\log_b(x) is strictly monotonic on (0,∞)(0, \infty), log⁡b(u)=log⁡b(v)  ⟺  u=v\log_b(u) = \log_b(v) \iff u = v.

    Step-by-Step Worked Examples for Any Base

    Example 1: Binary Logarithm log₂(32)

    Express 32=2532 = 2^5. Therefore log⁡2(32)=log⁡2(25)=5\log_2(32) = \log_2(2^5) = 5. By change of base, ln⁡(32)/ln⁡(2)=3.465736/0.693147=5\ln(32) / \ln(2) = 3.465736 / 0.693147 = 5. In computer science and information theory, a binary logarithm of 5 directly tells us that 32 distinct states require 5 bits to encode uniquely, and binary search over 32 sorted items completes in at most 5 comparisons.

    Example 2: Solving for an Unknown Base b

    Solve log⁡b(27)=1.5\log_b(27) = 1.5. Rewriting exponentially gives b3/2=27b^{3/2} = 27, so raising both sides to the reciprocal exponent gives b=272/3=(273)2=32=9b = 27^{2/3} = (\sqrt[3]{27})^2 = 3^2 = 9. Checking in reverse confirms 91.5=9×9=9×3=279^{1.5} = 9 \times \sqrt{9} = 9 \times 3 = 27 exactly.

    Example 3: Fractional Base Decay & Non-Integer Arguments

    Evaluate log⁡0.5(0.0625)\log_{0.5}(0.0625). Because 0.0625=1/16=(1/2)40.0625 = 1/16 = (1/2)^4, the value equals 44. Notice that whenever the base satisfies 0<b<10 < b < 1 and the argument satisfies 0<x<10 < x < 1, the logarithm produces a positive result; conversely, when x>1x > 1 with a fractional base such as log⁡0.5(8)\log_{0.5}(8), the logarithm is negative (−3-3), reflecting inverse decreasing monotonicity.

    Example 4: Computing Doubling Time with Natural & Arbitrary Logs

    Suppose an investment or bacterial culture grows by 15% each period (1.15t=21.15^t = 2). Solving for time tt means computing log⁡1.15(2)=ln⁡(2)/ln⁡(1.15)≈0.693147/0.139762≈4.9595\log_{1.15}(2) = \ln(2) / \ln(1.15) \approx 0.693147 / 0.139762 \approx 4.9595 periods. Arbitrary-base logarithms turn compound growth questions across finance, epidemiology, and physics directly into single-step arithmetic ratios.

    Common Mistakes and Domain Restrictions

    • Forgetting extraneous solutions: Combining log⁡b(x)+log⁡b(x−3)\log_b(x) + \log_b(x - 3) can introduce algebraic roots where x−3≤0x - 3 \le 0; always substitute final answers back into every original logarithmic term before accepting them.
    • Misreading fractional arguments: When 0<x<10 < x < 1 and b>1b > 1, the logarithm is strictly negative (for example, log⁡2(1/8)=−3\log_2(1/8) = -3), approaching negative infinity as xx approaches zero.
    • Conflating log(x)/log(y) with log(x/y): A quotient of two separate logarithms is a change of base (log⁡y(x)\log_y(x)), never the logarithm of a quotient (log⁡(x)−log⁡(y)\log(x) - \log(y)).
    • Assuming base-1 logarithms exist: Entering b=1b = 1 produces division by ln⁡(1)=0\ln(1) = 0, because raising 1 to any finite power can only ever produce 1 and cannot span positive real numbers.

    Computational Engine and Interactive Graphing

    This solver evaluates arbitrary bases via natural-log ratios ln⁡(x)/ln⁡(b)\ln(x) / \ln(b) with rational denominator search up to 10001000 to detect exact fractional exponents alongside 8-digit decimals, computes characteristic/mantissa splits, and plots y=log⁡b(x)y = \log_b(x) over a responsive high-DPI canvas compared against ln⁡(x)\ln(x).

    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 in algebra?
    A logarithm is the inverse function of exponentiation. Writing y = log_b(x) means that raising base b to the exponent y produces the argument x (b^y = x), where base b > 0, b != 1, and argument x > 0.
    How do you calculate log with any base b?
    Apply the Change-of-Base Theorem: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). Because natural and common logarithms differ only by a constant ratio, any base reduces cleanly to two standard log evaluations.
    How do you solve for the unknown base b in log_b(x) = y?
    Convert log_b(x) = y into its exponential form b^y = x, then raise both sides to the reciprocal power 1/y: b = x^(1/y). For example, if log_b(81) = 4, then b = 81^(1/4) = 3. Use our Find Base b tab above to compute this automatically.
    Why cannot logarithm base b equal 1 or be zero or negative?
    If b = 1, 1^y equals 1 for every exponent y, so log₁(x) would have no solution when x != 1 and infinitely many answers at x = 1. If b = 0, powers 0^y are 0 or undefined. Negative bases oscillate between positive, negative, and complex values for fractional exponents, violating real-valued continuity.
    What are the three most important logarithm bases?
    The three standard bases across STEM are base 10 (common logarithm, used in chemistry pH, decibels, and scientific notation), base e ≈ 2.71828183 (natural logarithm ln(x), used in calculus, continuous compounding, and differential equations), and base 2 (binary logarithm log₂(x), used in computer science algorithm complexity and information entropy).
    What happens when the logarithm base b lies between 0 and 1?
    When 0 < b < 1 (for example, b = 1/2), log_b(x) is strictly decreasing rather than increasing: log_{1/2}(8) = -3 because (1/2)^(-3) = 8, and log_{1/2}(0.25) = 2.
    What is the value of log_b(1) for any valid base b?
    For every valid base b > 0 with b != 1, log_b(1) = 0 identically, because b⁰ = 1 universally.
    How do logarithm rules simplify complicated products and powers?
    Logarithms convert multiplication into addition (log_b(MN) = log_b(M) + log_b(N)), division into subtraction (log_b(M/N) = log_b(M) − log_b(N)), and exponents into linear coefficients (log_b(M^k) = k · log_b(M)).