Logarithm Calculator
Free logarithm calculator: solve log_b(x) for the result, argument, or base. Supports common log, natural log (ln), log base 2, and any custom base.
Logarithm Calculator
Background.
The Quanta logarithm calculator evaluates log_b(x) for any positive argument x and any positive base b ≠ 1, in three directions: enter a base and argument and it returns the result, enter a base and result and it returns the argument (the inverse, also called the antilogarithm), or enter an argument and result and it returns the base that would make the relationship hold. A logarithm is the inverse of exponentiation: if b^y = x, then log_b(x) = y. In plain English, log_b(x) answers the question "what exponent do I need to raise the base b to in order to get x?" That single idea — turning a multiplicative relationship into an additive one, and an exponential into a linear one — is what makes logarithms one of the most important computational tools ever invented.
They were created by John Napier in 1614 specifically to replace tedious multiplications and divisions with additions and subtractions, and for the next three and a half centuries every navigator, astronomer, surveyor, engineer, and physicist on Earth carried log tables or a slide rule (which is just a logarithmic ruler) to do their arithmetic. Logarithms still sit underneath an enormous amount of modern science and everyday life, usually invisibly.
The decibel scale that measures sound intensity is logarithmic — every 10 dB is a 10× increase in power. The pH scale that measures acidity is the negative log base 10 of the hydrogen-ion concentration. The Richter scale for earthquakes, the apparent-magnitude scale for stars, and the f-stop scale on a camera lens are all logarithmic. Information theory measures the information content of a message in bits, which are log base 2 of the number of equally likely possibilities. Computer science measures the runtime of binary search and balanced-tree operations in log time, because each step halves the problem. Chemistry, finance (compound-interest doubling times), epidemiology (exponential growth rates), and machine learning (log-likelihood, cross-entropy loss) all live and breathe natural logarithms.
The three bases you'll meet most often are 10 (the "common" log, written log or log_10, used in engineering and the human-scale scales above), e ≈ 2.71828 (the "natural" log, written ln, used in calculus and continuous-growth models because the derivative of ln(x) is exactly 1/x), and 2 (the "binary" log, written lg or log_2, used in computer science and information theory). The change-of-base formula log_b(x) = ln(x) / ln(b) lets a calculator that only knows one logarithm function compute the log in any other base — and that is exactly what this tool does internally. This page covers the precise definition, the three bases, the inverse operation (exponentiation/antilog), the algebraic identities (product, quotient, power rules), the change-of-base derivation, common pitfalls (negative arguments, base of 1, the difference between log and ln), and a worked example you can step through yourself.
What is logarithm calculator?
A logarithm answers an exponent question. Given a base b > 0 with b ≠ 1, and a positive argument x > 0, the logarithm log_b(x) is the unique real number y such that b^y = x. Symbolically, log_b(x) = y ⟺ b^y = x. The two expressions are exact mirror images of each other — exponentiation and logarithm are inverse functions, which is why the calculator can solve in either direction by simply swapping which variable is unknown. Three bases dominate practice and have their own notations and names. Common logarithm (base 10), written log(x) or log_10(x), was the original "working logarithm" of the slide-rule era and remains the default for engineering scales (decibels, pH, Richter, magnitude) because powers of 10 align with human counting. Natural logarithm (base e), written ln(x) or log_e(x), uses Euler's constant e ≈ 2.718281828… and is the logarithm that falls out of calculus: the derivative of ln(x) is exactly 1/x, the integral of 1/x is ln(x) + C, and any continuous-growth process — compound interest at infinitely small intervals, radioactive decay, population dynamics, drug clearance — produces exponentials of the form e^(kt) whose inverse is ln. Binary logarithm (base 2), written lg(x) or log_2(x), is the logarithm of information theory and computer science: a quantity with N equally likely outcomes carries log_2(N) bits of information, and an algorithm that halves its input each step has log_2(N) steps. The change-of-base identity log_b(x) = log_a(x) / log_a(b) — usually applied with a = e, giving log_b(x) = ln(x) / ln(b) — lets you convert between any two bases with one division, which is what makes a calculator that natively knows only one logarithm able to evaluate them all. Three further identities are used constantly: the product rule log_b(xy) = log_b(x) + log_b(y), the quotient rule log_b(x/y) = log_b(x) − log_b(y), and the power rule log_b(x^p) = p · log_b(x). These three are the reason logarithms were invented: they convert multiplication into addition, division into subtraction, and exponentiation into multiplication, which is what made pre-calculator arithmetic with seven-figure log tables faster than long multiplication by hand.
How to use this calculator.
- Pick the mode at the top. "Result" is the default and most common — you know the base and the argument and you want the logarithm itself. "Argument" runs the inverse: you know the base and the log result and you want to recover the original number (the antilog). "Base" is the rarest mode: you know the argument and the result and you want to discover what base satisfies the relationship.
- In result mode, enter the base (10 for common log, e ≈ 2.71828 for natural log, 2 for binary log, or any other positive number that isn't 1) and the argument (any positive number). The result log_b(x) updates as you type.
- In argument mode, enter the base and the result. The calculator returns b^result — the original number whose logarithm equals that result. This is the "antilog" operation: useful for inverting a decibel reading back to a power ratio, a pH back to a hydrogen-ion concentration, or a log-transformed regression coefficient back to its original scale.
- In base mode, enter the argument and the result. The calculator returns x^(1/result) — the base that would make log_b(x) equal your supplied result. Useful when reverse-engineering exponential models from two known data points.
- Read the natural log output (ln(x)) as a free cross-check. The identity ln(x) = log_b(x) × ln(b) connects the two, so you can confirm by hand that ln(100) = log_10(100) × ln(10) = 2 × 2.3026 ≈ 4.605.
- If you enter a base of 1, a base of 0 or below, or an argument of 0 or below, the calculator will refuse to compute. Logarithms are undefined for those values: log_1 has zero in the denominator of the change-of-base formula, and the logarithm of a non-positive real number doesn't exist as a real number (it only exists as a complex number, which is a different tool).
The formula.
The fundamental definition is log_b(x) = y ⟺ b^y = x. Everything else follows from rearranging that single biconditional. The change-of-base formula is log_b(x) = ln(x) / ln(b), and it is how the Quanta engine actually computes any logarithm internally. Derivation: start from b^y = x, take the natural log of both sides to get ln(b^y) = ln(x), apply the power rule on the left to get y · ln(b) = ln(x), and divide by ln(b) (allowed because b ≠ 1, so ln(b) ≠ 0) to obtain y = ln(x) / ln(b). The same derivation works with any other base a ≠ 1 in place of e, giving the general change-of-base log_b(x) = log_a(x) / log_a(b). The inverse relationships are two sides of the same coin: b^(log_b(x)) = x for every positive x, and log_b(b^y) = y for every real y. These are what the "argument" and "base" modes exploit. In argument mode the calculator computes x = b^y = exp(y · ln(b)), using the engine's exp function for numerical stability across very large or very small results. In base mode the calculator solves b^y = x for b by taking the y-th root: b = x^(1/y) = exp(ln(x) / y). Three algebraic identities are used constantly in derivations and worked problems: product rule log_b(xy) = log_b(x) + log_b(y), quotient rule log_b(x/y) = log_b(x) − log_b(y), and power rule log_b(x^p) = p · log_b(x). All three follow directly from the corresponding exponent laws (b^m · b^n = b^(m+n), b^m / b^n = b^(m−n), (b^m)^p = b^(mp)) by taking the logarithm of both sides. Special values worth memorizing: log_b(1) = 0 for any base (because b^0 = 1), log_b(b) = 1 (because b^1 = b), log_b(0) is undefined (b^y can never equal 0 for finite y, only approach it as y → −∞), and log_b of a negative number is undefined over the real numbers. Floating-point note: the engine rounds to fifteen significant figures, which is the practical limit of IEEE 754 double-precision arithmetic, and uses the high-accuracy library implementations of Math.log and Math.exp that ship with V8/Node so cancellation and rounding errors stay below 1 ulp for arguments in the normal floating-point range.
A worked example.
Compute log_10(1000). The base is 10, the argument is 1000. We want the exponent y such that 10^y = 1000. By inspection, 10^3 = 10 × 10 × 10 = 1000, so y = 3. The calculator confirms: result = 3, argument = 1000, base = 10, ln(1000) ≈ 6.9078. We can verify the change-of-base formula by hand: log_10(1000) = ln(1000) / ln(10) = 6.9078 / 2.3026 = 3.000 exactly. The natural log output ln(1000) ≈ 6.9078 also confirms one of the most-used decimal approximations in engineering: ln(10) ≈ 2.3026, so to convert any natural log to a common log you divide by 2.3026 (or multiply by 0.4343 = 1/ln(10)). Two more quick sanity checks using the same calculator: switch the base to 2 and the argument to 8 to get log_2(8) = 3, because 2^3 = 8 — this is the binary log used in information theory, telling you 8 equally likely outcomes carry exactly 3 bits of information. Switch the base to Euler's constant e (enter 2.718281828) and the argument to e itself to get ln(e) = 1, the defining property of the natural logarithm. Finally, switch to argument mode with base 10 and result 3: the calculator returns 1000, recovering the original input — confirming that exponentiation undoes logarithm, exactly as the inverse-function relationship promises.
Frequently asked questions.
What is the difference between log and ln?
What is log base 10 vs log base e?
Why is e (Euler's number) the "natural" base for logarithms?
Can you take the logarithm of a negative number?
Why is the logarithm of zero undefined?
What is the change-of-base formula and when do I need it?
Why can't the base of a logarithm equal 1?
What does the antilog (inverse logarithm) mean?
Where do logarithms show up in real life?
What's the difference between log_2, log_10, and ln?
References& sources.
- [1]NIST Digital Library of Mathematical Functions, §4 — Elementary Functions, particularly §4.1 (Logarithm, Exponential, Powers) and §4.2 (Definitions). The definitive modern reference for the logarithm's analytic definition, identities, and numerical evaluation.
- [2]Stewart, James. Calculus: Early Transcendentals, 9th edition. Cengage Learning, 2020 — Chapter 6 (Inverse Functions: Exponential, Logarithmic, and Inverse Trigonometric Functions) gives the standard undergraduate treatment of the natural logarithm via the integral definition ln(x) = ∫₁ˣ (1/t) dt, the change-of-base formula, and all three algebraic identities (product, quotient, power).
- [3]Encyclopedia Britannica, "Logarithm" — historical and conceptual overview, including John Napier's 1614 publication Mirifici Logarithmorum Canonis Descriptio and Henry Briggs's 1617 reformulation in base 10 ("Briggs logarithms" / common logarithms).
- [4]Khan Academy, Algebra 2 — Logarithms unit. Peer-reviewed curriculum-aligned reference covering log_b(x) definition, change of base, log laws (product, quotient, power), and inverse relationship to exponentiation. Aligned to Common Core State Standards F-BF.5 and F-LE.4.
- [5]Abramowitz, M. and Stegun, I. A. (eds.) Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. National Bureau of Standards Applied Mathematics Series 55, 1964 — §4.1 lists the logarithm's series expansions, identities, and numerical properties. Still cited by NIST DLMF as a foundational reference.
- [6]ISO 80000-2:2019 — Quantities and units, Part 2: Mathematics. International standard fixing the notation log_b(x), ln(x) for log_e(x), lg(x) for log_2(x), and the constraints b > 0, b ≠ 1, x > 0.
- [7]Maor, Eli. e: The Story of a Number. Princeton University Press, 1994 — peer-reviewed monograph tracing the history of e and the natural logarithm from Napier (1614) and Briggs (1617) through Bernoulli, Euler, and modern applications.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 313 calculators remain free
- No billing is enabled