Log Calculator

Calculate logarithms in any base — log₁₀ (common log), ln (natural log), log₂ (binary log), or any custom base. Also calculate antilogarithms.

Logarithm

FunctionNotationResult
Common loglog₁₀(100)2
Natural logln(100)4.605170186
Binary loglog₂(100)6.6438561898
Custom baselog5(100)2.8613531161

Log Reference Table

Numberlog₁₀lnlog₂
0.001-3-6.907755279-9.9657842847
0.01-2-4.605170186-6.6438561898
0.1-1-2.302585093-3.3219280949
1000
20.30102999570.69314718061
e0.434294481911.4426950409
1012.3025850933.3219280949
10024.6051701866.6438561898
100036.9077552799.9657842847
PropertyRule
Product rulelog(ab) = log(a) + log(b)
Quotient rulelog(a/b) = log(a) − log(b)
Power rulelog(aⁿ) = n · log(a)
Change of baselogb(x) = ln(x) / ln(b)
logb(1)= 0 for any base b
logb(b)= 1 for any base b

Ask for the logarithm of 100 and this page returns 2 in base 10, 4.605170186 in base e and 6.6438561898 in base 2: three answers to one question. Which one 'log' means depends on where you learned it. School calculators say base 10, JavaScript, Python and C use the natural logarithm, and computer science papers usually mean base 2. Pick the base you actually need, or type your own.

Change of base, with one number run through four logs

A logarithm answers one question: what power of the base gives this number? Writing log_b(x) = y means b^y = x. The page uses built-in functions for base 10, base e (ln) and base 2, and the change-of-base rule for any other base: log_b(x) = ln(x) ÷ ln(b). The Antilogarithm tab runs the reverse, antilog_b(y) = b^y.

Worked example with x = 250 and a custom base of 5. log10(250) = 2.3979400087, ln(250) = 5.5214609179 and log2(250) = 7.9657842847. For base 5, ln(250) ÷ ln(5) = 5.5214609179 ÷ 1.6094379124 = 3.4306765581. Going backwards, 5^3.4306765581 returns 250.00000001, the extra digits being rounding. On the Antilogarithm tab, x = 2.39794 with base 10 gives 249.99999501, because 2.39794 is a shortened version of the true log.

The identities in the page's property table give useful cross-checks. Since log(ab) = log a + log b, log10(250) should equal log10(25) + log10(10) = 1.39794 + 1 = 2.39794, and it does. The power rule log(aⁿ) = n × log(a) is why log10(1000) is exactly 3 × log10(10).

What the calculator does not do. It works only with real numbers: zero and negatives get the message 'Logarithm is undefined for numbers ≤ 0', and a custom base that is zero, negative or exactly 1 simply makes the custom row disappear. Values are rounded to 10 decimals, with no error bound beyond double-precision arithmetic of roughly 15 to 16 digits. Change-of-base can leave tiny residue before rounding, for example ln(1000) ÷ ln(10) is stored as 2.9999999999999996 while the built-in log10 gives exactly 3, which is why the page rounds. There are no complex logarithms.

How to Use This Calculator

  1. Stay on the Logarithm tab and type a number greater than zero in the Number box.
  2. Optionally change the Custom Base (it starts at 5). Any positive number except 1 works; clearing it hides that row.
  3. Read the table: common log (base 10), natural log, binary log (base 2) and the custom-base row.
  4. Compare with the Log Reference Table on the right, which lists 0.001 to 1000 and the constant e. The row matching your number is shaded.
  5. To reverse a log, switch to the Antilogarithm tab, enter the exponent value and the base, and read b^x, rounded to 8 decimals.

Frequently Asked Questions

Why is the log of 0.5 negative?

Any number between 0 and 1 has a negative log, because the base must be raised to a negative power to give a fraction. log10(0.5) is -0.3010299957, and 10^-0.3010299957 brings you back to 0.5.

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

No real power of a positive base ever produces zero or a negative result. As the input shrinks toward zero the log falls without limit, so the page declines instead of printing a misleading number.

How do I use log base 2 for storage or bits?

The bits needed to tell N options apart is the log base 2 of N, rounded up. For 250 values, log2(250) = 7.97, so you need 8 bits, which covers up to 256.

Is antilog the same as 10 to the power x?

Only when the base is 10, which is the box's starting value. The tab accepts any positive base other than 1, so antilog base 2 of 8 is 256 and antilog base 5 of 3 is 125.

Why do I get a tiny error such as 2.9999999999999996 in other tools?

Computers store most decimals in binary, so a division of two natural logs may land a hair below the whole number. This page rounds to 10 decimals, which hides that residue for ordinary inputs.

Can I use this for pH or decibels?

The arithmetic fits. pH is the negative log base 10 of hydrogen-ion concentration, so entering 0.0000001 returns -7, meaning pH 7. A 100-fold power ratio is 10 × log10(100) = 20 decibels. Apply the scaling factor yourself; the page returns only the raw log.