Logarithm Calculator

Calculate logarithms in any base including natural (ln), common (log10), and binary (log2).

By Konstantin Iakovlev · Updated September 2026 · Source: Khan Academy

Base

log₍10.00₎(100)

2.000000

All Bases

Common Log (log₁₀)2.000000
Natural Log (ln)4.605170
Binary Log (log₂)6.643856

Use the Logarithm Calculator above to calculate your results. Enter your values and see instant results — all calculations run in your browser.

Disclaimer: This calculator is for informational purposes only. Results are estimates based on the information you provide and the assumptions described on this page.

How It Works

Taking the logarithm of a number to any base you choose reduces to a single entry here. Pick base 10, base e (the natural log, ln), base 2, or any custom base; the results table also lists the common (log10), natural (ln), and binary (log2) logarithms of the same number.

Behind the scenes the change-of-base formula does the work: log_b(x) = log_c(x) / log_c(b), where 'c' is some base that's easy to compute, usually 'e' for natural log or '10' for common log. To find log base 5 of 125, for instance, the tool evaluates ln(125) / ln(5), or equivalently log10(125) / log10(5).

Two conditions keep the result real: the base has to be positive and not equal to 1, and the argument—the number you're taking the log of—has to be positive. Asking for the logarithm of zero or a negative number is the usual stumbling block, because it has no value in the real numbers. It also helps to recall that ln is simply log base 'e', with 'e' approximately 2.71828.

Example: Binary Logarithm of 4096

  1. 1 How many bits does it take to give each of 4,096 memory locations its own address? Enter 4096 as the number and choose Base 2.
  2. 2 The calculator evaluates log2(4096) = ln(4096) / ln(2) = 8.317766 / 0.693147.
  3. 3 The result is 12.000000. The All Bases table also shows log10(4096) = 3.612360 and ln(4096) = 8.317766.
  4. 4 So 2^12 = 4,096: 12 bits are enough to give 4,096 locations unique addresses, numbered 0 to 4,095.

Source: Khan Academy · Last updated: September 2026

Frequently Asked Questions

What is a logarithm in simple terms?
A logarithm answers the question: "What exponent do I need?" For example, log base 2 of 8 = 3 because 2³ = 8. It is the inverse of exponentiation.
What is the difference between ln and log?
ln (natural log) uses base e (2.71828...) and is common in science and calculus. log (common log) uses base 10 and is common in engineering. When written without a base, "log" usually means base 10 in the US.
How do you convert between log bases?
Use the change of base formula: log_b(x) = ln(x)/ln(b) = log(x)/log(b). For example, log base 3 of 81 = ln(81)/ln(3) = 4.394/1.099 = 4.