What Is a Logarithm?
A logarithm is the inverse of an exponent. It answers the question: "To what power must I raise the base to get this number?" Because 103 = 1,000, the logarithm base 10 of 1,000 is 3, written log10(1000) = 3. In general, logb(x) = y means by = x. Logarithms turn multiplication into addition and powers into multiplication, which is why they were used for centuries in slide rules and log tables to speed up calculation.
Today, logarithms appear throughout science and everyday life. The Richter scale for earthquakes, decibels for sound, pH in chemistry and stellar magnitudes in astronomy are all logarithmic scales. Logarithms solve compound-interest and population-growth problems, measure information in bits (log2), describe algorithm complexity (O(log n)) and appear in probability, statistics and machine learning. This free log calculator works in any base and shows the working.
How to Use the Logarithm Calculator
- Choose what to solve for: the logarithm itself, the number (antilog), or the base.
- Enter the base: 10, 2, any positive number except 1, or type e for the natural log.
- Enter the number (which must be positive) or the logarithm value, depending on what you're solving.
- Read the result, along with ln, log10 and log2 of the same number, and the step-by-step working.
Common Logarithm Bases
| Name | Notation | Base | Used for |
|---|---|---|---|
| Common logarithm | log, log10 | 10 | Science, engineering, pH, decibels, Richter scale |
| Natural logarithm | ln, loge | e ≈ 2.71828 | Calculus, growth and decay, continuous interest |
| Binary logarithm | log2, lb | 2 | Computer science, bits, algorithms |
Change of Base Formula
Most calculators only have "log" (base 10) and "ln" (base e) buttons. To find a logarithm in any other base, use the change of base formula: logb(x) = ln(x) / ln(b) = log(x) / log(b). For example, log2(50) = ln(50) / ln(2) = 3.912 / 0.693 ≈ 5.644, meaning 25.644 ≈ 50. This calculator applies the formula automatically and shows each step.
Laws of Logarithms
| Law | Formula | Example |
|---|---|---|
| Product | log(xy) = log x + log y | log(20) = log 2 + log 10 ≈ 1.301 |
| Quotient | log(x/y) = log x − log y | log(5) = log 10 − log 2 ≈ 0.699 |
| Power | log(xn) = n log x | log(1000) = 3 log 10 = 3 |
| Log of 1 | logb(1) = 0 | because b0 = 1 |
| Log of base | logb(b) = 1 | ln(e) = 1 |
| Inverse | blogbx = x | 10log 7 = 7 |
Antilogarithms
The antilog reverses a logarithm: if logb(x) = y, then x = by. The antilog of 2.5 in base 10 is 102.5 ≈ 316.23. Choose "Number / antilog" to calculate it. This is handy for converting pH back to hydrogen-ion concentration, or decibels back to power ratios.
Solving Exponential Equations with Logs
Logarithms let you solve equations where the unknown is in the exponent. How long does money take to double at 7% interest? Solve 1.07t = 2: t = log(2) / log(1.07) ≈ 10.24 years. With this calculator, set base = 1.07 and number = 2. The same approach finds half-lives, bacterial doubling times and how many bits are needed to store a number (log2).
Features
- Any base10, e, 2 or any custom positive base.
- Solve three waysFor the logarithm, the antilog or the base.
- ln, log and log2 togetherEvery calculation shows all three.
- Change of baseFormula applied step by step.
- Multi-base tableThe same number in eight bases.
- High precisionUp to 14 decimal places.
Frequently Asked Questions
What is log 0?
It is undefined. No power of a positive base gives 0; as x approaches 0, log(x) heads towards −∞.
Can you take the log of a negative number?
Not in real numbers. Negative inputs require complex logarithms.
What's the difference between log and ln?
"log" usually means base 10 (in maths and engineering), while "ln" is the natural log, base e ≈ 2.71828. In many programming languages, log() is the natural log.
What is log base 2 of 1024?
10, because 210 = 1,024.
Why can't the base be 1?
1 raised to any power is always 1, so it could never produce any other number.