Log Calculator (Logarithm Calculator)

Solve log_b(x) = y for the base, argument, or exponent with change-of-base steps.

Solve log_b ( x ) = y

Fill any two of b, x, and y — leave the third blank. Accepts integers, decimals, fractions like 3/4, scientific notation, and the constants e and π.

Common, natural, and binary logs — quick reference

The three most-used bases side-by-side. Tap any row to load that value into the calculator with the corresponding base preset.

xlog₁₀(x)ln(x)log₂(x)
1
2
3
4
5
8
10
16
32
64
100
1000

Logarithm rules at a glance

Product rule

log_b(mn) = log_b(m) + log_b(n)

log₂(8·4) = log₂8 + log₂4 = 3 + 2 = 5

Quotient rule

log_b(m/n) = log_b(m) − log_b(n)

log₁₀(1000/10) = 3 − 1 = 2

Power rule

log_b(mᵏ) = k · log_b(m)

log₂(2¹⁰) = 10 · log₂2 = 10

Change of base

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

log₃ 81 = ln 81 / ln 3 = 4

Inverse identity

log_b(bˣ) = x and b^(log_b x) = x

log₅(5⁷) = 7, 2^(log₂ 50) = 50

Reciprocal base

log_(1/b)(x) = −log_b(x)

log_(1/2)(8) = −log₂ 8 = −3

log_b(1) = 0

Anything to the zero power is 1.

log₇ 1 = 0, log₁₀ 1 = 0, ln 1 = 0

log_b(b) = 1

A base to the first power is itself.

log₅ 5 = 1, ln e = 1, log₁₀ 10 = 1

Negative argument

log_b(x) undefined for x ≤ 0

log₁₀(−5) is not a real number.

Base must be > 0, ≠ 1

Logs need a valid base.

log₁(x) and log₀(x) are undefined.

Shape of y = log2(x)

Press Calculate to mark your point and read the property breakdown. The curve below previews the function for the base you've typed.

x = 0 (asymptote)0.00010.0010.010.11-14-13-12-11-10-9-8-7-6-5-4-3-2-11234

Domain

x > 0

Logs are undefined for x ≤ 0

Range

Every real y is hit exactly once

Passes through

(1, 0)

For every valid base b

The three solving directions

Solve for y

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

Know the base and the argument. Apply the change-of-base formula and divide two natural logs.

Solve for x

x = bʸ

Know the base and the exponent. Convert to exponential form and raise b to the y-th power.

Solve for b

b = x^(1/y) = ʸ√x

Know the argument and the exponent. Take the y-th root of the argument.

What Is A Log Calculator?

A log calculator solves the equation logb(x) = y for any one of its three variables. The base b sets the scale, the argument x is the number whose logarithm we want, and the result y is the exponent that would lift b to x. Fill any two fields and the calculator returns the third — by change-of-base, by raising to a power, or by taking a root.

This tool supports common logs (base 10), natural logs (base e), binary logs (base 2), and any positive base other than 1. Inputs accept integers, decimals, fractions like 3/4, scientific notation such as 1.5e3, and the constants e and π. It pairs naturally with the exponent calculator, root calculator, and the scientific calculator.

How Logarithms Work

A logarithm asks: what is the exponent?

Writing log₂(64) = 6 is the question "how many times do I multiply 2 by itself to reach 64?" The answer 6 is the exponent that satisfies 2⁶ = 64. Every log statement is a rephrased exponent statement — same fact, different sentence.

Logarithmic and exponential forms are equivalent

The definition log_b(x) = y ⇔ bʸ = x is the single most important identity in the topic. Either form can be rewritten as the other, and that switch is the secret to nearly every log problem you will meet.

Three solving directions, one equation

Knowing any two of {base, argument, exponent} fixes the third. Direct evaluation through change of base recovers y, raising to a power recovers x, and taking a root recovers b. The calculator picks the right operation based on which field is empty.

Domain is x > 0, range is all real numbers

Logarithms are only defined for positive arguments — there is no real number you can raise a positive base to and get a non-positive answer. The output y, however, can be any real number, positive or negative, integer or irrational.

6 Ways To Use This Log Calculator

1

Evaluate logs in any base

