Log Calculator
Enter a number and a base to get the logarithm, together with ln, log base 10 and log base 2. The antilog check confirms the result.
Last updated November 4, 2026
Must be greater than 0.
Greater than 0 and not 1. Use 2.71828 for natural log.
Result
log base 2 of 8 = 3
| Logarithm | Value |
|---|---|
| ln (base e) | 2.079442 |
| log10 | 0.90309 |
| log2 | 3 |
| Antilog 2^3 | 8 |
Values are rounded to 10 significant digits.
Show the work
Formula: log_b(x) = ln(x) / ln(b) (change of base); check: b^result = x
- ln(8) = 2.079442 and ln(2) = 0.693147.
- Divide: 2.079442 / 0.693147 = 3.
- Check: 2^3 = 8, which returns x.
Result: log base 2 of 8 = 3
The change of base formula
log_b(x) = ln(x) / ln(b)
check: b^log_b(x) = x
The logarithm log_b(x) answers the question: what power must b be raised to in order to get x? Since 2^3 = 8, log base 2 of 8 is 3.
For any base, the calculator divides the natural logarithm of x by the natural logarithm of b. Answers within a hair of a whole number are rounded, so log2(8) shows exactly 3 instead of 2.9999999999999996.
The antilog check raises the base to the answer and should return your original number, apart from rounding.
See how we calculate for the formulas, sources and review schedule behind every calculator.
Allowed values
The number x must be greater than 0, because no power of a positive base is zero or negative. The base must be greater than 0 and not equal to 1, since 1 to any power is 1.
Bases between 0 and 1 are allowed and give a negative answer for numbers above 1: log base 0.5 of 8 is -3. For the natural logarithm use the base 2.71828 or read the ln row.
How to use the Log Calculator
- Enter the number x, which must be above 0.
- Enter the base b, above 0 and not 1.
- Read the logarithm, and the ln, log10 and log2 quick results.
- Check the antilog row, or open Show the work, Copy, Print or Share.
Worked example
Log base 2 of 8 is ln 8 / ln 2 = 2.0794415 / 0.6931472 = 3, and 2^3 = 8 confirms it.
| Expression | Result | Check |
|---|---|---|
| log2(8) | 3 | 2^3 = 8 |
| log10(1000) | 3 | 10^3 = 1000 |
| log3(81) | 4 | 3^4 = 81 |
| log5(0.04) | -2 | 5^-2 = 0.04 |
| log2(10) | 3.321928 | 2^3.321928 = 10 |
Frequently asked questions
What is the difference between log and ln?
Log usually means base 10 and ln means base e, about 2.71828. This page shows both, along with log base 2, whichever base you choose.
Why can I not take the log of zero or a negative number?
A positive base raised to any real power is always above zero, so there is no power that produces zero or a negative number.
Why can the base not be 1?
One raised to any power is still 1, so it cannot reach any other number, and the change of base formula would divide by ln 1 = 0.