INT

The INT function rounds a number to the nearest equal or lower integer.

Syntax

INT(
    number
)

Parameters
  • number: Number to round.
Returned value

The INT function returns an integer.

Additional Information

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.

Examples

This example applies the INT function to a set of real numbers:

INT function. Example of use

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:

Rounding functions

Related functions
Category
Mathematical and trigonometric
Submitted by admin on Tue, 12/04/2018 - 12:21