What’s the Difference between INT, TRUNC, and ROUND?
The Excel functions INT, TRUNC, and ROUND all do similar things. What’s the difference?
INT Truncates a number down to the nearest integer
TRUNC Truncates a number towards zero. It truncates to an integer or an optional number of decimals.
INT and TRUNC produce the same result with positive numbers. They differ in the way they handle negative numbers.
INT is unique among the functions in this post, in that INT truncates downwards (smaller, more negative). All the others truncate or round towards zero. Thus,
TRUNC(number) = -TRUNC(-number)
whereas
INT(number) = -INT(-number)-1
The examples below illustrate this.
Is Truncating the Same as Rounding?
No! “Truncate” means that it cuts off the decimals: It does not “round”, although you will find many sites using that term incorrectly. Even with 0.9999, truncating to an integer will remove the fractional part and give 0. It does not round (go to the nearest number), which in this example would be 1.
Syntax of INT and TRUNC
INT(number)
The INT function takes one argument:
- Number (required): The real number you want to truncate down to an integer.
TRUNC(number, [num_digits])
The TRUNC function takes two arguments:
- Number (required): The real number you want to truncate.
- Num_digits (optional): The number of decimal digits for the result. The default value for num_digits is 0 (zero), producing an integer result. For negative values, -1 to truncate to tens, -2 for hundreds, -3 for thousands, and so on. If num_digits is not an integer, Excel uses only the integer part.
Similar Functions
ROUNDDOWN(number, num_digits) is identical in all respects to TRUNC except that with TRUNC, the num_digits argument is optional. With ROUNDDOWN, num_digits is a required argument.
“ROUNDDOWN” is a misnomer, since it doesn’t round, but truncates.
ROUNDUP also truncates, but towards larger absolute values.
ROUND(number, num_digits) really rounds, to the nearest digit (up or down as required)
EVEN & ODD, two obscure functions, compute respectively the nearest even or odd integer equal to or above the argument. If the argument is already an even or odd integer respectively, then it is returned unchanged. Otherwise, the result is further from zero (negatives become more negative).
MROUND(number, multiple) Rounds to a multiple. It genuinely rounds, taking the result to the nearest multiple. A quirk of MROUND is that number and multiple must have the same sign.