logo
search
Formula Errors

How to Fix Excel ACOS #NUM! Error After Subtraction

Anum MushtaqAnum Mushtaq Oct 21, 2026 868 views

Question details

The user encounters a #NUM! error when using the ACOS function in Excel after performing a subtraction operation inside or before the function.

How to Fix Excel ACOS #NUM! Error After Subtraction
Product
Excel
Device & OS
not provided
Scenario
Calculating the arccosine of a value generated by a subtraction formula, which mathematically should be within the valid -1 to 1 range.
Observed behavior
Excel returns a #NUM! error instead of the expected angle because floating-point rounding behavior causes the internal representation of the subtracted value to fall slightly outside the strict -1 to 1 requirement of the ACOS function.
Before you start

Before modifying your formulas, verify that your base mathematical calculation is genuinely supposed to yield a result between -1 and 1, as the ACOS function will inherently fail on any number outside this exact range.

Solution 1Recommended

Wrap the Intermediate Calculation in the ROUND Function

The most reliable way to eliminate floating-point precision errors is to explicitly round your subtraction results to a safe precision level before passing them into the ACOS function.

Spreadsheet software handles decimal numbers using floating-point math. This can sometimes result in calculations being off by infinitesimally small margins (e.g., generating 1.000000000000001 instead of exactly 1). Because ACOS strictly requires an input between -1 and 1, even a microscopic variance will trigger a #NUM! error.

1
Locate the error cell

Select the cell containing the ACOS formula that is currently displaying the #NUM! error.

2
Edit the formula

Click into the Formula Bar at the top of the screen or double-click the cell to enter edit mode.

3
Insert the ROUND function

Modify the formula by nesting your subtraction inside the ROUND function. For example, change =ACOS(A1-B1) to =ACOS(ROUND(A1-B1, 14)).

4
Apply the correction

Press the Enter key. The formula will now strip out the microscopic floating-point anomaly and calculate the correct angle.

Wrap the Intermediate Calculation in the ROUND Function
Precision Recommendation: Rounding to 10 or 14 decimal places is generally optimal. It is precise enough to maintain accurate trigonometric results while completely eliminating spreadsheet floating-point artifacts.

Calculate Complex Trigonometry Seamlessly in WPS Spreadsheet

WPS Office provides a highly compatible Spreadsheet application that handles advanced mathematical, statistical, and trigonometric functions with ease. You can fix floating-point rounding errors utilizing the exact same formula logic you would use in Microsoft Excel.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open your existing .xlsx file containing the trigonometric calculations.
  2. 2. Select the target formula: Click on the cell that contains the ACOS subtraction formula triggering the error.
  3. 3. Apply the ROUND fix: In the top Formula Bar, wrap the inner subtraction operation with the ROUND function, such as =ACOS(ROUND(A1-B1, 14)).
  4. 4. Calculate seamlessly: Press Enter. WPS Spreadsheet instantly bypasses the floating-point limitation and outputs the accurate mathematical result.
100% compatibility with Microsoft Excel formulas, functions, and .xlsx file formatsRobust calculation engine for handling complex trigonometric equationsLightweight, fast-loading, and completely free to useFamiliar user interface requiring zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why does the ACOS function only accept values between -1 and 1?

In mathematics, the arccosine (ACOS) is the inverse of the cosine function. Because the cosine of any real angle always results in a number between -1 and 1, the ACOS function can only legally process numbers within this exact domain to return a valid real-number angle.

What does a #NUM! error mean in spreadsheet formulas?

A #NUM! error indicates that a formula or function contains invalid numeric values. For mathematical and trigonometric functions, it typically means the provided input number is outside the acceptable mathematical domain for that specific operation (like finding the square root of a negative number or passing a number greater than 1 to ACOS).

Can floating-point precision errors affect other functions besides ACOS?

Yes. Floating-point rounding errors can impact any formula requiring exact precision. This commonly breaks logical IF statements comparing two seemingly identical calculated decimal values, or lookup functions like VLOOKUP and MATCH failing to find a matching calculated number.