MOD function in Excel
MOD returns the remainder after dividing number by divisor.
Syntax
=MOD(number, divisor)
| Argument | Required? | What it is |
|---|---|---|
| number | Required | The number or cell to work with. |
| divisor | Required | The number to divide by. |
Example
Start 09:00 and end 17:30: =(C2-B2)*24 returns 8.5 hours.
From the lesson TIME, HOUR and MINUTE.
Common mistakes
- Forgetting the *24, so 8 hours shows as 0.333.
- A night shift (22:00 to 06:00) gives a negative number without MOD.
- Typing 9.30 for half past nine: Excel reads it as a number, not a time. Type 9:30.
Practise MOD in a live spreadsheet
Type the formula yourself and get it graded instantly, no Excel needed.
Related math functions
- SUMAdds all the numbers in a range.
- SUMIFAdds the cells that meet one condition.
- SUMIFSAdds the cells that meet several conditions.
- SUMPRODUCTMultiplies matching items and returns the sum of those products.
- ROUNDRounds a number to a given number of digits.
- ROUNDUPRounds a number up, away from zero.
- ROUNDDOWNRounds a number down, toward zero.
- FLOORRounds down to the nearest multiple of significance.