Please enable JavaScript to view this site.

Common (base ten) logarithms

The best way to understand logarithms is through an example. If you take 10 to the third power (10 x 10 x 10) the result is 1000. The logarithm is the inverse of that power function. The logarithm (base 10) of 1000 is the power of 10 that gives the answer 1000. So the logarithm of 1000 is 3. If you multiply 10 by itself 3 times, you get 1000.

You can take 10 to a negative power. For example, taking 10 to the -3 power is the same as taking the reciprocal of 103. So 10-3 equals 1/103, or 0.001. The logarithm of 0.001 is the power of 10 that equals 0.001, which is -3.

You can take 10 to a fractional power. Ten to the 1/2 power equals the square root of 10, which is 3.163. So the logarithm of 3.163 is 0.5.

Ten to the zero power equals 1, so the logarithm of 1.0 is 0.0.

You can take the logarithm of any positive number. The logarithm of values between zero and one are negative; the logarithms of values greater than one are positive. The logarithms of zero and all negative numbers are undefined; there is no power of 10 that gives a negative number or zero.

Logarithms to other bases

The logarithms shown in the previous section are called base 10 logarithms, because the computations take 10 to some power. These are also called common logarithms.

You can compute logarithms for any power. Mathematicians prefer natural logarithms, using base e (2.7183…).  Despite that name, use of logarithms with base e does not seem natural to most scientists who tend to be far more comfortable with base 10 logarithms.

Biologists sometimes use base 2 logarithms, often without realizing it. The base 2 logarithm is the number of doublings it takes to reach a value. So the log base 2 of 16 is 4 because if you start with 1 and double it four times (2, 4, 8, and 16) the result is 16. Immunologists often serially dilute antibodies by factors of 2, so often graph data on a log2 scale. Cell biologists use base 2 logarithms to convert cell counts to number of doublings.

Logarithms using different bases are proportional to each other. So converting from natural logs to common logs is sort of like changing units. Divide a natural logarithm by 2.303 to compute the common log of the same value. Multiply a common log by 2.303 to obtain the corresponding natural log.

Mathematical properties of logarithms

Logarithms convert multiplication into addition and division into subtraction, and exponentiation into multiplication:

log(A.B) = log(A) + log(B)

 

log(A/B) = log(A) - log(B)

 

log(An) = n.log(A)

Antilogarithms

The antilogarithm (also called an antilog) is the inverse of the logarithm transform. Since the logarithm (base 10) of 1000 equals 3, the antilogarithm of 3 is 1000. To compute the antilogarithm of a base 10 logarithm, take ten to that power.

To compute the antilogarithm of a natural logarithm, take e to that power. The natural logarithm of 1000 is 6.980. So the antilogarithm of 6.908 is e6.908, which is 1000. Spreadsheets and computer languages use the notation exp(6.908).

Terms that sound similar to logarithm:  logit and logistic

The term logistic sounds like it is related to logarithms. In fact, the term logistic has three distinct meanings, which don't all involve logarithms.  

The logit function, used in logistic regression, is the natural logarithm of a probability (P, with a value between 0.0 and 1.0) divided by 1-P:  

Logit(P) = ln[P/(1-P)]

The lognormal distribution is a distribution of values whose logarithms follow a Gaussian distribution. The lognormal distribution itself is asymmetrical with a heavy tail to the right. It is easy to be mislead by the asymmetry, and  mistakenly eliminate values in the tail of the distribution as outliers.

The notation “log(x)” can be ambiguous

Within Prism transforms and equations, the log() function computes the common (base 10) logarithm.

With some computer languages (for example, Javascript) log(x) denotes a natural logarithm, not a common logarithm. Excel is especially confusing. In an Excel worksheet function, log(X) is the common logarithm, but in an Excel VBA macro, log(X) is the natural log.

The notation “ln(X)” is the natural logarithm in Prism.

 

Don't mix up logarithms with scientific notation

Consider the value 0.000000001. It can be written as 10-9. Since computer programs can't deal with subscripts, this is entered into most computer programs (including GraphPad Prism and Excel) as 1e-9. The 'e' here means "times ten to the power of". Don't mix up that scientific notation with a logarithm. The logarithm of 0.000000001 is -9.

 

© 1995-2019 GraphPad Software, LLC. All rights reserved.