# How To MOD Negative Numbers

This is how the MOD function works.

Syntax of The MOD Function

The MOD function in Excel has a specific syntax that needs to be followed for correct usage otherwise it will not work & return #VALUE!. The syntax for the MOD function is as follows:

=MOD(number, divisor)

The MOD function takes two arguments: “number” and “divisor.” Here’s what each argument represents:

• “number”: This is the numeric value or expression for which you want to calculate the modulus. It can be a positive or negative number, a cell reference containing a numeric value, or a formula that evaluates to a numeric value.
• “divisor”: This is the numeric value or expression that serves as the modulus base or divisor for the calculation. It should not be zero. Like the “number” argument, it can be a positive or negative number, a cell reference containing a numeric value, or a formula that evaluates to a numeric value.

The MOD function divides the “number” by the “divisor” and returns the remainder as the result.

The numeric value from MOD offers the same sign as the divisor. If your divisor is positive, the MOD result will be positive. If the divisor is negative, the MOD result will be negative.

Now let’s understand it with the following example dataset.

When working with numbers in Excel, it’s essential to understand how to handle various mathematical operations, including modulus calculations. While Excel’s MOD function is a versatile tool for finding remainders, dealing with negative numbers may require a closer look. Modulo operations involving negative numbers can be a bit confusing, but fear not! In this article, we will guide you through the process of effectively modding negative numbers in Excel. By the end, you’ll be equipped with the knowledge and techniques to confidently tackle any modulus calculation, no matter the sign.

### Step 1 – Select The Cell

– Select the cell where you want to apply the formula & place equals to (=) sign.

### Step 2 – Type The Formula

– Now type the formula =MOD(A2,B2).
– Press enter.

### Step 3 – MOD Function Used For Negative Numbers

– Drag the formula downwards to apply it to the remaining cells of the dataset.

## Conclusion:

The MOD function in Excel is used to calculate the remainder when one number is divided by another. When working with positive numbers, the MOD function behaves as expected. However, when dealing with negative numbers, the MOD function in Excel follows a specific convention. The sign of the remainder in the MOD function depends on both the sign of the dividend and the divisor as shown in the examples discussed in this tutorial.

It is importatnt to note that the divisor determines the sign of the remainder, while the dividend determines the magnitude of the remainder.