Drop the base and the argument into the form to read log_b(x) instantly. Common log (base 10), natural log (base e), and binary log (base 2) are one click away — and any positive base other than 1 is supported.

2

Solve for the argument

Know the base and the exponent? Leave the argument blank. The calculator converts to exponential form and computes x = b^y, then verifies by taking the log back.

3

Recover an unknown base

Know the argument and the exponent? Leave the base blank. The calculator takes the y-th root of x — that is, the inverse operation of raising to the y-th power.

4

Practice change of base

Every step shows log_b(x) = ln(x)/ln(b) substituted in full so the formula sticks. Use it to convert log₃ 81 into natural logs and check by hand on a scientific calculator.

5

Cross-check exponent homework

Solve y = bˣ with the exponent calculator, then plug the same values into this log calculator — the inverse relationship is the easiest way to catch a sign error or a misplaced decimal.

6

Visualise the curve

The interactive graph plots y = log_b(x) for the base you typed, marks your solved point, and shows the vertical asymptote at x = 0. Zoom in by changing the argument to see decimal exponents on screen.

Best Practices For Working With Logs

Identify the unknown before you solve. The three cases — missing exponent, missing argument, missing base — call for completely different operations (change-of-base, power evaluation, and a root). Mixing them is the most common source of textbook mistakes with logarithms.

When solving for the exponent, prefer the natural log for the change-of-base formula: y = ln(x) / ln(b). Every scientific calculator and programming-language standard library ships with ln, so the identity is the most portable. Common log (log₁₀) is equally valid; the choice does not change the final answer, only the intermediate numbers.

Always read the verification line. Logarithm-and-exponent are inverse operations, so plugging the answer back in must reproduce the input. The calculator prints both forms — log_b(x) = y and b^y = x — so you can confirm the round trip with a glance.

Why Logarithms Matter

Earthquake & sound scales

The Richter magnitude scale and the decibel are logarithmic — each whole-number step is a ten-fold change in amplitude (or for decibels, a tenfold change in intensity). That is the only way to plot a 10⁻⁶ pin drop and a 10⁹ jet engine on the same axis without losing detail.

Chemistry & pH

Acidity is measured as pH = −log₁₀[H⁺]. A pH of 4 has ten times more hydrogen ions than a pH of 5 and a hundred times more than pH 6. Logarithms turn ratios into differences — the same trick that built slide rules and decibel meters.

Finance & compound growth

Doubling time, internal rate of return, and continuous-compound interest all flip from y = bˣ to x = log_b y when the exponent is the unknown. The rule of 72 is an approximation of log₂(1 + r)⁻¹ in disguise.

Computer science

Binary search visits at most log₂ n elements of a sorted array. Comparison-based sorting requires Ω(n log n) operations. Shannon entropy uses log₂ to measure information in bits. Storage doubles every few years — and 2¹⁰ ≈ 10³ keeps the mental conversion easy.

Where Logarithm Problems Get Tricky

Negative or zero arguments

log_b(0) is −∞ as a limit, and log_b(x) of any x < 0 is not a real number. The calculator blocks both cases so you don't get a NaN sneaking through into the rest of your solution.

Base equal to 1, 0, or negative

Every power of 1 is 1, so log₁ has no unique inverse. Bases of 0 and negative numbers fail similar uniqueness tests — they would either collapse or step outside the real numbers. The calculator requires b > 0 and b ≠ 1.

Recovering a base when y = 0

log_b(x) = 0 forces x = 1 for every valid base. If you leave the base blank and set y = 0, no unique base exists — the calculator flags the ambiguity rather than guessing.

Floating-point drift

Computing log(81) / log(3) returns 3.99999… in raw JavaScript before the snap-to-integer correction. The calculator rounds answers within 1e-9 of an integer back to the integer, so log₃ 81 comes out as exactly 4.

The Core Logarithm Formulas

Definition

log_b(x) = y ⇔ bʸ = x

Logarithm and exponent are inverse statements.

Product rule

log_b(mn) = log_b m + log_b n

Multiplication becomes addition.

Quotient rule

log_b(m/n) = log_b m − log_b n

Division becomes subtraction.

Power rule

log_b(mᵏ) = k · log_b m

Exponents come out front.

Change of base

