Home›Math›Log Calculator

Log Calculator — Logarithms in Any Base, Plus ln and log₂

A logarithm answers one question: “what power?” Type a value and a base and get the logarithm instantly — with log base 10, the natural log and log base 2 alongside, plus the antilog check that proves the answer.

100% FreeNo sign-up neededInstant results

Your logarithm

The number you are taking the log of. It must be greater than 0.
The base of the logarithm — any positive number except 1. Here, 2.

🔒 All calculations happen in your browser — no data leaves your device.

The answer

log base 2 of 32
5
2 raised to the power 5 gives exactly 32.
Common log — log₁₀(32)1.5051
Natural log — ln(32)3.4657
Binary log — log₂(32)5.0000
Antilog check2^5 = 32
Read it backwards: log₂(32) = 5 because 2 multiplied by itself 5 times makes 32 — 2 × 2 × 2 × 2 × 2 = 32. The logarithm is simply the exponent, found.

The log curve — growth that flattens

y = log₂(x): the curve climbs steeply at first, then crawls — reaching 32 only earns a height of 5.

x y (32, 5) Each doubling of x adds exactly 1 to the height — that is the whole personality of a logarithm.
The log curve for your base Your value on the curve
Key takeaways
  • A logarithm is simply the exponent, found: at the defaults, log base 2 of 32 is 5 because 2 raised to the power 5 gives exactly 32.
  • Whatever base you enter, the page also shows log₁₀, ln and log₂ of your value side by side, with an antilog check (base^result = your number).
  • Flip to the antilog mode to run it backwards — enter the log result y and the base, and get x = base raised to that power.

Keep exploring

Three companion tools for powers and big numbers.

How it works

One question, answered three ways at once.

1

Enter the value

The number whose log you want — any positive value, from a fraction like 0.2 to a million.

2

Choose the base

Use the presets for the famous three — 2, 10 and e — or type any base of your own.

3

Read the power

The result is the exponent the base must be raised to. The antilog check raises it back, so you can watch the round trip land on your number.

The math behind the log

A logarithm is an exponent in disguise. log_b(x) asks: “to what power must I raise b to get x?” For the default: log₂(32) = 5 because 2⁵ = 32. Calculators only natively know two logs — ln and log₁₀ — so every other base is reached with the change-of-base formula: log_b(x) = ln(x) ÷ ln(b). Check it: ln(32) ÷ ln(2) = 3.4657 ÷ 0.6931 = 5.0000.

log_b(x) = y means b^y = x · change of base: log_b(x) = ln(x) ÷ ln(b) · log(1) = 0 in every base

Worked examples:

QuestionWorkingResult
log₂(32)2 × 2 × 2 × 2 × 2 = 32 — five doublings5
log₁₀(1000)10³ = 10003
ln(e), value 2.718281828, base ee¹ = e1
log₅(0.2)5⁻¹ = 1 ÷ 5 = 0.2−1

The boundary cases: the log of 1 is 0 in every base (any base to the power 0 is 1). Values between 0 and 1 give negative logs, like log₅(0.2) = −1. And 0 itself — and every negative number — has no logarithm at all, because no power of a positive base can produce them; the calculator flags those instead of guessing.

Go deeper

How change of base really works — and why three logs get their own names.

No calculator stores a button for every base. It stores two and derives the rest:

  • The formula: log_b(x) = ln(x) ÷ ln(b) — or with log₁₀ on top and bottom instead; the answer is identical either way.
  • Why it works: if b^y = x, taking ln of both sides gives y · ln(b) = ln(x), so y = ln(x) ÷ ln(b). The unknown exponent falls straight out.
  • A worked check: log₅(0.2) = ln(0.2) ÷ ln(5) = (−1.6094) ÷ 1.6094 = −1 — exactly, because 0.2 is 1/5.
  • One ratio, any base: this is why a single ln key can serve every logarithm you will ever need.

Three bases earn nicknames because three different worlds run on them:

  • log₁₀ — the common log: built for our decimal system. It powers the Richter scale, decibels and pH, where each +1 means “ten times as much”.
  • ln — the natural log (base e): the log of continuous growth. Interest, populations and radioactive decay all speak ln, and calculus treats it as the default.
  • log₂ — the binary log: the log of doubling. Computer science counts in log₂ — bits, binary search steps, and how many times data can be halved.
  • Same shape, different ruler: every log curve looks alike; the base only changes the scale it is read against.

Base 10, base e, base 2: the three logs you will actually meet

Three bases do almost all the work. Base 10 is the common logarithm, written log or log₁₀, and it is the base of decimal counting: log₁₀(1000) = 3, log₁₀(100) = 2, log₁₀(10) = 1, log₁₀(1) = 0, and log₁₀(0.01) = −2. It is the base of the pH scale, the Richter scale, and the decibel scale, and it is the log button on most calculators.

