Formula Errors

How to Count Decimal Digits in an Excel Value

Camila MilosovichCamila Milosovich Nov 18, 2026 868 views

Question details

Count the digits after the decimal separator in an Excel value and return zero when there is no decimal portion.

How to Count Decimal Digits in an Excel Value
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to count decimal digits in a cell containing either text or a numeric value.
Observed behavior
An integer such as 15 should return 0, while a value with decimal digits should return the count after its decimal separator.
Before you start

Check whether B3 contains text or a number, and identify the decimal separator used in the value. The examples below use a period and commas between formula arguments; adjust them for your regional settings if needed.

Solution 1Recommended

Count decimal digits in a text value

Use this formula when B3 is stored as text and trailing zeros should be counted.

1
Enter the formula

Select an empty cell and enter =IFERROR(LEN(B3)-FIND(".",B3),0).

2
Check the result

Press Enter. Text values 15, 15.2, and 15.00 return 0, 1, and 2 respectively.

Count decimal digits in a text value
Decimal separator: If the text uses a comma as its decimal separator, replace the period inside FIND with a comma. This formula counts every character after the separator, so use it with clean numeric text.
Count decimal digits in WPS Spreadsheets

Count decimal digits with WPS Spreadsheets

Use LEN, FIND, and IFERROR in WPS Spreadsheets to count characters after the decimal separator in a text value, including trailing zeros.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Check the source value: Select B3 and check that it contains a text value using a period as the decimal separator.
  3. 3. Enter the formula: Select an empty cell and enter =IFERROR(LEN(B3)-FIND(".",B3),0).
  4. 4. Verify the result: Press Enter and check that 15 returns 0 and text such as 15.00 returns 2.
Count decimal digits and return zero for integersOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and cell referencesWork in a free, easy-to-use office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why should 15 return zero decimal digits?

The integer 15 has no decimal portion. The formulas use IFERROR to return 0 when FIND does not locate a decimal separator.

How can I count trailing zeros after the decimal point?

Store the value as text and use =IFERROR(LEN(B3)-FIND(".",B3),0). For example, the text 15.00 returns 2.

Why does a numeric cell displayed as 15.00 return zero?

The two zeros can come from the cell's number format rather than the stored numeric value. The numeric formula counts significant decimal digits, not formatting.

What if my values use a comma as the decimal separator?

For text values, replace the period inside FIND with a comma. For numeric values, also check that the TEXT format matches your regional settings; formula argument separators may need adjustment too.