
Returns the remainder after division. MOD is useful for divisibility tests, repeating cycles, alternating-row logic, and time calculations that wrap across midnight.
The Excel MOD function returns the remainder after one number is divided by another. For example, =MOD(10,3) returns 1 because 3 fits into 10 three times, leaving 1 unused. When the division is exact, MOD returns 0, which is why the function is so effective in divisibility tests.
Although the arithmetic idea is simple, MOD supports a wide range of worksheet logic. It is used for odd-even testing, repeating sequences, cycle-based grouping, alternating row formatting, and time calculations that need to wrap back into a 24-hour day. Whenever a rule repeats after a fixed interval, MOD is often the function behind it.
Gives the leftover amount after full multiples of the divisor have been removed. Often used in divisibility logic, cyclic patterns, and row-banding formulas.
Returns the remainder with the same sign as the divisor. If the divisor is zero, Excel returns #DIV/0!.
=MOD(number, divisor)
MOD takes two required arguments. number is the value being divided, and divisor is the value used to divide it. The result is the part that remains after all full multiples of the divisor have been removed. Microsoft also describes the function algebraically as MOD(n,d)=n-d*INT(n/d), which explains why INT and MOD are closely related.
MOD is often paired with QUOTIENT and INT because all three describe different aspects of division. Choosing the right one depends on whether you need the leftover amount, the whole-number count, or a rounded result.
| Function | What It Returns | Example with 10 and 3 | Use When |
|---|---|---|---|
MOD |
Remainder | 1 | You need the leftover part or a repeating pattern test |
QUOTIENT |
Integer portion of the division | 3 | You need the count of full groups without the remainder |
INT |
Rounded-down integer result | 3 from 10/3 | You need the floor of a numeric result, especially in broader formulas |
ISEVEN / ISODD |
TRUE or FALSE | Odd/even classification | You only need a direct boolean test rather than the remainder itself |
MOD is the more flexible option when the remainder itself has meaning. A zero remainder means exact divisibility, a remainder of 1 in a modulus-2 test identifies odd numbers, and any repeating sequence can be modeled by checking the remainder against a fixed interval.
The most common worksheet pattern is a divisibility test. A formula such as =MOD(A1,2)=0 checks whether a value divides evenly by 2, and therefore whether it is even. The same structure works for any divisor, which makes MOD a compact way to test packaging rules, schedule cycles, or numeric classification logic.
MOD is also valuable in time arithmetic. If a shift starts late at night and ends after midnight, a direct subtraction can produce a negative result unless dates are included. Wrapping the subtraction in MOD(end_time-start_time,1) forces the result back into one-day range, which is why MOD is a standard fix for overnight-duration formulas.
MOD(n,2) when odd-even status matters.MOD(n,batch_size)=0 to test whether a quantity fits exact group sizes.MOD(end-start,1) to handle elapsed time that crosses midnight.MOD(value,1) to isolate the fractional part of a positive decimal value.This example shows the core behavior directly. MOD returns the unused portion after all full groups have been taken out. With 10 divided by 3, the whole groups account for 9 and the remainder is 1.
=MOD(10,3) // 1
=MOD(12,3) // 0
=MOD(14,5) // 4
In cell F1, use MOD to find the remainder when 10 is divided by 3. Expected result: 1.
Dividing by 2 creates a binary remainder pattern. Even numbers leave 0, odd numbers leave 1. Wrapping that test in IF converts the remainder into a label that can be displayed directly in a report or helper column.
=IF(MOD(B2,2)=0,"Even","Odd")
// B2 = 7
// MOD(7,2) = 1, so the result is "Odd"
In cell F2, use IF and MOD on B2 to label it "Even" or "Odd". B2 contains 7. Expected: "Odd".
A zero remainder means the number is an exact multiple of the divisor. That makes MOD a direct fit for rules such as case-pack quantities, staffing rotation intervals, or payment frequencies that must align exactly with a base unit.
=IF(MOD(B3,C3)=0,"Yes","No")
// B3 = 24, C3 = 6
// MOD returns 0, so the result is "Yes"
In cell F3, use IF and MOD to check if B3 (24) is evenly divisible by C3 (6). Expected: "Yes".
Using 1 as the divisor removes the whole-number component and returns only the remainder after division by 1. For a positive number such as 5.75, the result is 0.75. This is a compact way to isolate the fractional component without a separate subtraction step.
=MOD(B4,1)
// B4 = 5.75
// Result = 0.75
In cell F4, use MOD on B4 (5.75) with divisor 1 to extract only the decimal part. Expected: 0.75.
One subtle point is sign handling. Microsoft documents that the result has the same sign as the divisor, not necessarily the dividend. That matters in more advanced models involving negative values, because MOD(-3,2) and MOD(3,-2) do not behave the same way.
#DIV/0! if the divisor is zero.MOD returns the remainder after division.=MOD(number,divisor) with two required arguments.Tell your friends about this post