Work out log_b(x) for any base, the natural log ln(x), log₁₀ and log₂ at once, or switch to antilog mode to calculate bʸ. Every answer comes with the change-of-base working and a check.
Last updated:
log2(8) = 3
log₂(x)–
ln x (base e)–
log₁₀ x–
log₂ x–
Change-of-base steps
102.5 = 316.2
Antilog: 10^y–
eʸ–
10ʸ–
2ʸ–
Steps
Examples
Advertisement
How to use the Logarithm Calculator
Enter the number x you want the logarithm of. It must be positive. You can type decimals, fractions like 1/8, 2.5e-4 or e.
Choose the base: e for ln, 10 for the common log, 2 for the binary log, or Custom to type any base b.
Press Calculate (results also update as you type) to see log_b(x) along with ln, log₁₀ and log₂ of the same number.
Read the steps to see the change-of-base formula ln(x) / ln(b) worked out.
Switch to Antilog to go the other way: enter a base and a value y to get bʸ.
Logarithm rules
Rule
Formula
Example
Definition
log_b(x) = y ⇔ bʸ = x
log₂ 32 = 5 because 2⁵ = 32
Product
log_b(xy) = log_b x + log_b y
log 200 = log 2 + log 100 ≈ 0.30103 + 2
Quotient
log_b(x/y) = log_b x − log_b y
ln(e³/e) = 3 − 1 = 2
Power
log_b(xⁿ) = n · log_b x
log₂ 8⁴ = 4 × 3 = 12
Change of base
log_b x = ln x / ln b
log₅ 100 = 4.60517 / 1.60944 ≈ 2.86135
Log of 1
log_b 1 = 0
ln 1 = 0
Log of the base
log_b b = 1
log₁₀ 10 = 1
Reciprocal base
log_b x = 1 / log_x b
log₈ 2 = 1/3
Worked example: log base 3 of 20
Ask: 3 to what power gives 20? Since 3² = 9 and 3³ = 27, the answer is between 2 and 3.
Change of base: log₃ 20 = ln 20 / ln 3.
ln 20 ≈ 2.9957323 and ln 3 ≈ 1.0986123.
2.9957323 / 1.0986123 ≈ 2.7268330.
Check: 3^2.7268330 ≈ 20.000000.
Common logarithm values
x
log₁₀ x
ln x
log₂ x
0.5
−0.30103
−0.69315
−1
1
0
0
0
2
0.30103
0.69315
1
e ≈ 2.71828
0.43429
1
1.44270
3
0.47712
1.09861
1.58496
5
0.69897
1.60944
2.32193
10
1
2.30259
3.32193
100
2
4.60517
6.64386
1000
3
6.90776
9.96578
Frequently asked questions
What is a logarithm?
A logarithm is the power you must raise the base to in order to get the number. log₂ 8 = 3 because 2³ = 8, and log₁₀ 1000 = 3 because 10³ = 1000.
How do I calculate a log with a different base?
Use the change-of-base formula: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). For example log₃ 20 = ln 20 / ln 3 = 2.995732 / 1.098612 ≈ 2.726833.
What is the difference between log and ln?
ln is the natural logarithm with base e ≈ 2.71828. log usually means base 10 in science and on calculators, but in computer science it often means base 2. This calculator shows all three for the same number.
Why can't I take the log of 0 or a negative number?
A positive base raised to any real power is always positive, so no real exponent gives 0 or a negative number. log(0) tends to minus infinity and logs of negative numbers are only defined with complex numbers.
What is an antilog?
The antilog is the inverse of a logarithm: antilog_b(y) = bʸ. For base 10, antilog(2.5) = 10^2.5 ≈ 316.2278. For the natural log, the antilog is eʸ.
Why can't the base be 1?
1 raised to any power is 1, so log base 1 could never give any other number. The base must be positive and different from 1.
What is log base 2 used for?
log₂ tells you how many times you can halve a number or how many bits are needed. log₂ 1024 = 10, so 10 bits can store 1024 different values.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.