Logarithm Calculator
Calculate log base 10, natural log (ln), log base 2, or any custom base — with the change-of-base formula shown. Free, runs in your browser.
Logarithm Calculator
How to Use the Logarithm Calculator
Enter a number
Type the positive number you want the logarithm of — for example 1000.
Read the common logs
You instantly get log base 10 (the "common" log), the natural log (ln, base e), and log base 2 — the three most-used bases, all at once.
Add a custom base
Type any base in the second box — 5, 7, anything — to get that logarithm too, computed with the change-of-base formula, which is shown so you can follow the method.
Use the result
Logarithms answer "what power gives this number?" — useful for pH, decibels, the Richter scale, compound growth, and algorithm analysis.
Logarithms, Demystified
The Inverse of a Power
A logarithm answers a single, very practical question: "to what power must I raise this base to get that number?" If 10³ = 1000, then log base 10 of 1000 is 3. That is all a logarithm is — the inverse of exponentiation, the exponent itself, pulled back out. This calculator gives the three logarithms people use most: the common log (base 10), used everywhere in science and engineering; the natural log, written ln, with base e ≈ 2.718, which is woven into calculus, growth, and probability; and the binary log (base 2), the language of computer science, where it counts how many times you can halve a problem. Because they share the same idea, they are simply related, and the calculator also lets you choose any custom base. Logarithms were invented by John Napier in the early 1600s as a labour-saving device — they turn multiplication into addition, which is why slide rules and log tables ruled engineering for three centuries before the electronic calculator.
The trick that makes a single engine able to compute a logarithm in any base is the change-of-base formula: the log of x in base b equals ln(x) divided by ln(b) (you can use any common base on top and bottom, not just the natural log). This is why a calculator only needs one or two built-in logarithms to deliver all of them, and this tool shows that division explicitly when you enter a custom base, so the method is transparent rather than magic. Logarithms also have a beautiful set of laws that mirror the index laws of exponents: the log of a product is the sum of the logs, the log of a quotient is the difference, and the log of a power brings the exponent out front. Those laws are exactly why logarithms turn hard multiplications into easy additions, and why they remain a core part of the algebra curriculum.
"A logarithm is just an exponent in disguise — the answer to 'what power gives this number?'. That one question quietly underlies pH, decibels, earthquakes, and the speed of algorithms."
Where Logarithms Show Up
Logarithms are the natural language of anything that spans a huge range of scales. The pH scale is a base-10 log of acidity, so a drop of one pH unit means ten times more acidic. The decibel scale for sound and the Richter scale for earthquakes are logarithmic for the same reason — they compress enormous ranges into manageable numbers. In finance, logarithms turn compound growth into a straight line and are how "doubling time" is computed. In computer science, the binary log is everywhere: a balanced search through a million items takes only about twenty steps because log₂ of a million is roughly twenty, which is why efficient algorithms are described as "logarithmic". And in statistics and machine learning, the natural log appears constantly, from likelihoods to information theory. Whatever field brings you here, this calculator gives the common, natural, binary, and any custom-base logarithm instantly and privately, with the change-of-base working shown.
10 Facts About Logarithms
A logarithm is the inverse of a power: log₁₀(1000) = 3 because 10³ = 1000.
ln is the natural log, base e ≈ 2.718 — central to calculus and growth.
log₂ (binary log) is the language of computer science and algorithm speed.
The change-of-base formula turns any base into a ratio of natural logs.
Logs turn multiplication into addition — the basis of the slide rule.
John Napier invented logarithms in the early 1600s.
The pH scale is a base-10 log — one unit means ten times more acidic.
The Richter and decibel scales are logarithmic too.
The log of a number is only defined for positive numbers.
log₂ of a million ≈ 20 — why searching a million items takes ~20 steps.
Frequently Asked Questions
- A logarithm answers "what power must I raise the base to, to get this number?" Since 10³ = 1000, the log base 10 of 1000 is 3. It is the inverse of raising to a power. This calculator gives the base-10, natural (ln), base-2, and any custom-base logarithm at once.
- "log" usually means base 10 (the common log), while "ln" means the natural log, base e ≈ 2.718. They measure the same kind of thing in different units and are related by a constant factor. The natural log is the one that appears in calculus and continuous growth; base 10 is common in science and engineering. The calculator shows both.
- Type your base into the custom-base box. The calculator uses the change-of-base formula — log_b(x) = ln(x) ÷ ln(b) — and shows that division so you can follow it. This is exactly how a calculator computes a log in any base from just the natural log.
- Because no power of a positive base ever produces a negative number or zero — the result of bˣ is always positive. So the logarithm is only defined for positive inputs, and the calculator shows a clear message if you enter zero or a negative number.
- Binary log (base 2) counts how many times you can halve something, which is why it describes the speed of efficient algorithms — a balanced search of a million items takes about log₂(million) ≈ 20 steps. It also measures information in bits. The calculator includes it alongside the common and natural logs.
- The log of a product is the sum of the logs; the log of a quotient is the difference; and the log of a power brings the exponent out as a multiplier. These mirror the index laws of exponents and are why logarithms turn multiplication into addition — the property that made them so valuable before electronic calculators.
- Results are shown to ten significant figures using the shared, tested math engine, which is more than enough for science, engineering, and homework. They follow standard high-precision floating-point behaviour, the same as any scientific calculator.
- You undo the logarithm with a power (the "antilog"). If log₁₀(x) = 3, then x = 10³ = 1000; if ln(x) = 2, then x = e². Raise the base to the value of the logarithm to get the original number back — the Exponent calculator does that step.
- Yes. Everything is computed in your browser — nothing is uploaded, stored, or logged — and it works offline once loaded.
- Completely free, with no account, sign-up, or limit. It runs entirely in your browser and collects no data. Use it as often as you like.
Related News
You may be interested in these recent stories from our newsroom.
No related news yet for this tool. Our editorial team publishes new pieces every week.
Browse all news →75 more free tools
Calculators, converters, security tools — no signup.