Log Calculator
Calculate logarithms in any base, natural log, log base 10, and antilogarithms.
| x | log₂(x) | ln(x) | log₁₀(x) |
|---|---|---|---|
| 1 | 0 | 0 | 0 |
| 2 | 1 | 0.6931 | 0.3010 |
| 4 | 2 | 1.3863 | 0.6021 |
| 8 | 3 | 2.0794 | 0.9031 |
| 10 | 3.3219 | 2.3026 | 1 |
| 16 | 4 | 2.7726 | 1.2041 |
| 100 | 6.6439 | 4.6052 | 2 |
| 1000 | 9.9658 | 6.9078 | 3 |
Compute logarithms in any base, natural log (ln), log base 10, or reverse a logarithm back to its original number with the antilog.
How Log Calculator Works
A logarithm log_b(x) answers the question "b raised to what power equals x?" The calculator uses the change-of-base formula, log_b(x) = ln(x) / ln(b), which lets it compute a logarithm in any base using only the natural logarithm — avoiding the need for a separate calculation method per base.
Natural log (ln) and log base 10 are simply special cases where the base is e (≈2.71828) or 10 respectively, and are computed directly using JavaScript's built-in, high-precision logarithm functions.
Antilog reverses the process: given a logarithm's result y and its base, it raises that base to the power y (b^y, or e^y for the natural antilog) to recover the original number the logarithm came from.
See It In Action
Who Uses Log Calculator and Why
- Solving an exponential growth or decay equation from an algebra or pre-calculus class.
- Converting a logarithmic result between different bases using the change-of-base relationship.
- Reversing a known logarithm value back to its original number using antilog.
- Computing a natural log (ln) directly for a calculus problem involving continuous growth or decay.
Mistakes to Avoid
- Trying to take the log of zero or a negative number — logarithms are only defined for positive inputs, since no real power of a positive base ever produces a non-positive result.
- Confusing plain 'log' (commonly base 10 in most math and science contexts) with 'ln' (specifically base e), and using the wrong one for a formula that requires a specific base.
- Using the antilog with a different base than the original logarithm was computed in, which won't recover the correct original number.
Tips for Best Results
- When comparing a logarithm across different bases, remember they're all just scaled versions of each other via log_b(x) = ln(x)/ln(b) — a useful sanity check.
- Always match the antilog's base to whichever base the original log calculation used, or the reversal won't reproduce the original number.
Fixing Common Problems
I get an error or undefined result. — You likely entered zero or a negative number — logarithms are only defined for positive real numbers, since a positive base raised to any real power always produces a positive result.
Terms Explained
Change-of-base formula: The identity log_b(x) = ln(x)/ln(b), which lets any logarithm be computed using only the natural log function.
Antilogarithm: The reverse of a logarithm — given a log result y in base b, the antilog recovers the original number by computing b^y.