🧮
🧮 Math & statistics

Logarithm Calculator (any base, ln, log10)

Results update as you type.

Your numbers

Understanding the logarithm calculator — concept and principle

A logarithm answers the question "to what power must the base be raised to get this number?" Since 10³ = 1,000, the base-10 logarithm of 1,000 is 3. This calculator finds the logarithm of a positive number x in any base you choose and also shows the three standard logarithms: natural (ln, base e), common (log₁₀) and binary (log₂). Logarithms appear in pH, decibels, earthquake magnitudes, compound-interest time, algorithm complexity and any scale that spans many orders of magnitude.

Logarithm as counting multiplications by the base1 times 10 three times gives 1,000, so log base 10 of 1,000 is 3; ln 1,000 is 6.908 and log base 2 is 9.966.log₁₀ 1,000: how many 10s make 1,000?110×101100×1021,000×103steps3 steps → log₁₀ 1,000 = 3Same number, other bases (ln x ÷ ln b):ln 1,000 = 6.908base e ≈ 2.718log₂ 1,000 = 9.966about 10 doublings6.908 ÷ 2.303 (ln 10) = 3
A logarithm counts how many times the base is multiplied: three 10s make 1,000.

How it is calculated

The number x must be greater than 0, and the base b must be positive and not equal to 1. Both are pure numbers without units.

The principle

By definition, y = log_b(x) means bʸ = x, so the logarithm is the inverse of the exponential function. Because exponents add when powers are multiplied, logarithms turn multiplication into addition: log(xy) = log x + log y. This is why slide rules and log tables made heavy calculation easy before electronic calculators. The change-of-base formula follows directly: if bʸ = x, take the natural log of both sides to get y ln b = ln x, so y = ln x ÷ ln b. Any base works in place of e, which is why a calculator only needs one built-in logarithm.

Worked example

  1. Inputs: x = 1,000, base b = 10.
  2. ln 1,000 ≈ 6.907755279 and ln 10 ≈ 2.302585093.
  3. log₁₀(1,000) = 6.907755279 ÷ 2.302585093 = 3, because 10³ = 1,000.
  4. The other outputs: ln x ≈ 6.907755279, log₁₀ x = 3, log₂ x ≈ 9.965784285 (2¹⁰ = 1,024 is just above 1,000, so the answer is just under 10).
How log_b(x) changes with BaseHow log_b changes with Base24682.557.51012.51520Example: 3Base
Each point is the calculator re-run with only “Base” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Baselog_b(x)
2.57.538824784
54.292029674
7.53.428331393
103
12.52.734955433
152.550822461
202.305865361

How to read the result

The integer part of log₁₀ x tells you the order of magnitude: a result of 3.something means a number in the thousands. A difference of 1 in log₁₀ is a factor of 10; a difference of 1 in log₂ is a doubling. The logarithm is negative for 0 < x < 1, zero at x = 1, and grows slowly for large x.

Common mistakes

Keep in mind: Values come from floating-point arithmetic. For example, ln 1,000 ÷ ln 10 is evaluated as 2.9999999999999996 internally and displayed as 3 after rounding, so treat the last digits of any result as approximate.

Frequently asked questions

What is the difference between ln and log?

ln is always the natural logarithm (base e). "log" usually means base 10 in school and on calculators, but base e in many programming languages, such as Math.log in JavaScript.

How do I solve 2ˣ = 50?

Take a logarithm of both sides: x = log₂ 50 = ln 50 ÷ ln 2 ≈ 5.644.

Why is log₁₀ 2 about 0.301 useful?

It tells you that doubling adds about 0.301 to the common log, so 2¹⁰ ≈ 10³, a handy rule of thumb for powers of two.

Sources: John Napier, Mirifici Logarithmorum Canonis Descriptio (1614) · NIST Digital Library of Mathematical Functions, Chapter 4: Elementary Functions (§4.2, logarithms)

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →