Logarithm & Antilog Calculator (log, ln, log₂)
Finds the logarithm of a positive number x in base 10, base e, base 2 or any positive base other than 1, using the change-of-base rule log_b x = ln x ÷ ln b, with dedicated base-10 and base-2 functions where they apply. Antilog mode raises the base to an exponent y. Every result also lists the common, natural and binary logs of the same number and splits the common log into its characteristic and mantissa.
Choose Logarithm or Antilog, type the number, and pick a base: 10, e, 2, or Other for any positive base except 1. The headline shows the answer, and the line under it writes the whole equation out, so you can see which question was answered. Below that are the common, natural and binary logs of the same number, the common log split into its characteristic and mantissa, and the change-of-base step the calculator took. In Antilog mode those rows describe the answer: the number you get by raising the base to y.
How the calculation works
A logarithm answers the question "what power of the base gives this number?". If by = x, then y is the logarithm of x to base b, and x is the antilogarithm of y. Any base can be reached from the natural logarithm, ln, by the change-of-base rule that the NIST Digital Library of Mathematical Functions gives as equation 4.2.8:
logb x = ln x ÷ ln b, and the antilog is x = by = ey × ln b
The same section of the DLMF names the base-10 logarithm "the common or Briggs logarithm". It requires the base to be neither 0 nor 1, and it treats ln as a real-valued function only for positive real numbers. That is why this page refuses x of zero or below, and a base that is 1, 0 or negative: no real power of a positive base ever gives zero or a negative number, and every power of 1 is 1.
For bases 10 and 2 the page calls the dedicated functions rather than dividing two natural logs. The division picks up rounding error in the last binary digit, so ln 1000 ÷ ln 10 comes out as 2.9999999999999996 in double precision, while the base-10 function returns exactly 3. Results show up to 10 significant figures, and logs show up to nine decimal places, the same places used for the mantissa. Double precision cannot hold a number beyond about 1.8 × 10³⁰⁸, and below 2.2 × 10⁻³⁰⁸ it starts to lose digits, so the page refuses both rather than showing a wrong figure.
Worked example: the log of 200
With the defaults, x = 200 in base 10, the result is log₁₀ 200 = 2.301029996. In other words, 10 raised to the power 2.301029996 makes 200. The same number has a natural log of 5.298317367 and a binary log of 7.64385619.
The change-of-base row shows the division: ln 200 ÷ ln 10 = 5.298317367 ÷ 2.302585093 = 2.301029996. Switch the base to Other with the default of 3 and the same rule gives log₃ 200 = 4.822736302.
Since 200 is 2 × 10², its common log is 2 plus the log of 2. The characteristic is 2, and the mantissa, 0.301029996, is exactly what the page shows for log₁₀ 2.
Now switch to Antilog. The default exponent, 2.30103, is the log of 200 cut to five decimals, as a five-place table would print it. Raising 10 to that power gives 200.000002. A five-figure mantissa recovers the number to within two millionths.
Napier, Briggs and base 10
John Napier published his Mirifici logarithmorum canonis descriptio in 1614. According to Florian Cajori's A History of Mathematical Notations, Napier coined the word logarithm. MacTutor's biography cautions that "Napier's logarithms are not really to any base". Calling them logarithms to base 1/e is "not unreasonable (but perhaps a little misleading)".
Henry Briggs, the first professor of geometry at Gresham College in London, wrote in March 1615 that Napier "hath set my head and hands a work with his new and admirable logarithms". That summer he visited Napier in Edinburgh and stayed a month. MacTutor reports that Briggs had already suggested base 10 in a letter before they met; at the meeting Napier proposed that the log of 1 should be 0, and Briggs built his tables on both ideas. Briggs came back in 1616 and planned a third visit for the summer of 1617, but Napier died on 4 April 1617.
Briggs published his first table, Logarithmorum chilias prima, in London in 1617. His Arithmetica logarithmica of 1624 "gave the logarithms of the natural numbers from 1 to 20,000 and 90,000 to 100,000 computed to 14 decimal places". Adriaan Vlacq's edition, printed at Gouda in 1628, filled in 20,000 to 90,000.
Cajori traces the abbreviations too: Kepler used "Log." in 1624, and Briggs and William Oughtred also wrote it. Irving Stringham wrote "ln" for the natural logarithm in 1893.
Characteristic and mantissa
Cajori dates the split of a common log into a whole-number characteristic and a decimal mantissa to Briggs's tables of 1617 and 1624. Briggs separated the two with a comma, and he printed log 16503 as "4, 21756, 28996, 6943". This page rounds log₁₀ 16503 to nine places, 4.217562900, and shows it as 4.2175629, and all 14 of Briggs's decimals agree with a modern double-precision value rounded to 14 places.
The split is what made tables practical. Moving the decimal point in a number changes only the characteristic, so one table of mantissas serves 4.36, 436 and 43,600 alike. Oughtred's Clavis, in the 1652 edition Cajori quotes, gives 43600 the log 4,6394865 and 4.36 the log 0,6394865. This page shows 4.639486489 and 0.639486489. Oughtred also wrote the minus sign of a negative characteristic above it, so the mantissa could stay positive.
In that style the log of 0.002, which is −2.698970004, becomes a characteristic of −3 with a bar over the 3, plus the mantissa 0.301029996. That is the mantissa of 200 again. The page reports the characteristic as −3 and the mantissa as 0.301029996. It takes both from the log₁₀ value rounded to nine decimals, so they add up to that rounded value.
e, compound interest and doubling
MacTutor's history of e reports that Nicolaus Mercator used the term "natural logarithm" for logs to base e in his Logarithmotechnia of 1668. In 1683 Jacob Bernoulli, looking at compound interest added more and more often, showed that the limit now written e lies between 2 and 3. MacTutor notes that, if this is taken as the definition of e, it is the first number defined by a limiting process. The letter e first appears in a letter from Euler to Goldbach in 1731. The DLMF notes that ln is also called the Napierian or hyperbolic logarithm. Given MacTutor's caution about Napier's own base, the name is a tribute rather than a description.
Logs to a custom base answer growth questions directly. Money growing at 7% a year doubles when 1.07 raised to n reaches 2, so n = log₁.₀₇ 2. Enter 2 with base 1.07 and the page gives 10.244768351, so the money doubles in about 10.24 years. The rule of 72 estimates 72 ÷ 7 = 10.29.
Base 2 and bits
Claude Shannon's 1948 paper "A Mathematical Theory of Communication" tied the base to a unit: with base 2 "the resulting units may be called binary digits, or more briefly bits, a word suggested by J. W. Tukey". The paper also applied the change-of-base rule, writing log₂ M = log₁₀ M ÷ log₁₀ 2 = 3.32 log₁₀ M, so a decimal digit carries about 3⅓ bits. This page gives log₂ 10 as 3.321928095.
NIST's Guide to the SI, Special Publication 811, lists the ISO symbols: lb x for log₂ x, ln x for logₑ x and lg x for log₁₀ x. A bare "log" has never had one meaning: Cajori records Peano writing log x for base e and Log x for base 10, while Stolz and Gmeiner let log stand for the common logarithm. That is why this page labels every row with its base.
Frequently asked questions
What is the difference between log and ln?
On this page log means the common logarithm, to base 10, and ln means the natural logarithm, to base e; NIST's Guide to the SI writes them lg x and ln x. They measure the same thing on different scales: log 200 is 2.301029996 and ln 200 is 5.298317367. The natural log of any number is always ln 10, about 2.302585093, times its common log.
How do I find the antilog of a number?
Raise the base to that number. The common antilog of 2.30103 is 10 to the power 2.30103, which is 200.000002, and the antilog of −2 is 0.01. For natural logs the antilog is e to the power y, so the antilog of 1 is 2.718281828. Choose Antilog on this page, type the exponent and pick the base.
Why is there no logarithm of zero or a negative number?
A positive base raised to any real power gives a positive result, so no real exponent turns 10 into 0 or into −5. The NIST Digital Library of Mathematical Functions defines ln as real-valued when its argument is a positive real number; logs of negative numbers exist only among the complex numbers, which this page does not handle.
How do I work out log base 2 without a log₂ key?
Divide the common log of the number by the common log of 2, or the natural log by the natural log of 2. For 200 that is log 200 ÷ log 2, or 2.301029996 ÷ 0.301029996, which comes to about 7.644; this page gives 7.64385619. The same change-of-base rule gives a log in any base from the two keys every scientific calculator has.
What are the characteristic and the mantissa of a log?
The characteristic is the whole-number part of a common log and the mantissa is the decimal part, kept between 0 and 1. For 200 they are 2 and 0.301029996. For 0.002 the log is −2.698970004, which old tables wrote as a characteristic of −3 plus the same mantissa 0.301029996, because 0.002 and 200 share the digit 2.
Sources
- NIST Digital Library of Mathematical Functions, §4.2 Logarithms, Powers, and Exponentials: Definitions, National Institute of Standards and Technology
- John Napier (1550 - 1617), biography by J J O'Connor and E F Robertson, MacTutor History of Mathematics, University of St Andrews, 1998
- Henry Briggs (1561 - 1630), biography by J J O'Connor and E F Robertson, MacTutor History of Mathematics, University of St Andrews, 1999
- The number e, by J J O'Connor and E F Robertson, MacTutor History of Mathematics, University of St Andrews, 2001
- A History of Mathematical Notations, Volume II (Florian Cajori), §469 to §477, Open Court Publishing, via Internet Archive, 1929
- A Mathematical Theory of Communication (C. E. Shannon), Bell System Technical Journal, via Internet Archive, 1948
- NIST Guide to the SI, Chapter 10: More on Printing and Using Symbols and Numbers (SP 811), National Institute of Standards and Technology