Logarithm Calculator
A logarithm answers one question: what power do I raise this base to in order to get that number? Everything else — decibels, pH, half-lives, algorithm complexity — is that question in costume.
Logarithm
The number must be positive. The base must be positive and not equal to 1.
Change of base, step by step
Three bases, three habitats
Base 10 (the common log) counts digits and powers of ten. It runs the decibel scale, pH, the Richter scale and every chart axis labelled 1, 10, 100, 1000.
Base e (the natural log, ln) is the one that appears whenever something grows or decays continuously — compound interest, radioactive decay, cooling, population models. It looks arbitrary until you meet calculus, where it is the only base whose rate of change equals itself.
Base 2 (the binary log) counts halvings and doublings. It is how many bits a number needs, how many times you can split a list in half, and why binary search on a million items takes twenty steps rather than a million.
Change of base: one formula covers everything
logb(x) = ln(x) / ln(b). Any base can be computed from any other, which is why calculators only ever ship with two log buttons. The division is shown above step by step so the result can be checked by hand.
The three rules that do the real work
log(ab) = log a + log b. log(a/b) = log a − log b. log(an) = n log a. Together they turn multiplication into addition and powers into multiplication, which is the entire reason logarithms were invented — and why slide rules worked. The third rule is the one that matters most today: it is how you solve for an unknown exponent, such as how many years an investment takes to double.
Why the number must be positive
No real power of a positive base ever produces a negative result or zero, so log of a negative number and log of zero simply do not exist in the reals. As x approaches zero the log falls without limit, which is why the calculator reports "tends to −∞" rather than an error — the behaviour is well defined even though the value is not.
Frequently Asked Questions
What is the difference between log and ln?
How do I calculate a log in a base my calculator does not have?
What is an antilog?
Why can I not take the log of zero or a negative number?
Sources
Official publications only. Links open the original document in a new tab.
- National Institute of Standards and Technology Special Publication 811 — Guide for the use of the SI Significant figures and rounding conventions
- National Institute of Standards and Technology CODATA fundamental physical constants Values of the fundamental physical constants