The INT function rounds a number to the nearest equal or lower integer.
INT(
number
)
- number: Number to round.
The INT function returns an integer.
The TRUNC and INT functions return the same result for positive numbers. On the contrary, applied to a negative number they return different results: TRUNC returns the integer part (that is, the number stripped of its decimal part) while INT returns the nearest equal or lower integer. That is, the TRUNC function applied to the number -5.4 returns -5, while the INT function applied to the same number returns -6.
This example applies the INT function to a set of real numbers:
The behavior of the different rounding functions is summarized below:
- ROUNDDOWN: Rounds a number towards zero where the number of decimal places can be specified.
- ROUNDUP: Rounds a number away from zero where the number of decimal places can be specified.
- ROUND: Rounds a number towards the nearest rounding value where the number of decimal places can be specified.
- INT: Rounds a number to the nearest equal or lower integer.
- TRUNC: Rounds a number towards its integer part where the number of decimal places can be specified.
Examples: