Logarithm Calculator (log any base, ln, log10)

Calculate the logarithm of any number in any base, plus natural log (ln) and log base 10 — runs 100% in your browser with no upload.

log10(1000) = 3
ln(1000)   = 6.90775527898
log10(1000) = 3

🔒 Calculated in your browser — nothing is uploaded.

What this calculator does

Enter a number x and a base, and this tool instantly returns three logarithms: the log of x in the base you chose, the natural logarithm ln(x) (base e), and the common logarithm log10(x) (base 10). The answer to a logarithm is the exponent you would raise the base to in order to get x — for example log2(8) is 3 because 2 raised to the 3rd power equals 8. Every result updates live as you type, and each one has its own copy button so you can drop the value straight into your homework, spreadsheet, or code.

The change-of-base formula

Most calculators only offer ln and log10, but this tool computes a logarithm in any base using the change-of-base formula: log in base b of x equals ln(x) divided by ln(b) (equivalently Math.log(x) / Math.log(base) in JavaScript). That is why the same engine can answer log base 2, base 5, base 16, or any positive base other than 1. The logarithm is undefined when x is zero or negative, and the base must be a positive number that is not 1, so those inputs are flagged instead of returning a misleading value.

Frequently asked questions

How do I calculate a log in a base other than 10 or e?

Type your number into the x field and the base you want into the base field. The tool uses the change-of-base formula — ln(x) divided by ln(base) — so it handles any positive base except 1, including base 2, base 5, and base 16.

Why does the calculator refuse some numbers?

Logarithms are only defined for numbers greater than 0, so x must be positive. The base must also be greater than 0 and cannot equal 1, because 1 raised to any power is always 1. When an input breaks these rules the tool shows a short message instead of a wrong answer.

Is anything I type uploaded to a server?

No. Every calculation runs entirely in your browser with JavaScript. The numbers you enter are never sent, stored, or logged anywhere.