log_b(x) = ln x / ln b

Convert any base into natural logs.

Solve for y

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

Direct evaluation through change of base.

Solve for x

x = bʸ

Convert to exponential form and raise to y.

Solve for b

b = x^(1/y) = ʸ√x

Take the y-th root of the argument.

Identity bases

log_b(1) = 0, log_b(b) = 1

Anything to the 0 is 1; anything to the 1 is itself.

Power-of-base

log_b(bⁿ) = n

The logarithm and the exponent cancel out.

Natural log

ln(x) = log_e(x)

Logarithm with base e ≈ 2.71828.

Common log

log(x) = log₁₀(x)

Logarithm with base 10, the implicit base in chemistry/physics.

Common Logarithm Mistakes

  1. 1

    log(a + b) is not log a + log b

    The product rule applies to multiplication, not addition. log(2 + 3) = log 5 ≈ 0.699, but log 2 + log 3 ≈ 0.301 + 0.477 = 0.778. They are different numbers — keep the sum inside the log if the operation is +.

  2. 2

    log(a · b) ≠ log a · log b

    log(ab) splits into a sum (log a + log b), not a product. Treating the inside multiplication like the outside multiplication is the most-frequent slip on timed exams.

  3. 3

    Forgetting the change-of-base divisor

    log_b(x) = ln(x) / ln(b), not ln(x) · ln(b). The divisor is the natural log of the base, not a multiplier. A common variant: writing log(x) / log(b) without subscripts, which is fine only when both logs use the same base.

  4. 4

    Treating log(b^x) = x without the b

    log_b(b^x) = x only when the base of the log matches the base of the exponential. log₁₀(2^5) is not 5 — it is 5 · log₁₀ 2 ≈ 1.505. Watch the subscripts.

  5. 5

    Solving log(x) = k as x = k

    Read the subscript. log₁₀(x) = 3 means x = 10³ = 1000. log₂(x) = 3 means x = 2³ = 8. Always convert to exponential form before evaluating.

  6. 6

    Confusing log and ln

    On most calculator key caps, log means log₁₀ and ln means log_e. Pressing the wrong one off by a factor of 2.303 = 1 / log₁₀(e). Look at the calculator key labels before you press anything.

Real-Life Uses Of Logarithms

Earthquake magnitude

The Richter scale is M = log₁₀(A / A₀), where A is the recorded amplitude. A magnitude-7 quake releases ten times the ground motion of a magnitude-6, and roughly 31.6 times the energy. The compression is what makes the entire physical range fit on a single one-digit number.

Chemistry — pH

pH = −log₁₀[H⁺] converts hydrogen-ion concentrations between 10⁻¹⁴ and 10⁰ moles per litre into the familiar 0-to-14 scale. Negative logs keep the scale positive even though concentrations are tiny.

Acoustics — decibels

Sound pressure level in dB is 20 · log₁₀(p / p₀). The +20 dB step (six on top of pulses-from-fingertips) is a ten-fold amplitude jump and a hundred-fold intensity jump. The decibel only exists because the human ear is logarithmic.

Information theory

Claude Shannon used log₂ to define a bit. An event with probability p contributes −p · log₂ p to the entropy in bits. Compression algorithms, password-strength estimators, and Bayesian inference rest on the same identity.

Methodology you can verify

Every result is computed from the canonical IEEE-754 implementations of Math.log, Math.pow, and the change-of-base identity log_b(x) = ln(x) / ln(b). Recovered values within 1e-9 of an integer are snapped back, so log₃ 81 returns exactly 4 and log₂ 256 returns exactly 8. Every solved equation is verified by raising the base to the exponent — the final step on every calculation. Read more on the methodology and editorial policy pages.

Frequently Asked Questions

A logarithm is the exponent you need on a fixed base to reach a given number. log_b(x) = y means b raised to the y-th power equals x. Reading log₂(64) = 6 in plain English: "the exponent that lifts 2 up to 64 is 6," because 2⁶ = 64. Logarithms are the inverse of exponentials and are how mathematicians turn very wide multiplicative ranges (decibels, pH, Richter, stock returns) into a much narrower, more comparable additive scale.

