Fix FALSE Results in Excel Decimal Comparisons
Question details
The user needs to compare calculated decimal values in Excel without unexpected FALSE results caused by floating-point precision.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula compares decimal values that appear identical on the worksheet.
- Observed behavior
- Excel returns FALSE because the underlying values can differ in later decimal places, even when their displayed values match.
Identify the cells or calculations being compared and decide how many decimal places or what difference is acceptable for your task. Displayed decimal places may not show the full underlying values.
Round Both Values Before Comparing Them
Use this method when the comparison should be based on a fixed number of decimal places, such as cents.
Many decimal fractions cannot be represented exactly in binary floating-point format. Rounding both sides of a comparison removes differences smaller than the precision you choose.
Click the cell containing the comparison formula, or select an empty cell for a new formula.
In the formula bar, enter =ROUND(A1,2)=ROUND(B1,2), replacing A1 and B1 with the cells you want to compare.
Press Enter. The formula returns TRUE when both values round to the same number of decimal places; change 2 to the precision your task requires.

Compare Values Within a Tolerance
Use a tolerance when values can differ by a small, acceptable amount rather than needing to round to the same decimal value.
Compare Decimal Values Reliably in WPS Spreadsheets
Open your spreadsheet in WPS Spreadsheets and use ROUND or an absolute tolerance to avoid exact comparisons affected by floating-point precision.
- 1. Open your workbook: In WPS Spreadsheets, choose Open and select your Excel workbook.
- 2. Select a result cell: Click an empty cell where you want the comparison result to appear.
- 3. Enter a comparison formula: Enter =ROUND(A1,2)=ROUND(B1,2), or use =ABS(A1-B1)<=0.000001 for a tolerance comparison. Replace the cell references and precision as needed.
- 4. Check and save: Press Enter to check the TRUE or FALSE result, then choose File > Save to save your changes.

Frequently Asked Questions
Why does Excel return FALSE when two numbers look the same?
The displayed values may be rounded by cell formatting, while the underlying values differ slightly because many decimals cannot be represented exactly in binary floating-point format.
Will changing the number of displayed decimal places fix the comparison?
No. Changing the number format changes what you see, not the underlying values. Use ROUND in the comparison formula or compare the difference against a tolerance.
How do I compare two amounts to the nearest cent?
Use =ROUND(A1,2)=ROUND(B1,2), replacing A1 and B1 with your cell references. This compares each amount after rounding it to two decimal places.
What tolerance should I use for a decimal comparison?
Choose a threshold based on the scale and accuracy required by your task. For example, =ABS(A1-B1)<=0.000001 accepts an absolute difference of up to 0.000001.




