Home › Math & Science › Log Calculator
Log Calculator
Use this log calculator to find logarithms in any base — log base 10, the natural log (ln), log base 2, or a log with a custom base of your choice — and to reverse the process with antilog. Type a number, pick the operation, and the answer appears instantly, with the change-of-base working shown so you can follow the maths.
For a log, x must be greater than zero. For an antilog, x can be any number, positive or negative.
How it works
A logarithm is the reverse of raising a number to a power. If you know that 10³ = 1000, then log base 10 of 1000 is 3 — the exponent you need. In general, log base b of x is the power y that makes bʸ = x. That single idea covers every kind of log on this page; only the base changes.
Log base 10, written log(x), is the common log used in science and engineering. It counts powers of 10: log₁₀(10) = 1, log₁₀(100) = 2, log₁₀(1000) = 3, and log₁₀(1) = 0. It is the log behind the decibel scale for sound and the Richter scale for earthquakes.
Natural log, written ln(x), uses the base e, about 2.71828. It appears wherever things grow or decay continuously — compound interest, population growth, radioactive decay, and the mathematics of calculus. Ln(10) is about 2.3026, and ln(1) is 0.
Log base 2, written log₂(x), counts powers of 2 and is the natural log for computing: log₂(8) = 3 because 2³ = 8, and log₂(1024) = 10. It measures bits of information and the doubling steps in computer science.
Custom base covers everything else. Pick any positive base other than 1 — 5, 7, 3, or whatever your problem uses — and the calculator applies the change-of-base formula, dividing the base-10 log of x by the base-10 log of the base. The breakdown table shows both of those numbers so you can check the division yourself.
Antilog runs the process backwards. If log₁₀(x) = 3, then x = 10³ = 1000, so the antilog base 10 of 3 is 1000. Antilog base e of a number is simply e raised to that number, and antilog with a custom base raises your chosen base to the number. Unlike a log, an antilog accepts any input, including zero and negative numbers — 10⁻² is 0.01, for example.
Worked example
Find log base 10 of 1000. This is the classic first log problem, and it shows the whole idea in one line.
Step 1: Ask the log question — to what power must I raise 10 to get 1000?
Step 2: Count the powers of 10. 10¹ = 10, 10² = 100, and 10³ = 1000.
Step 3: The power that works is 3, so log₁₀(1000) = 3.
Step 4: Check by going backwards. The antilog base 10 of 3 is 10³ = 1000, which is where you started.
Try it yourself: choose "Log base 10", enter 1000, and press Calculate. The tool gives exactly the same answer — log₁₀(1000) = 3. Then switch to "Antilog base 10", enter 3, and you get 1000 back, confirming that log and antilog undo each other.
FAQ
What is a logarithm?
A logarithm answers the question: to what power must I raise the base to get this number? Log base 10 of 1000 is 3, because 10 to the power 3 equals 1000. In symbols, log base b of x equals y exactly when b to the power y equals x.
What is the difference between log, ln, and log2?
They differ only in the base. Log usually means log base 10, ln means the natural log with base e (about 2.71828), and log2 means log base 2. Log base 10 of 1000 is 3, ln of 10 is about 2.3026, and log2 of 8 is 3.
How do I calculate a log with a custom base?
Use the change-of-base formula: log base b of x equals log base 10 of x divided by log base 10 of b. For example, log base 5 of 125 equals log10(125) divided by log10(5), which is 2.0969 divided by 0.6990, or 3 — because 5 to the power 3 is 125.
What is an antilog?
An antilog is the reverse of a log. If log base 10 of x is y, then the antilog of y is x, which is 10 to the power y. The antilog base 10 of 3 is 1000, and the antilog base e of 2 (often written e to the power 2) is about 7.3891.
Can I take the log of zero or a negative number?
No. Logarithms are defined only for positive numbers, because no real power of a positive base gives zero or a negative number. This calculator shows a friendly message if you enter zero or a negative value. The base must also be positive and not equal to 1.