On most scientific calculators the key labelled log denotes the common logarithm — the logarithm with base 10. The key labelled ln denotes the natural logarithm, with base e ≈ 2.71828. There is no separate key for arbitrary bases, which is why the change-of-base formula log_b(x) = ln(x) / ln(b) is so useful: it lets you evaluate any base through the two keys you already have.

ln(x) is the natural logarithm — the logarithm with base e ≈ 2.71828. log(x), by convention in most contexts, is the common logarithm with base 10. The two are related by a fixed factor: ln(x) = log₁₀(x) · ln 10 ≈ log₁₀(x) · 2.3026, and log₁₀(x) = ln(x) / ln 10. Calculus and physics tend to default to ln (because the derivative of eˣ is the cleanest), while chemistry, engineering, and information theory often default to log₁₀ or log₂.

The base of a logarithm is the number that is being raised to the power. In log_b(x) = y the base is b, and the equation says b raised to y equals x. The base sets the multiplicative "step size" the logarithm counts: base 10 counts powers of 10 (orders of magnitude), base 2 counts doublings, base e counts continuous-growth multiples. Every valid base must be positive and different from 1.

No. Allowing a negative base would mean raising a negative number to non-integer exponents, which leaves the real number line (since for example (−4)^0.5 is the imaginary number 2i). To keep logarithms a well-defined, continuous, real-valued function, the base must be positive. The calculator rejects b ≤ 0 with a clear error.

Because every power of 1 equals 1 — 1¹ = 1, 1²⁵ = 1, even 1^π = 1. If the base were 1 the equation 1^y = x would only have a solution when x = 1, and even then y could be any real number. There is no unique exponent, so log₁(x) is undefined. The calculator blocks b = 1 explicitly.

The change-of-base formula is log_b(x) = log_a(x) / log_a(b) for any valid alternate base a. The two most common choices are a = e (natural log) and a = 10 (common log), giving log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). It is the only identity you need to evaluate a log in a base that your calculator does not carry directly — and it is the formula this site's calculator applies under the hood for every log_b(x) computation.

The natural logarithm, written ln(x), is the logarithm with base e (Euler's number ≈ 2.71828). It appears naturally in calculus because the derivative of ln(x) is 1/x — the simplest possible derivative of a transcendental function. ln also pairs with continuous compounding: ln(1 + r) is the continuous-compounding equivalent of a discrete rate r, and exponential decay N(t) = N₀ · e^(−kt) inverts directly to t = ln(N₀ / N) / k.

The binary logarithm log₂(x) is the logarithm with base 2 — the exponent that produces a given number when you keep doubling. It is the natural unit of measurement in computer science: log₂ 1024 = 10 bits address 1024 distinct values, binary search of a sorted array runs in O(log₂ n) comparisons, and information measured in bits comes from −Σ p · log₂ p (Shannon entropy). log₂(x) = ln(x) / ln 2 ≈ ln(x) · 1.4427.

Logarithms compress very wide multiplicative scales into manageable additive ones, so they appear in almost every quantitative field. Earthquake magnitude (Richter), sound intensity (decibels), and acidity (pH) are direct log-based scales. Compound-interest doubling time, half-life of radioactive isotopes, and population doubling all solve to a logarithm. In computing, search complexity (binary search, balanced trees) and information measures (entropy, KL divergence) are log_2 expressions. Statistics uses log-likelihoods, log-odds, and log-normal distributions to model multiplicative noise. Astronomers use stellar magnitudes (a log scale of brightness).

Type simple fractions like 3/4 or −1/2 and the calculator parses them as floating-point values. Scientific notation works in the standard form 1.5e3 (= 1500) or 2e−6 (= 0.000002). The literal letters "e" and "pi" (or the symbol π) are recognised as Euler's number and pi respectively — so log_e(20), log_π(10), or log_10(π) all evaluate cleanly. Snap-to-integer rounding keeps clean answers clean: log₃ 81 returns exactly 4, not 3.9999...

Yes. log_b(x) is negative whenever 0 < x < 1 and the base b > 1. For example, log₁₀(0.01) = −2, because 10⁻² = 0.01. It is also negative when x > 1 but the base sits between 0 and 1 (a reciprocal base flips the sign of every output). The argument x itself must still be strictly positive — only the exponent can go negative.