Logarithm Calculator
Calculate the logarithm of a number in any base, plus the natural log.
Results update as you type.
About this calculator
A logarithm answers the question "what power do I raise the base to, to get this number?" This calculator computes the log in any base you choose (default base 10) and also always shows the natural log (base e) and the common log (base 10), plus a check that raises the base to the result to confirm it returns your number.
It uses the change-of-base rule, log_b(x) = ln(x) / ln(b), so it can work in any base from the natural logarithm. For example, log base 10 of 1000 is 3, because 10^3 = 1000, and the check line shows 10 ^ 3 = 1000. The natural log of the same number, ln(1000), is about 6.908. The input must be positive, and the base must be positive and not equal to 1, since logs are undefined outside those limits.
Logarithms turn multiplication into addition and compress huge ranges, which is why they power the decibel and Richter scales, pH, compound-growth timelines and information theory. They are the inverse of exponentiation, undoing a power to recover its exponent.
Frequently asked questions
What is a logarithm?
It is the inverse of exponentiation. log₁₀(1000) = 3 because 10³ = 1000. The log tells you the exponent needed to reach a number.
What is the change-of-base formula?
To find a log in any base from a calculator that only has ln or log₁₀, use log_b(x) = ln(x) / ln(b).
What is the natural log?
The natural log, written ln, is the logarithm in base e (about 2.71828). This tool shows ln alongside whatever base you pick.
What is the common log?
The common log is the logarithm in base 10, written log or log₁₀. It is also shown automatically regardless of the base you choose.
Why must the number be positive?
You cannot raise a positive base to any real power and get zero or a negative number, so logs of zero or negatives are undefined.
Why can the base not be 1?
One raised to any power is always 1, so a base of 1 could never reach another number — the logarithm is undefined. The base must also be positive.
API — use this calculator from code
Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or JSON. Read the full API docs →
Endpoint
GET https://calculator.free/api/v1/logarithm/
curl
curl "https://calculator.free/api/v1/logarithm/?number=1000&base=10"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/logarithm/?" + new URLSearchParams({
"number": "1000",
"base": "10"
}));
const data = await r.json();
console.log(data.results);
Results are estimates for general guidance only, not financial, medical or tax advice.