Log Calculator

Find the logarithm of a number in base 10, base e (ln), base 2 or any base, with exact answers when the number is a power of the base. Or go back the other way with the antilog, with the change-of-base working.

Calculator Numbers & Math Updated Oct 3, 2026
How to Use
  1. Choose log to find a logarithm or antilog to undo one.
  2. Pick the base: 10 (common log), e (natural log, ln), 2 (binary log), or type your own.
  3. Type the number. Decimals, fractions such as 1/8, and numbers like 1e-6 work.
  4. Read the logarithm, plus ln, log₁₀ and log₂ of the same number for comparison.
  5. Show Work gives the change-of-base formula; the graph shows the log curve with your point.
Input
Presets
Log curve
Logarithm
—
ln x
—
log₁₀ x
—
log₂ x
—

Worked Example

pH from a concentration. A solution with [H⁺] = 3.2 × 10⁻⁴ mol/L has pH = −log₁₀(3.2 × 10⁻⁴) = −(log₁₀ 3.2 − 4) = −(0.50515 − 4) = 3.49.

A base the calculator button doesn’t have. log₂ 1000 = ln 1000 ÷ ln 2 = 6.90776 ÷ 0.69315 = 9.96578. Since 2¹⁰ = 1024 is just over 1000, the answer is just under 10, as expected.

The common mistake: splitting a log across a sum. log(100 + 1000) is not log 100 + log 1000 = 5. Logs turn products into sums: log(100 × 1000) = 5, but log(1100) = 3.04139.

Show Work

Enter a number to see the step-by-step working.

Log Rules

Definition
log_b x = y ⇔ bʸ = x
Product
log(ab) = log a + log b
Quotient
log(a/b) = log a − log b
Power
log(aⁿ) = n log a
Change of base
log_b x = ln x ÷ ln b
Special values
log_b 1 = 0, log_b b = 1

Napier’s Shortcut

John Napier published logarithms in 1614 after twenty years of computing them by hand, to save astronomers from long multiplications: with a table, multiplying two numbers becomes adding their logarithms and looking the sum back up. Henry Briggs visited Napier and they agreed on base 10, and Briggs’s 1624 tables of common logarithms to 14 digits were used for over three centuries.

The slide rule, two logarithmic scales sliding past each other, was invented by William Oughtred around 1622 and carried engineers through to the Apollo missions. Today logarithms survive in every scale that compresses huge ranges: decibels, pH, earthquake magnitudes and star brightness.

About This Calculator

This calculator finds logarithms in base 10, e, 2 or any positive base other than 1, and gives the antilog. When the number is an exact power of the base, even a fractional one like log₈ 4 = 2/3, the answer is exact; otherwise it is accurate to 12 significant figures. It also handles numbers far beyond a calculator’s range, such as 1e500.

Everything runs in your browser; nothing is sent anywhere.

Related calculators: Exponent Calculator, Root Calculator, and Scientific Calculator.

Frequently Asked Questions

What is a logarithm?

The power you raise the base to in order to get the number. log₁₀ 1000 = 3 because 10³ = 1000; log₂ 8 = 3 because 2³ = 8. A logarithm turns multiplying into adding: log(ab) = log a + log b, which is why it was invented, to make long multiplications quick by hand.

What is the difference between log and ln?

Only the base. ln is the natural logarithm, base e ≈ 2.71828; log usually means base 10 on calculators and in science, though in pure maths and many programming languages log means ln. They differ by a constant: ln x = 2.302585 × log₁₀ x, so ln 10 = 2.302585.

How do I calculate a log in another base?

Use the change-of-base formula: log_b x = ln x ÷ ln b (or log x ÷ log b with any one base). log₂ 1000 = ln 1000 ÷ ln 2 = 6.9078 ÷ 0.6931 = 9.9658. That is why 1,000 items need 10 bits to number them: 2¹⁰ = 1,024.

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

Because a positive base raised to any real power is always positive. No power of 10 gives 0 or −5. As x approaches 0 the logarithm heads to −∞: log₁₀ 0.001 = −3, log₁₀ 0.000001 = −6. (In complex numbers negative logarithms exist: ln(−1) = iπ.)

What is an antilog?

The inverse of a logarithm: antilog_b y = bʸ. If log₁₀ x = 2.5 then x = 10^2.5 = 316.23. In older log tables, the whole-number part of a log₁₀ (the characteristic) sets where the decimal point goes and the fractional part (the mantissa) gives the digits: log₁₀ 2500 = 3.39794, so 3 places and the digits 2500.

How do I use the Log Calculator?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Does it cost anything or need an account?

No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.

Is anything I type uploaded?

No. The tool works entirely on your device, so the values you enter never leave your browser.

Common Use Cases

Chemistry

pH of [H⁺] = 3.2 × 10⁻⁴ mol/L is −log₁₀(0.00032) = 3.49.

Sound

A power ratio of 1,000 is 10 × log₁₀ 1000 = 30 dB.

Computing

log₂ 1,000,000 = 19.93, so a million items need 20 bits.

Growth

Doubling time at 7% a year: ln 2 ÷ ln 1.07 = 10.24 years.

Earthquakes

A magnitude 7 releases 10^1.5 ≈ 31.6 times the energy of a magnitude 6.

Last updated: