By Tim King · Updated
Log Calculator
Logarithms in Base 10, e, 2 or Any Base, Plus Antilog
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Log Calculator works
This log calculator finds the logarithm of any positive number in base 10, base e, base 2 or a base you choose, and lists log₁₀, ln and log₂ together so you can compare them. Switch to antilog to go the other way and raise the base to a power. Each answer comes with a check that undoes it.
A logarithm answers the question "what power gives this number?" Since 10³ = 1000, log₁₀(1000) = 3. Logs turn multiplication into addition, which is why they measure things that span huge ranges: decibels, the Richter scale, pH and star brightness all use them. Base 10 suits everyday scales, base e is the natural log of growth and calculus, and base 2 counts bits and doublings in computing.
How the log calculator works
The formula is log_b(x) = ln(x) / ln(b), the change of base rule, so any base comes down to natural logs. The calculator rounds a result to a whole number when it is within a trillionth of one, so log₂(64) shows 6 rather than 5.999999. The antilog is b^x, and the check line raises the base to the answer to confirm it.
First example. log₁₀(1000) = 3, because 10 × 10 × 10 = 1000. Its ln is 6.907755 and its log₂ is 9.965784.
Second example. log₂(64) = 6, because 2⁶ = 64. In computing, that means 64 values fit in 6 bits.
How many times must 1 double to pass a million? log₂(1,000,000) ≈ 19.93, so 20 doublings.
Logarithms of common numbers in base 10, e and 2
| x | log₁₀ x | ln x | log₂ x |
|---|---|---|---|
| 0.001 | -3 | -6.9078 | -9.9658 |
| 0.01 | -2 | -4.6052 | -6.6439 |
| 0.1 | -1 | -2.3026 | -3.3219 |
| 0.5 | -0.301 | -0.6931 | -1 |
| 1 | 0 | 0 | 0 |
| 2 | 0.301 | 0.6931 | 1 |
| 3 | 0.4771 | 1.0986 | 1.585 |
| 4 | 0.6021 | 1.3863 | 2 |
| 5 | 0.699 | 1.6094 | 2.3219 |
| 6 | 0.7782 | 1.7918 | 2.585 |
| 7 | 0.8451 | 1.9459 | 2.8074 |
| 8 | 0.9031 | 2.0794 | 3 |
| 9 | 0.9542 | 2.1972 | 3.1699 |
| 10 | 1 | 2.3026 | 3.3219 |
| 16 | 1.2041 | 2.7726 | 4 |
| 20 | 1.301 | 2.9957 | 4.3219 |
| 32 | 1.5051 | 3.4657 | 5 |
| 50 | 1.699 | 3.912 | 5.6439 |
| 64 | 1.8062 | 4.1589 | 6 |
| 100 | 2 | 4.6052 | 6.6439 |
| 256 | 2.4082 | 5.5452 | 8 |
| 1,000 | 3 | 6.9078 | 9.9658 |
| 1,024 | 3.0103 | 6.9315 | 10 |
| 1,000,000 | 6 | 13.8155 | 19.9316 |
Tips and pitfalls
- Only positive numbers. log(0) and logs of negatives are undefined in real numbers.
- Know which log. On most calculators log means base 10 and ln means base e; in pure maths and many programming languages, log means ln.
- Log rules. log(a × b) = log a + log b and log(a^n) = n log a; there is no rule for log(a + b).
- Base 1 is not allowed. Every power of 1 is 1, so it cannot reach any other number.
FAQ
What is a logarithm?
A logarithm is the exponent you need to raise a base to in order to get a number. log₁₀(100) = 2 because 10² = 100, and log₂(8) = 3 because 2³ = 8. Logs and exponents are inverses, so each undoes the other in the same base.
What is the difference between log and ln?
log usually means base 10 and ln means the natural log, base e ≈ 2.71828. They differ by a constant factor: ln(x) ≈ 2.302585 × log₁₀(x). The natural log appears in growth, decay and calculus, while base 10 suits scales such as decibels and pH.
How do you calculate a log with a different base?
Use the change of base rule: log_b(x) = log(x) / log(b), with any common base on top and bottom. So log₃(81) = log(81) / log(3) = 1.908485 / 0.477121 = 4. Choose Custom base and type the base to skip the division.
What is an antilog?
The antilog reverses a logarithm by raising the base to the given power. The antilog of 2 in base 10 is 10² = 100, and the antilog of 1 in base e is e ≈ 2.718282. Pick Antilog in the Find box and enter the log value as the number.
Why is log of 1 equal to zero?
Any base raised to the power 0 is 1, so the log of 1 is 0 in every base. Numbers between 0 and 1 have negative logs, such as log₁₀(0.01) = -2, and the log heads toward minus infinity as the number approaches zero.
See also: all Arithmetic tools, Number Theory, Algebra and Geometry, Statistics, Trigonometry and Calculus.
Related tools
Exponent Calculator
Raise a number to any power, with exact results for big powers.
Scientific Calculator
Trig, logs, powers, factorials and memory, in one expression.
Scientific Notation Converter
Convert numbers to scientific, E and engineering notation and back.
Root Calculator
Square, cube and nth roots, with the radical simplified.
Exponential Growth And Decay Calculator
Final amount, doubling time or half-life for steady percentage growth or decay.