Base e is the natural logarithm, written ln, where e ≈ 2.71828 is the number that grows continuously. The natural log is the base of calculus and of continuous growth: ln(e) = 1, ln(10) ≈ 2.3026, ln(2) ≈ 0.6931, and ln(100) ≈ 4.6052. The value ln(2) ≈ 0.693 is the one most worth memorising: it is the doubling constant, and it appears in half-life, in compound interest, and in the rule of 72. Base 2 is the binary logarithm, written log₂, and it is the base of computing: log₂(1024) = 10, because 2¹⁰ = 1024, and log₂(10) ≈ 3.3219. Every doubling adds 1 to a base-2 log, which is why it measures information in bits.

What the log button does on your calculator

A scientific calculator usually has two log buttons, and they are different functions. The log button is the common logarithm base 10: log(1000) = 3. The ln button is the natural logarithm base e: ln(10) ≈ 2.3026. The two are linked by change of base: ln(x) = log(x) × 2.3026, so either one can be found from the other, but they are not the same number, and mixing them up is the commonest calculator error with logs.

For any other base, use the change-of-base rule: logₘ(x) = ln(x) ÷ ln(b), where any log the calculator knows can go on top and bottom. To find log₅(0.2), take ln(0.2) ÷ ln(5), which is −1.6094 ÷ 1.6094 = −1 — and the check confirms it, since 5⁻¹ = 0.2. Two values cover most hand calculations: log₁₀(2) ≈ 0.3010 and ln(2) ≈ 0.6931, and from log₁₀(2) alone, the log of 4 follows by the power rule (2 × 0.3010 = 0.6020) and the log of 5 by the quotient rule (1 − 0.3010 = 0.6990).

Frequently asked questions

Quick answers about logarithms.

What is a logarithm?

A logarithm is the inverse of a power. log_b(x) asks: “to what power must b be raised to get x?” So log₂(32) = 5 because 2⁵ = 32, and log₁₀(1000) = 3 because 10³ = 1000. If exponentiation builds the number, the logarithm takes it apart and reports the exponent.

How do I calculate a log with an unusual base?

Use change of base: log_b(x) = ln(x) ÷ ln(b). Any log your calculator knows can go on top and bottom. For example log₅(0.2) = ln(0.2) ÷ ln(5) = −1. This calculator does it for you — just type the base — and shows log₁₀, ln and log₂ of the same value alongside for comparison.

What is the natural logarithm (ln)?

ln is the logarithm with base e, where e ≈ 2.718281828 is Euler’s number — the base of continuous growth. By definition ln(e) = 1, exactly as this calculator confirms when you enter the value 2.718281828 with the base-e preset. ln appears wherever things grow or decay smoothly: compound interest, populations and half-lives.

Why can’t I take the log of 0 or a negative number?

Because no power of a positive base ever reaches them. 2 raised to anything — positive, negative, fractional — stays positive: big powers give big numbers, negative powers give small fractions creeping toward 0 but never touching it. So log(0) and log of a negative number are undefined for real numbers, and the calculator shows a friendly error rather than a fake answer.

Which bases are allowed for a logarithm?

Any positive number except 1. Base 1 is useless and undefined — 1 raised to any power is still 1, so it can never produce any other value, and the change-of-base formula would divide by ln(1) = 0. Bases at or below 0 break down the same way. Bases between 0 and 1 are legal and simply give decreasing curves (and negative results for values above 1).

What is an antilog?

The antilog is the logarithm run backwards: if log_b(x) = y, then the antilog of y in base b is b^y = x. Every result on this page carries an antilog check — for the default, 2^5 = 32 — so you can see the answer undo itself and land exactly on the number you started with.

What does the log button do on a calculator?

The log button is the common logarithm base 10: log(1000) = 3. The ln button is the natural logarithm base e: ln(10) ≈ 2.3026. They are different functions, linked by change of base: ln(x) = log(x) × 2.3026.

What is log base 10 of 2?

About 0.3010. It is one of the handful of values worth memorising, because the log rules build so much from it: log₁₀(4) = 2 × 0.3010 = 0.6020, and log₁₀(5) = 1 − 0.3010 = 0.6990.

What is the log of 1?

Zero, in every base, because any base raised to the power 0 is 1. A log of zero does not mean the number is zero — it means the number is one. The log of the base itself is 1 in that base.

More tools for powers, roots and large numbers.

Disclaimer

This calculator is for learning and quick reference. Results are rounded to 4 decimal places in the comparison rows, and the antilog check uses the unrounded result — tiny floating-point dust in the last decimal is normal and is not an error in your working.

↑