Calculate logarithms in any base — log₁₀ (common log), ln (natural log), log₂ (binary log), or any custom base. Also calculate antilogarithms.
| Function | Notation | Result |
|---|---|---|
| Common log | log₁₀(100) | 2 |
| Natural log | ln(100) | 4.605170186 |
| Binary log | log₂(100) | 6.6438561898 |
| Custom base | log5(100) | 2.8613531161 |
| Number | log₁₀ | ln | log₂ |
|---|---|---|---|
| 0.001 | -3 | -6.907755279 | -9.9657842847 |
| 0.01 | -2 | -4.605170186 | -6.6438561898 |
| 0.1 | -1 | -2.302585093 | -3.3219280949 |
| 1 | 0 | 0 | 0 |
| 2 | 0.3010299957 | 0.6931471806 | 1 |
| e | 0.4342944819 | 1 | 1.4426950409 |
| 10 | 1 | 2.302585093 | 3.3219280949 |
| 100 | 2 | 4.605170186 | 6.6438561898 |
| 1000 | 3 | 6.907755279 | 9.9657842847 |
| Property | Rule |
|---|---|
| Product rule | log(ab) = log(a) + log(b) |
| Quotient rule | log(a/b) = log(a) − log(b) |
| Power rule | log(aⁿ) = n · log(a) |
| Change of base | logb(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.
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.
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.
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.
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.
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.
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.
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.