Log Calculator
Log Calculator
Find the logarithm of any positive number to any base: log base 10, natural log ln, log base 2 or a base of your own. Work backwards with the antilog, or find the base from a number and its log. Exact answers such as log base 4 of 8 = 3/2 are recognised, and every result shows the change of base working and a check.
The log curve
Where the number sits between powers
A logarithm answers the question: the base raised to what power gives this number? Numbers can be typed as 1000, 0.25, 1/8, 2.5e6, e, pi or a power such as e^2 or 2^10. Logs are only defined for numbers above 0, and the base must be above 0 and not 1. Answers are shown to 10 significant figures, and exact whole number or fraction answers are recognised when the number is a power of the base. The CSV, image and printed report contain the values you entered, nothing preloaded.
How to use this tool
Type the number and the base. The quick buttons set base 10, e for the natural log, or 2, and any other positive base except 1 can be typed, including decimals such as 1.05. Numbers can be written as fractions, powers or in scientific notation: 1/8, 2^10, e^2 or 2.5e6. Switch Calculate to an antilog to raise a base to a power, which undoes a log, or to find the base when you know a number and its log.
The entry people most often get wrong is the base. log on its own means base 10 on most calculators but base e in many textbooks and programming languages, so choose the base on purpose rather than by habit.
What a logarithm is
A logarithm is an exponent. log base 10 of 1,000 asks what power of 10 gives 1,000, and since 10 x 10 x 10 = 1,000 the answer is 3. For numbers that are not exact powers the answer falls between whole numbers: 3,450 lies between 10 to the power 3 and 10 to the power 4, so its log is 3.5378.
A calculator only needs one log built in. Any other base follows from the change of base rule, log base b of x = ln x ÷ ln b, which is how this tool works. Exact answers are then recognised by checking whether the base raised to a simple fraction gives the number back, which is how log base 4 of 8 comes out as exactly 3/2 rather than 1.4999999.

Why logs turn multiplying into adding
Logs were invented in the early 1600s to make multiplication easier. Because log(ab) = log a + log b, astronomers could multiply two long numbers by looking up their logs, adding them and looking up the answer. A slide rule does the same thing with distances marked on a log scale.
That property is why logs appear wherever quantities multiply. On the decibel scale, 10 dB more means ten times the sound power; on the pH scale, one step means ten times the hydrogen ion concentration. Compound growth runs the same way: money growing at 5% a year doubles in log 2 ÷ log 1.05 = 14.2 years.
In computing, log base 2 counts binary digits. A number up to 1,000,000 needs 20 bits because log base 2 of 1,000,000 is 19.93, and a sorted list of a million items can be searched in about 20 comparisons for the same reason.
Logs worth knowing
| Number | log base 10 | ln, base e | log base 2 |
|---|---|---|---|
| 0.5 | −0.30103 | −0.693147 | −1 |
| 1 | 0 | 0 | 0 |
| 2 | 0.30103 | 0.693147 | 1 |
| 3 | 0.477121 | 1.09861 | 1.58496 |
| e | 0.434294 | 1 | 1.4427 |
| 5 | 0.69897 | 1.60944 | 2.32193 |
| 7 | 0.845098 | 1.94591 | 2.80735 |
| 10 | 1 | 2.30259 | 3.32193 |
| 100 | 2 | 4.60517 | 6.64386 |
| 1,000 | 3 | 6.90776 | 9.96578 |
A worked example you can check on paper
Take log base 2 of 10 with the change of base rule. From the ln key or a table, ln 10 = 2.302585 and ln 2 = 0.693147. Dividing gives 2.302585 ÷ 0.693147 = 3.321928. As a sense check, 2 to the power 3 is 8 and 2 to the power 4 is 16, and 10 lies between them, so an answer between 3 and 4 is right.
For an exact one, take log base 4 of 8. Write both as powers of 2: 4 is 2 squared and 8 is 2 cubed. Then 4 to the power 3/2 is the square root of 4, which is 2, cubed, which is 8. So log base 4 of 8 is exactly 3/2, and the calculator shows it that way.
Mistakes that catch people out
Mixing up log and ln. log 100 is 2 in base 10 but 4.605 in base e. When a formula comes from a textbook or code, check which one it means.
Taking the log of 0 or a negative number. It is not defined, and spreadsheets return an error. If a value can be 0, such as a count, it has to be handled before the log is taken.
Splitting a log of a sum. log(a + b) is not log a + log b. The product rule only works for multiplication: log(2 x 5) = log 2 + log 5, but log(2 + 5) is simply log 7.
Rounding the log too early. Small errors in a log become percentage errors in the number: 10 to the power 3.54 is 3,467, while 10 to the power 3.5378 is 3,450. Keep the full log until the last step.
Expecting a negative log to mean a negative number. A negative log just means the number is between 0 and 1: log base 10 of 0.01 is −2.
Popular calculations
Each opens the calculator with those numbers filled in, and they can be changed once it is open.
Log base 10
Natural log, ln
Log base 2
Other bases
Antilogs, a base to a power
Finding the base
How this was checked
Logs come from the browser’s built in ln, log10 and log2 functions, which are accurate well beyond the 10 figures shown, and every answer was checked by raising the base to the answer and comparing with the number. Exact answers were checked against known powers, such as 2 to the power 10 = 1,024, 3 to the power 4 = 81 and 4 to the power 3/2 = 8, and results were compared with published values such as ln 2 = 0.6931471806 and log10 2 = 0.3010299957.
Every address in the lists above was then opened and checked for a distinct title, the right answer, a curve and ruler that render, and clean CSV, image and print output containing only that calculation, at desktop, tablet and phone widths.
Common questions
What is a logarithm?
A logarithm is an exponent. log base b of x is the power you raise b to in order to get x. log base 10 of 1,000 is 3 because 10 to the power 3 is 1,000, and log base 2 of 8 is 3 because 2 x 2 x 2 = 8.
What is the difference between log and ln?
ln is the natural log, to base e = 2.718281828. log usually means base 10 on calculators, but in higher maths and many programming languages it means the natural log. They differ by a fixed factor: ln x = 2.302585 x log10 x.
How do you work out a log with a different base?
Use the change of base rule: log base b of x = ln x ÷ ln b, or log x ÷ log b with base 10 logs. For log base 3 of 10: 2.302585 ÷ 1.098612 = 2.0959. Check: 3 to the power 2.0959 is 10.
What is the log of 0 or a negative number?
It is not defined for real numbers. A positive base raised to any power is always positive, so no power gives 0 or a negative result. As the number gets closer to 0, its log falls without limit.
What is an antilog?
The antilog undoes a log: it raises the base to the given power. The antilog of 3.5 in base 10 is 10 to the power 3.5 = 3,162.28, and the antilog of 1 in base e is e itself, 2.718281828.
Why is the log of 1 always 0?
Any base raised to the power 0 is 1, so the log of 1 is 0 whatever the base. Numbers between 0 and 1 have negative logs, and numbers above 1 have positive logs when the base is above 1.
Related Calculators and Reference
- Scientific Calculator: logs inside longer expressions.
- Square Root Calculator: roots are fractional powers, the other half of exponents.
- Compound Interest Calculator: the growth that logs undo, such as time to double.
- Binary, Hex and Decimal Converter: log base 2 counts binary digits.
- Half Life Calculator: logarithms at work in radioactive decay and carbon dating.
- NIST DLMF 4.2: Logarithm definitions: the formal definitions and the change of base rule.
