Formula Errors

How to Fix Excel BITOR #NUM! Error from Floating-Point Precision

Adam DavisAdam Davis Nov 10, 2026 870 views

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.

How to Fix Excel BITOR #NUM! Error from Floating-Point 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.
Before you start

Select the cell with the calculated value and click 'Increase Decimal' on the Home tab to verify if hidden floating-point fractions are present.

Solution 1Recommended

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.

1
Select the cell with the error

Click on the cell containing your BITOR formula to display it in the formula bar.

2
Add the INT function

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))).

3
Apply the new formula

Press Enter. The #NUM! error will disappear because the INT function guarantees a clean integer is passed to BITOR.

Wrap Calculated Values in the INT Function
Alternative Fix: You can also use the ROUND function, such as ROUND(1/(1/49), 0), if you want standard rounding rules applied to your calculation.
Advanced Formula Troubleshooting

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. 1. Open your workbook in WPS: Launch WPS Spreadsheet and open the document containing the #NUM! error.
  2. 2. Evaluate the formula: Navigate to the Formulas tab and click 'Evaluate Formula' to see exactly where the floating-point decimal is generated.
  3. 3. Apply integer conversion: In the formula bar, insert INT() or ROUND() around the mathematical step causing the issue, then press Enter to resolve.
100% compatibility with Microsoft Excel formulas and file formatsAdvanced error-checking and formula evaluation tools built right inLightweight application that runs smoothly and handles large datasets without lagging
microsoft office alternative - wps office

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.