Find the logarithm of a number in any base, or go the other way and find the number (antilog) or the base. Every answer shows the change-of-base working.
What a logarithm is
A logarithm answers "what power do I raise the base to, to get this number?"
logb(x) = y means by = x
So log₁₀(1000) = 3 because 10³ = 1000, and log₂(8) = 3 because 2³ = 8. The natural log, ln, uses the base e ≈ 2.718281828.
Change of base
Calculators usually have only ln and log₁₀. To get any other base, divide:
logb(x) = ln(x) ÷ ln(b) = log₁₀(x) ÷ log₁₀(b)
Example: log₃(81) = ln 81 ÷ ln 3 = 4.394449 ÷ 1.098612 = 4, and indeed 3⁴ = 81. And log₅(30) = 3.401197 ÷ 1.609438 ≈ 2.113283.
Antilog and finding the base
- Antilog: if logb(x) = y, then x = by. The antilog of 2.5 in base 10 is 102.5 ≈ 316.2278.
- Base: if logb(x) = y, then b = x1/y. If logb(81) = 4, then b = 811/4 = 3.
Limits
- Logs are only defined for x greater than 0. log(0) has no value, and logs of negative numbers are complex numbers, which this calculator doesn't cover.
- The base must be positive and not 1, since 1 to any power is still 1.
- Answers are accurate to about 15 significant digits. Exact whole-number answers, like log₂(1024) = 10, are shown exactly.
Sources
How we checked this
Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:
- Subnormal 1e-320 is rejected, not misread ✓
- log₁₀(1000) = 3 ✓
- log₃(81) = 4 exactly ✓
- ln(10) ≈ 2.3025850930 ✓
- Antilog: 10^2.5 ≈ 316.2277660 ✓
- Base from log_b(81) = 4 is 3 ✓
- 10^400 shown in scientific form, not Infinity ✓
- log of 0 is undefined ✓
Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.
Questions people ask
What is the difference between log and ln?
log usually means base 10 (common log) and ln means base e ≈ 2.71828 (natural log). In some advanced math and programming languages, log means the natural log, so check the context.
How do I calculate a log with a different base?
Use change of base: log_b(x) = ln(x) ÷ ln(b). For log₂(50): ln 50 ÷ ln 2 ≈ 3.912 ÷ 0.6931 ≈ 5.644.
What is an antilog?
The reverse of a log. If log₁₀(x) = 2, the antilog is x = 10² = 100. For natural logs, the antilog of y is eʸ.
Why is log of 0 undefined?
No power of a positive base gives exactly 0. As x gets closer to 0, the log heads toward minus infinity but never reaches a value.
What is log base 2 used for?
Counting doublings and halvings: bits in computing, how many times you can halve something, and half-lives. log₂(1024) = 10.