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.
| x | log₁₀(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.
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
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.
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.
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.
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.
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.
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
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
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
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
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
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
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
Related Calculators
More math and growth-rate tools that pair naturally with logarithms.
- Exponent CalculatorSolve y = bˣ for any unknown with expanded multiplication, logarithm derivation, and property breakdown.
- Scientific CalculatorAdvanced trig, log, exponent, root, factorial, and memory functions.
- Root CalculatorSquare root, cube root, and any nth root with step-by-step simplification.
- Scientific Notation CalculatorConvert to and from scientific, engineering, and E-notation with arithmetic support.
- Half-Life CalculatorHalf-life, radioactive decay, decay constant, mean lifetime, and Carbon-14 dating with step-by-step derivations and a 15-isotope library.
- Quadratic Formula CalculatorSolve ax² + bx + c = 0 with discriminant, vertex, factored form, parabola graph, and full working.