How to Fix Excel BITOR #NUM! Error from Floating-Point Precision
Question details
The user encounters a #NUM! error when using the BITOR function with a calculated value that appears to be a valid integer but actually contains hidden fractional precision.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Using the BITOR function to perform bitwise operations on calculated formula results.
- Observed behavior
- The function returns a #NUM! error because spreadsheet floating-point calculations create microscopic decimal approximations (like 49.000000000000007), which violate BITOR's strict requirement for integer inputs.
Select the cell with the calculated value and click 'Increase Decimal' on the Home tab to verify if hidden floating-point fractions are present.
Wrap Calculated Values in the INT Function
Use the INT function to strip away hidden floating-point precision, ensuring the BITOR function receives a strict integer.
Spreadsheets use floating-point math, meaning a calculation like 1/(1/49) might be stored internally as 49.000000000000007 rather than exactly 49. Since the BITOR function strictly requires integers, these tiny fractional parts trigger a #NUM! error.
Click on the cell containing your BITOR formula to display it in the formula bar.
Edit the formula to wrap your calculated mathematical argument inside the INT function. For example, change =BITOR(1, 1/(1/49)) to =BITOR(1, INT(1/(1/49))).
Press Enter. The #NUM! error will disappear because the INT function guarantees a clean integer is passed to BITOR.

Master Complex Formulas with WPS Spreadsheet
WPS Spreadsheet is a powerful, free tool that fully supports standard mathematical and bitwise functions like BITOR, INT, and ROUND. It handles floating-point calculations with high precision and includes built-in auditing tools to quickly trace and resolve #NUM! errors.
- 1. Open your workbook in WPS: Launch WPS Spreadsheet and open the document containing the #NUM! error.
- 2. Evaluate the formula: Navigate to the Formulas tab and click 'Evaluate Formula' to see exactly where the floating-point decimal is generated.
- 3. Apply integer conversion: In the formula bar, insert INT() or ROUND() around the mathematical step causing the issue, then press Enter to resolve.

Frequently Asked Questions
What exactly does the BITOR function do?
The BITOR function returns the bitwise 'OR' of two numbers. It compares the binary representations of the given numbers and returns a value where a bit is 1 if either of the corresponding bits in the two arguments is 1.
Why do floating-point precision errors occur in spreadsheets?
Spreadsheet software converts numbers into binary formats to perform calculations. Some decimal numbers cannot be perfectly represented in binary, leading to minuscule discrepancies (like 49.000000000000007 instead of exactly 49) when completing complex operations.
Are other Excel functions affected by hidden floating-point decimals?
Yes. Any function that strictly requires integer inputs, such as BITAND, BITXOR, BITLSHIFT, and BITRSHIFT, will return a #NUM! error if given a calculated value with a hidden fractional remainder.
How can I see if my cell has hidden decimals?
Select the cell, go to the Home tab on the ribbon, and click the 'Increase Decimal' button repeatedly. This forces the spreadsheet to display the microscopic fractions that are usually rounded off visually.




