Log Calculator
Enter a number and a base to compute the logarithm, or flip to antilog mode to find the number from its logarithm. Switch the base between base-10 (common log), base-e (natural log), base-2 (binary log) or any custom base. You also see the full change-of-base breakdown and a step-by-step worked example.
Formula
Worked example
Find log base 3 of 81: ln(81)/ln(3) = 4.394/1.099 = 4. Check: 3^4 = 81. Common log: log10(81) = 1.908279. Natural log: ln(81) = 4.394449. Binary log: log2(81) = 6.339850.
What is a logarithm?
A logarithm answers the question: "To what power must I raise a base to get this number?" If b^y = x, then log_b(x) = y. For example, 10^2 = 100, so log10(100) = 2. Logarithms convert multiplication into addition and division into subtraction, which is why they appear everywhere from the Richter earthquake scale and decibels (sound) to pH (acidity) and compound interest calculations. The three most common bases are 10 (common logarithm, used in science), e (natural logarithm, used in calculus and growth models), and 2 (binary logarithm, fundamental in computer science and information theory).
How to use this calculator
Choose a mode from the top dropdown. In Log mode, enter a positive number (x) and a base to find y = log_b(x). In Antilog mode, enter the base and an exponent (y) to recover x = b^y. In Find Base mode, enter both x and y to compute the base that makes log_b(x) = y. The calculator also shows the same number expressed in base 10, base e, and base 2 side by side, so you can compare all three common logarithms at once. The chart tab shows the full log curve for your chosen base, with a marker at your input value.
The change-of-base formula
Most scientific calculators provide only log10 and ln, but any base can be computed using the change-of-base formula: log_b(x) = ln(x) / ln(b). For example, log_7(343) = ln(343) / ln(7) = 5.838 / 1.946 = 3 (since 7^3 = 343). This formula works with any consistent pair of logarithms - log10(x) / log10(b) gives the same result. Our calculator applies this formula automatically for custom bases and shows the full breakdown in the Steps panel.
Real-world applications
The Richter magnitude scale uses log10: a magnitude-7 earthquake releases about 10 times more energy than a magnitude-6 event. The decibel (dB) scale for sound pressure also uses log10 multiplied by 20. pH is defined as -log10(hydrogen-ion concentration), so a pH of 3 is ten times more acidic than pH 4. In finance, continuously compounded growth uses the natural log: if an investment doubles (x = 2), the required rate times time is ln(2) = 0.693. In computer science, binary search and merge sort algorithms have complexity proportional to log2(n), where n is the data size.
Logarithm rules and identities
| Rule name | Formula | Plain-English meaning |
|---|---|---|
| Product rule | log_b(xy) = log_b(x) + log_b(y) | Log of a product = sum of logs |
| Quotient rule | log_b(x/y) = log_b(x) - log_b(y) | Log of a quotient = difference of logs |
| Power rule | log_b(x^n) = n log_b(x) | Exponent inside becomes a multiplier outside |
| Change of base | log_b(x) = ln(x) / ln(b) | Convert any log to natural-log ratio |
| Log of 1 | log_b(1) = 0 | Any base raised to 0 equals 1 |
| Log of base | log_b(b) = 1 | A base raised to 1 equals itself |
| Reciprocal rule | log_b(1/x) = -log_b(x) | Log of reciprocal is the negative |
| Inverse | b^(log_b(x)) = x | Exponentiation and log cancel each other |
Core rules that apply to any valid base b (b > 0, b not equal to 1).
Frequently asked questions
What is the difference between log and ln?
Both are logarithms, but to different bases. "log" without a subscript usually means log base 10 (common logarithm) in science and engineering contexts, and it means the natural logarithm in some pure-mathematics texts. "ln" always means the natural logarithm - log base e (approximately 2.71828). This calculator labels them clearly: log10 for base 10 and ln for base e, to avoid ambiguity.
What is an antilog?
An antilog is the inverse operation of a logarithm. If log_b(x) = y, then the antilog is x = b^y. For example, the antilog base 10 of 3 is 10^3 = 1000. The term antilog is most common in base-10 contexts, but the same idea applies to any base. This calculator's "antilog" mode computes b^y for any base b and exponent y.
Why can the logarithm only take positive numbers?
A logarithm asks "what exponent do I need to get this number from this base?" Real-valued exponents of a positive base always produce positive numbers - there is no real exponent that makes a positive base equal zero or a negative number. So log_b(x) is only defined for x > 0 in the real number system. For negative inputs you would need complex numbers, which is beyond the scope of this calculator.
How do I calculate log base 2?
Select "Base 2 (binary log)" from the base dropdown and enter your number. Alternatively, use the change-of-base formula: log2(x) = log10(x) / log10(2) = log10(x) / 0.30103. For example, log2(64) = log10(64) / log10(2) = 1.806 / 0.301 = 6 (since 2^6 = 64). The result is also shown in the sidebar outputs for every calculation regardless of which base you choose.
What does "find base" mode do?
It solves for the unknown base when you already know x and y in the equation log_b(x) = y. The formula is b = x^(1/y) = e^(ln(x)/y). For example, if you know that log_b(1000) = 3, then b = 1000^(1/3) = 10, confirming that base 10 is the answer. This is useful in data-science problems where you need to determine the base underlying a set of measurements.
What is the change-of-base formula?
The change-of-base formula lets you evaluate any logarithm using a calculator that only has log10 or ln keys: log_b(x) = ln(x) / ln(b) = log10(x) / log10(b). The two forms give identical results. For instance, log_5(125) = ln(125) / ln(5) = 4.828 / 1.609 = 3 (since 5^3 = 125). This calculator shows the full ln-over-ln breakdown in the "Change-of-base breakdown" output.