
Master Integer, Truncation, Remainder, and Quotient Calculations with INT, TRUNC, MOD, and QUOTIENT
Unlike rounding functions such as ROUND, INT, TRUNC, MOD, and QUOTIENT are ideal when you need policy-based truncation or classification.
Syntax and Differences
| Function | Syntax | Description |
|---|---|---|
| INT | =INT(number) | Rounds down to an integer toward negative infinity |
| TRUNC | =TRUNC(number,[num_digits]) | Truncates toward zero, with an optional digit setting |
| MOD | =MOD(number, divisor) | Returns the remainder; its sign follows the divisor |
| QUOTIENT | =QUOTIENT(number, divisor) | Returns the integer portion of a division |
Number format vs. value: Formatting a cell to display an integer is different from changing the actual value with INT/TRUNC.
Integer Conversion and Truncation — INT vs. TRUNC
Truncate to two decimal places
=TRUNC(B2, 2)
Handling negative numbers (−2.3)
=INT(-2.3) // -3
=TRUNC(-2.3) // -2
Determine whether a date has a time component
=IF(TRUNC(A2)=A2, "Date only", "Includes time")
Remainder and Quotient — MOD and QUOTIENT
Separate minutes and seconds
=QUOTIENT(Seconds,60) // Minutes
=MOD(Seconds,60) // Seconds
Even or odd
=MOD(A2,2)=0 // TRUE if even
Number of packs and remaining units
=QUOTIENT(Qty, Pack) // Number of boxes (packs)
=MOD(Qty, Pack) // Remaining units
10 Practical Patterns
① Pagination offset (20 items per page, page = G2)
=QUOTIENT(ROW(A1:A1000)-1, 20)=G2-1
② Cycle/batch label (cycle of N days)
="Batch "&INT((ROW()-1)/N)+1
③ Sequence number (repeats 1, 2, 3, 1, 2, 3)
=MOD(ROW()-1, 3)+1
④ Week of the month
=INT( (DAY(A2)+WEEKDAY(EOMONTH(A2,-1)+1,2)-1) / 7 ) + 1
⑤ Every-15-minute bucket (time to integer index)
=QUOTIENT(MINUTE(A2), 15) // 0~3
⑥ Truncate negative amounts toward zero
=TRUNC(Amount, 0)
⑦ Weeks and remaining days between two dates
=QUOTIENT(Days,7) // Weeks
=MOD(Days,7) // Days
⑧ Extract the last three digits of an order number (numeric)
=MOD(OrderID, 1000)
⑨ Snap map coordinates to a grid (truncate to 0.01 units)
=TRUNC(Lat, 2) & ", " & TRUNC(Lng, 2)
⑩ VAT breakdown (separate calculation with quotient and remainder)
=QUOTIENT(Total, 11)*10 // Before tax (assuming 10/11)
=MOD(Total, 11) // Adjustment remainder (for strategy)
Common Mistakes and Checklist
- Confusing negative-number rules → Test INT (toward −∞) vs. TRUNC (toward zero) for integer conversion.
- MOD sign → The divisor’s sign determines the result’s sign. Define the reporting policy clearly.
- Changing only the number format → The value remains unchanged, so use INT/TRUNC when you need integer conversion before calculations.
- Mixing up rounding to multiples and truncation → Use MROUND/CEILING/FLOOR for rounding and TRUNC/INT for truncation.
Summary
| Goal | Typical Formula |
|---|---|
| Round down to an integer (toward −∞) | INT(x) |
| Truncate (toward zero) | TRUNC(x, n) |
| Quotient/remainder | QUOTIENT(x,d) / MOD(x,d) |
| Cycles/batches | Use MOD for cycles and INT for group labels |