Skip to content
Zesona
Logarithm CalculatorLocal

Logarithm Calculator

Compute a logarithm in any base, reporting an exact whole number when there is one - log10(1000) is exactly 3.

  • Free
  • No sign-up
  • Runs in your browser

Input

Runs in your browser

Must be greater than zero.

Leave as 10 for a common logarithm. Any positive base except 1.

How many digits to show when the answer is irrational. An exact answer ignores this.

Banker’s rounding; the IEEE default

Try an example

Ready

Everything happens on this device. No upload, no account, no network request.

How to use this tool

  1. 1

    Enter the number and the base.

  2. 2

    When the answer is a whole number it is reported exactly, rather than as 2.9999999999999996.

Questions about Logarithm Calculator

Why does log10(1000) come out as exactly 3?

Because the tool checks whether the base raised to an integer power equals the input before computing anything. It does here, so the answer is exact. Computing it as ln(1000)/ln(10) in floating point gives 2.9999999999999996, which is the result most calculators show.

Why can the base not be 1?

Because 1 raised to any power is 1, so it can never reach another value - there is no exponent that turns 1 into 5. The logarithm base 1 is undefined for every input except 1 itself.

What does log mean without a base?

It depends on the field, which is why this tool makes it explicit. In most calculators and in engineering, log means base 10. In mathematics and in most programming languages it means the natural logarithm. In computer science it often means base 2.

Why is the logarithm of zero or a negative undefined?

Raising a positive base to any real power always gives a positive result, so no exponent produces zero or a negative. As the input approaches zero the logarithm falls without bound, so there is no value at zero either.

Is my data sent anywhere?

No. This runs as JavaScript in your browser tab: there is no network request carrying your numbers, nothing reaches a server log, and it keeps working with your connection off. You can confirm it in the browser’s network panel.

Other tools you might reach for next.