Function guides ยท Math
INT function
Rounds a number down to the nearest integer.
Syntax
=INT(number)
| Argument | What it is |
|---|---|
number | The number to round down to an integer. |
What INT does
INT returns the whole-number part of a number by rounding down to the next integer below it. For positive numbers that is the same as chopping off the decimals.
Used on a date and time, it strips the time and leaves the date. Used on a division, it tells you how many whole times one number fits into another.
The point to remember is the direction. INT looks down the number line, so negative numbers move away from zero.
A few uses come up again and again. Age in complete years is INT of the days since birth divided by 365.25, although DATEDIF is more exact and is covered on its own page. Stripping the time from a timestamp is INT, and the time of day is what is left when you subtract the INT. Dividing a total into full groups is INT of the quotient.
Compare it with its neighbors before choosing. ROUND goes to the nearest whole number, ROUNDDOWN and TRUNC cut toward zero, and INT goes down. On positive numbers three of those agree on the answer when you ask for whole numbers and only ROUND differs.
For a ready example, time tracking sheets store hours as decimals. A shift of 7.75 hours is 7 hours and 45 minutes. INT gives the hours, and multiplying the fractional part by 60 gives the minutes. Both pieces come from one cell, which keeps the arithmetic in one place.
INT examples
1. Whole hours from decimal hours
| A | B | |
|---|---|---|
| 1 | Worked | Hours |
| 2 | 7.75 | 7 |
INT drops the fraction. 7.75 hours is 7 full hours. The part that was dropped is the number minus its INT, here 0.75.
2. Negative numbers go down, not toward zero
| A | B | |
|---|---|---|
| 1 | Value | |
| 2 | -3.2 | -4 |
INT always moves to the next lower integer. -3.2 becomes -4. ROUNDDOWN(-3.2,0) would return -3.
3. Full boxes from a total
| A | B | C | |
|---|---|---|---|
| 1 | Items | Per box | |
| 2 | 47 | 12 | 3 |
Packing 47 items into boxes of 12 gives INT(47/12) full boxes, which is 3. The leftover items are given by MOD(47,12).
Common INT mistakes
- Assuming INT rounds. INT(2.9) is 2. It never rounds up. Use ROUND for the nearest value.
- Negative number surprise. INT(-2.1) is -3, since -3 is lower. Use ROUNDDOWN or TRUNC for toward zero.
- Using INT on dates with times. INT of a date-time returns the date at midnight, which is a useful way to strip the time.
- Floating point surprises. A result that should be exactly 3 can be 2.9999999 internally and INT returns 2. Wrap the input in ROUND first.
INT on Excel job tests
INT turns up in pack, age and time tasks: how many complete boxes, how many full weeks, the date without the time. Each is INT of a division or INT of a date-time.
Age by INT((TODAY()-birthday)/365.25) is close; DATEDIF is exact. To split a timestamp, INT gives the date and the timestamp minus INT gives the time of day.
Use INT when every value is positive. Use ROUNDDOWN or TRUNC when negatives can appear and you want to move toward zero.
Related functions
INT questions
- What is the difference between INT and ROUNDDOWN?
- They match for positive numbers. For negatives, INT goes to the lower integer, ROUNDDOWN toward zero.
- How do I remove the time from a date-time?
- Use
=INT(A2)and format the cell as a date. - How do I get the decimal part of a number?
- Subtract INT from the number:
=A2-INT(A2). - Is INT the same as TRUNC?
- No. TRUNC removes the fraction toward zero, so TRUNC(-3.2) is -3 and INT(-3.2) is -4.
Practice INT
No lesson is built around INT yet. The closest thing to practice is a free 5-item sample test, which uses the same kind of formulas in a working grid. The Everyday Excel track shows what is published.
Try a 5-item Excel test sample