Logarithm Calculator

Calculate logarithm to any base or natural log (base e).

Select type, enter value(s) to calculate.

What This Calculator Does

A logarithm asks the reverse question of an exponent: instead of "what does 10 raised to the 2nd power equal," it asks "what power do I need to raise 10 to, to get 100?" This tool answers that for any base you choose, or for the natural logarithm specifically, returning a precise result for values that don't work out to a clean whole number.

How to Use It

Choose a Logarithm Type first: "Logarithm Base N" for a custom base you specify yourself, or "Natural Logarithm" for base e. Enter the Value you want the logarithm of — it must be a positive number, since logarithms of zero or negative numbers aren't defined in real numbers. If you picked Base N mode, also enter the Base itself, which must be positive and can't be exactly 1 (a base of 1 would make every logarithm either undefined or meaningless, since 1 raised to any power is always 1).

The Formula

By definition, log_b(x) = y means b^y = x. Rather than computing that directly, the calculator uses the change-of-base identity, log_b(x) = ln(x) ÷ ln(b), which lets it support any valid base using JavaScript's built-in natural logarithm function. Natural Logarithm mode skips the division entirely and returns ln(x) directly, since that's already what the change-of-base formula reduces to when the base is e.

A Worked Example

log₁₀(100) = 2, because 10² = 100 exactly — enter 100 as the value and 10 as the base in Logarithm Base N mode to confirm it. Switch to Natural Logarithm mode and enter 1, and the result is 0, since e⁰ = 1 for any base, including e — the logarithm of 1 is always zero. For a base other than 10, log₂(8) = 3 works the same way: 2³ = 8, so raising 2 to the power of 3 gets you back to 8.

FAQ

What bases can I use?
Natural log (base e) is a dedicated option, and common log (base 10) or any other base — including base 2 — can be entered in the custom base field.
What is the difference between log and ln?
log usually refers to log₁₀; ln is the natural logarithm (base e ≈ 2.718). Use our dropdown to select.