How to calculate a logarithm
- Enter the base (10, e, 2 or any positive number except 1) and the number x. You can type scientific notation such as 3e8, fractions like 1/8, or "e" and "pi".
- Read the logarithm, with a check that raises the base to the result.
- The table also shows the common, natural and binary logarithms and the antilog (base raised to x).
What a logarithm is
A logarithm answers the question "to what power must I raise the base to get this number?". log₁₀(1000) = 3 because 10³ = 1000, and log₂(8) = 3 because 2³ = 8. The natural logarithm ln uses Euler's number e ≈ 2.71828 and appears throughout science, finance and statistics, for example in continuous growth and decay. Any base can be computed with the change-of-base rule: logᵦ(x) = ln(x) ÷ ln(b).
Logarithms turn multiplication into addition (log(ab) = log a + log b) and powers into multiplication (log aⁿ = n log a), which is why they power slide rules, decibels, the Richter and pH scales, information theory (bits are base-2 logarithms) and compound interest calculations. They are only defined for positive numbers, and log of 1 is 0 in every base. Calculations use double precision and results that are integers within rounding error are shown exactly. Everything runs in your browser.
What is the difference between log and ln?
log usually means base 10; ln is the natural logarithm with base e.
Why can't I take the log of a negative number?
No real power of a positive base gives a negative result, so the logarithm is undefined for x ≤ 0.
How do I calculate log base 2?
Set the base to 2, or tap log₂. log₂(x) = ln(x) ÷ ln(2).