Excel INT and MOD functions: integer part and remainder, even/odd, hours and minutes
Division with a remainder using INT and MOD: full boxes and leftover items, minutes to hours, even/odd numbers, splitting date and time, night shifts — with examples.
Remember “division with a remainder” from school: pack 150 bottles into boxes of 12 and you get 12 full boxes with 6 bottles left over. Excel gives you these two numbers with two functions:
- INT — the integer part of a number:
=ЦЕЛОЕ(150/12)→ 12. - MOD — the remainder after division:
=ОСТАТ(150;12)→ 6.
This pair is used in warehouses, logistics, working-time calculations, picking every Nth row and splitting a date-time value into parts.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Product | Qty | Per box | Full boxes | Left over | |
| 2 | Soda | 150 | 12 | 12 | 6 | |
| 3 | Mineral water | 100 | 6 | 16 | 4 | |
| 4 | Juice | 75 | 8 | 9 | 3 | |
| 5 | Cookies | 240 | 24 | 10 | 0 | |
| 6 |
=ЦЕЛОЕ(B2/C2) — how many full boxes; column E has =ОСТАТ(B2;C2) — how many items are left overSyntax
=ЦЕЛОЕ(number)
- number — the number or formula whose integer part you need. INT always rounds down (toward the smaller number):
=ЦЕЛОЕ(7,9)→ 7,=ЦЕЛОЕ(-2,5)→ -3.
=ОСТАТ(number; divisor)
- number — the dividend (what you divide).
- divisor — what you divide by. If it is 0 you get #DIV/0!.
The two are linked: MOD(n,d) = n - d*INT(n/d). In other words, MOD is the part INT “throws away”.
Example
Formula:
=INT(B1/60)&" h "&MOD(B1,60)&" min"→ result: 2 h 15 min
Entering MOD step by step
1
Select the result cell (E2) and choose Формулы → Математические → MOD. INT is in the same list.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Product | Qty | Per box | Full boxes | Left over | |
| 2 | Soda | 150 | 12 | 12 | ||
| 3 | Mineral water | 100 | 6 | 16 | ||
| 4 | ||||||
| 5 |
2
In the Function Arguments window type B2 (quantity) in Number and C2 (items per box) in Divisor. The result shows at the bottom of the window — click OK.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Product | Qty | Per box | Full boxes | Left over | |
| 2 | Soda | 150 | 12 | 12 | 6 | |
| 3 | Mineral water | 100 | 6 | 16 | ||
| 4 | ||||||
| 5 |
3
Double-click the fill handle in the bottom-right corner of E2 — the formula fills to the end of the table. The references are relative, so each row uses its own numbers.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Product | Qty | Per box | Full boxes | Left over | |
| 2 | Soda | 150 | 12 | 12 | 6 | |
| 3 | Mineral water | 100 | 6 | 16 | 4 | |
| 4 | Juice | 75 | 8 | 9 | 3 | |
| 5 | Cookies | 240 | 24 | 10 | 03 | |
| 6 |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | House no. | Street side | ||
| 2 | 12 | Even side | ||
| 3 | 15 | Odd side | ||
| 4 | 7 | Odd side | ||
| 5 | 40 | Even side | ||
| 6 | 23 | Odd side | ||
| 7 |
MOD(A2,2)=0), it is even. Handy for splitting a courier route by street side| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Driver | Total minutes | Hours | Minutes | |
| 2 | Aziz | 135 | 2 | 15 | |
| 3 | Dilnoza | 250 | 4 | 10 | |
| 4 | Javohir | 59 | 0 | 59 | |
| 5 | Sardor | 480 | 8 | 0 | |
| 6 |
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Employee | Check-in | Date | Time | Late? | |
| 2 | Aziz | 05.01.2026 09:15 | 05.01.2026 | 09:15 | Yes | |
| 3 | Dilnoza | 05.01.2026 08:50 | 05.01.2026 | 08:50 | No | |
| 4 | Javohir | 06.01.2026 09:45 | 06.01.2026 | 09:45 | Yes | |
| 5 |
MOD(B2,1))Pro level: cycles and night shifts with MOD
- Night shift hours. For a 22:00–06:00 shift
=C2-B2is negative and the cell fills with ####.=ОСТАТ(C2-B2;1)*24handles crossing midnight correctly: 8 hours. - Duty roster.
=ВЫБОР(ОСТАТ(СТРОКА()-2;3)+1;"Aziz";"Dilnoza";"Javohir")cycles 1, 2, 3, 1, 2, 3 as you fill it down. - Every Nth row.
=ОСТАТ(СТРОКА();2)=0is TRUE for even rows. In conditional formatting it gives “zebra” stripes; inside FILTER it picks every second record. - Fractional part:
=ОСТАТ(A2;1)(12.75 → 0.75). Last digit:=ОСТАТ(A2;10). Is it a whole number?=ОСТАТ(A2;1)=0.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Guard | Start | End | Hours | |
| 2 | Aziz | 22:00 | 06:00 | 7,99999999999 | |
| 3 | Dilnoza | 08:00 | 17:00 | 9 | |
| 4 | Javohir | 20:00 | 08:00 | 12 | |
| 5 |
=ОСТАТ(C2-B2;1)*24 = 8 hours. A plain subtraction would give −16 hours| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | On duty | ||
| 2 | 05.01.2026 | Aziz | ||
| 3 | 06.01.2026 | Dilnoza | ||
| 4 | 07.01.2026 | Javohir | ||
| 5 | 08.01.2026 | Aziz | ||
| 6 | 09.01.2026 | Dilnoza | ||
| 7 | 10.01.2026 | Javohir | ||
| 8 |
Try it in the simulator
Work out how many full boxes and leftover items each product has. Type =ЦЕЛОЕ(B2/C2) in D2 and =ОСТАТ(B2;C2) in E2, then fill both down to row 5. Check: Cookies — 10 boxes, 0 left over.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Product | Qty | Per box | Full boxes | Left over | |||||||||||||||||||
| 2 | Soda | 150 | 12 | |||||||||||||||||||||
| 3 | Mineral water | 100 | 6 | |||||||||||||||||||||
| 4 | Juice | 75 | 8 | |||||||||||||||||||||
| 5 | Cookies | 240 | 24 | |||||||||||||||||||||
| 6 | ||||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.