LOG10 returns the base-10 logarithm of a positive number, answering how many times 10 must be multiplied by itself to reach that number. It is the inverse of 10 raised to a power and is useful for scaling, growth rates, and scientific data.
=LOG10(number)What does LOG10 do?
The LOG10 function in Excel calculates the base-10 logarithm of a number. In simple terms, it tells you the power to which 10 must be raised to produce that number. For example, LOG10(100) returns 2 because 10 squared is 100. This function belongs to the Math & Trigonometry category and is widely used in finance, science, and data analysis.
Logarithms help compress wide-ranging values into a manageable scale. Instead of working with numbers that span several orders of magnitude, you can compare them linearly. This is especially handy when analysing population growth, sound levels, or investment returns over time.
Imagine you have a list of sales figures that vary from hundreds to millions. Using LOG10, you can quickly see the order of magnitude of each value or create a chart that is easier to read. It also simplifies calculations involving exponential growth, such as compound interest or bacterial growth.
When to use LOG10
- Comparing values that span multiple orders of magnitude, such as earthquake magnitudes or sound intensities.
- Calculating the pH of a solution in chemistry, which is the negative base-10 logarithm of hydrogen ion concentration.
- Determining the number of digits in a positive integer (using INT(LOG10(number))+1).
- Transforming skewed data for statistical analysis or charting to make patterns visible.
- Measuring growth rates or decay in finance and biology where exponential changes occur.
- Converting between logarithmic and linear scales in engineering or scientific contexts.
LOG10 syntax
=LOG10(number)| Argument | Required? | What to enter |
|---|---|---|
number | Required | The positive real number for which you want the base-10 logarithm. It must be greater than 0. For example, =LOG10(1000) returns 3. |
What it returns: LOG10 returns a numeric value: the base-10 logarithm of the given number. If the number is 0 or negative, it returns an error.
LOG10 examples
1 Basic logarithm of a single number
This example shows the simplest use of LOG10. The goal is to find the base-10 logarithm of 1000. The formula =LOG10(B2) refers to the value in cell B2, which is 1000. LOG10 calculates that 10 must be raised to the power of 3 to equal 1000, so it returns 3. This confirms the basic behaviour of the function.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Value | Number | |||
| 2 | Number | 1000 | 3 | ||
| 3 |
2 Logarithm of a decimal number
Here we calculate the base-10 logarithm of 0.01. The formula =LOG10(B2) uses the value in B2, which is 0.01. Since 10 raised to the power of -2 equals 0.01, LOG10 returns -2. This demonstrates that the function works with numbers less than 1 and returns negative results, which is useful for small quantities.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Value | Number | |||
| 2 | Number | 0.01 | -2 | ||
| 3 |
3 Finding the order of magnitude of sales figures
In this business scenario, we have monthly sales figures and want to know the order of magnitude of each. The formula =LOG10(B2) in cell D2 calculates the base-10 logarithm of the sales amount in B2. For 5000, LOG10 returns approximately 3.69897, meaning the sales are in the thousands (between 10^3 and 10^4). This helps quickly categorise performance without detailed calculations.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Sales | |||
| 2 | Jan | 5000 | 3.698970004 | ||
| 3 | Feb | 12000 | |||
| 4 | Mar | 800 | |||
| 5 | Apr | 25000 | |||
| 6 | May | 3000 | |||
| 7 |
4 Calculating pH from hydrogen ion concentration
This scientific example calculates the pH of solutions. pH is defined as the negative base-10 logarithm of the hydrogen ion concentration. The formula =-LOG10(B2) takes the concentration in B2 (0.001) and computes -LOG10(0.001). Since LOG10(0.001) is -3, the negative makes it 3, which is the pH. This shows how LOG10 is used in chemistry.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Solution | H+ Concentration (mol/L) | |||
| 2 | A | 0.001 | 3 | ||
| 3 | B | 0.0001 | |||
| 4 | C | 0.01 | |||
| 5 | D | 0.00001 | |||
| 6 |
5 Counting digits in product codes
Suppose you have product codes as numbers and need to know how many digits each contains. The formula =INT(LOG10(B2))+1 calculates the number of digits. For 12345, LOG10(12345) is about 4.0915, INT gives 4, and adding 1 yields 5 digits. This technique is handy for data validation or formatting tasks.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Product | Code | |||
| 2 | Widget | 12345 | 5 | ||
| 3 | Gadget | 987 | |||
| 4 | Doohickey | 1000000 | |||
| 5 | Thingamajig | 42 | |||
| 6 |
Common LOG10 errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #NUM! | The number argument is zero or negative, because the logarithm of zero or a negative number is undefined in real numbers. | Ensure the number is greater than 0. If you have zero or negative values, handle them separately or use an IF function to avoid errors. |
| #VALUE! | The number argument is non-numeric, such as text or a blank cell that is interpreted as text. | Check that the cell contains a number. Convert text to numbers using VALUE or ensure data is entered correctly. |
| #NAME? | The function name is misspelled, for example LOG10 written as LOGTEN or LOG 10 with a space. | Use the correct spelling: LOG10. Excel's formula autocomplete can help. |
| #DIV/0! | This is not directly from LOG10 but may occur if the result is used in a division by zero, such as when LOG10 returns 0 and you divide by it. | Check the surrounding formula. If LOG10 returns 0 (when number is 1), avoid dividing by that result unless intended. |
Tips for using LOG10
- Remember that LOG10(10) = 1, LOG10(100) = 2, and LOG10(1) = 0; these are quick mental checks.
- Use LOG10 to compress large ranges when creating charts; it can make exponential trends linear.
- Combine LOG10 with INT to count digits in a positive integer:
=INT(LOG10(A1))+1. - For natural logarithms, use LN instead; for logarithms with any base, use LOG(number, base).
- If you need to avoid errors with zero or negative numbers, wrap LOG10 in IFERROR or use an IF statement to check the value first.
- LOG10 is often used in finance to calculate the number of periods needed for an investment to reach a certain value, using the formula
=LOG10(FV/PV)/LOG10(1+rate).
Frequently asked questions
What is the difference between LOG10 and LN?
LOG10 calculates the base-10 logarithm, while LN calculates the natural logarithm (base e, where e is approximately 2.718). Use LOG10 for orders of magnitude and LN for continuous growth models.
Can LOG10 handle numbers less than 1?
Yes, LOG10 returns a negative number for arguments between 0 and 1. For example, LOG10(0.1) returns -1.
Why does LOG10 return an error for zero?
The logarithm of zero is undefined because no power of 10 equals zero. Excel returns #NUM! for zero and negative numbers.
How do I calculate the logarithm of a number with a different base?
Use the LOG function: =LOG(number, base). For example, =LOG(8, 2) returns 3.
Is LOG10 available in all versions of Excel?
Yes, LOG10 is available in all Excel versions, including Excel for Microsoft 365, Excel 2019, 2016, and earlier.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. LOG10 reference