CalculateItNow home

Log Calculator

Logarithm of any number to base 10, e, 2 or any base you choose — with the change-of-base step, an antilog check, and ln, log₁₀ and log₂ side by side.

Log Calculator: with the default inputs, logarithm is 10.

Try an example
Logarithm
10
Check (base to that power)
2^10 = 1,024
Natural log ln(x)
6.93147181
Common log log₁₀(x)
3.01029996
Binary log log₂(x)
10
Assumptions
  • Results that are within 10⁻⁹ of an integer and check exactly (base^n = number) are snapped to that integer.
  • Only real logarithms are computed: the number must be positive and the base positive and not 1.
Powers of 2 around your number
Exponent2 to that power
664
7128
8256
9512
101,024◀ your number, 1,024, sits between this row and the next
112,048
124,096
138,192
1416,384

The logarithm is the exponent. 1,024 lies between 1,024 and 2,048, so its log is between 10 and 11.

Math verified by automated testsUpdated 2026-09-082 sources cited

How this is worked out

The formula

log_b(x) = y  ⇔  bʸ = x
Change of base:  log_b(x) = ln(x) ÷ ln(b) = log₁₀(x) ÷ log₁₀(b)
log(xy) = log x + log y,   log(x/y) = log x − log y,   log(xⁿ) = n·log x
log_b(1) = 0,   log_b(b) = 1

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

Number (argument)
Must be positive.defaults to 1024
Base
Choose one of 4 options.10 (common log) · e (natural log, ln) · 2 (binary log) · Custom base
Custom base
Used only when Base is set to Custom. Must be positive and not 1.0 or more · defaults to 3

What you get back

Logarithmmain answer
Check (base to that power)
Natural log ln(x)
Common log log₁₀(x)
Binary log log₂(x)

What this assumes

  • Results that are within 10⁻⁹ of an integer and check exactly (base^n = number) are snapped to that integer.
  • Only real logarithms are computed: the number must be positive and the base positive and not 1.

About this calculator

A logarithm answers the question "what exponent do I need?" log₂(1024) = 10 because 2¹⁰ = 1024. It is the inverse of raising to a power, the same way subtraction undoes addition. Logarithms turn multiplication into addition and powers into multiplication, which is why they show up wherever quantities grow by factors: decibels, pH, earthquake magnitudes, compound interest, algorithm running times.

How to use it

Enter the number and choose the base. Base 10 is the "common log" on most calculators (log), base e ≈ 2.71828 is the natural log (ln) used throughout calculus and science, and base 2 is what computer science uses. Pick Custom for anything else. The results include all three standard logs so you can compare them, and an antilog check that raises the base back to the answer.

Change of base

Calculators only have log and ln buttons, yet you can compute any base: log_b(x) = ln(x) ÷ ln(b). The steps show exactly that division. Because all logarithms are proportional to each other, the base is really a choice of unit — log₂ and log₁₀ differ only by the constant factor log₁₀(2) ≈ 0.30103.

Reading the answer

  • log_b(x) is positive when x > 1, zero when x = 1, and negative when 0 < x < 1.
  • Each whole step in log₁₀ is a factor of 10: log₁₀(1000) = 3, log₁₀(0.01) = −2. The integer part tells you the number of digits (minus one); the fractional part tells you the leading digits.
  • The log of 0 does not exist (it heads to −∞), and negative numbers have no real logarithm. The calculator returns an error rather than NaN for both.

Common mistakes

  • log(a + b) is not log a + log b. Only products split: log(ab) = log a + log b.
  • Confusing ln and log. On a scientific calculator "log" usually means base 10; in higher math and most programming languages "log" means the natural log.
  • Forgetting the base entirely. log(8) is 0.903 in base 10 but exactly 3 in base 2.

Frequently asked questions

What is a logarithm, simply?

The exponent you need to raise the base to in order to get the number. log₁₀(1000) = 3 because 10³ = 1000.

How do I calculate a log with a base my calculator doesn't have?

Divide two logs you do have: log_b(x) = ln(x) ÷ ln(b). For log₃(81): ln 81 ÷ ln 3 = 4.394 ÷ 1.099 = 4.

What's the difference between log and ln?

ln is the logarithm with base e (about 2.718); log without a written base usually means base 10 on calculators and in engineering, but base e in most math texts and programming languages. Check the convention before you trust a formula.

Why can't I take the log of zero or a negative number?

A positive base raised to any real power is always positive, so there is no exponent that produces 0 or a negative result. log(0) is undefined (tends to −∞); logs of negatives require complex numbers.

Put this calculator on your own site

A working logarithm, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Log Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a logarithm.

All math calculators·Browse everything