This article describes the purpose and use of the TRUNC function in Microsoft Excel.
Description
The TRUNC functions truncates a number to an integer by removing the fractional part of the number.
Syntax
TRUNC(number, [num_digits])
The TRUNC function syntax has the following arguments:
-
Number Required. The number you want to truncate.
-
Num_digits Optional. A number specifying the precision of the truncation. The default value for num_digits is 0 (zero).
Comparison with the INT function
TRUNC and INT are somewhat similar functions in that they both return integers. TRUNC simply removes the fractional part of the number, whereas INT returns the nearest lower integer (not necessarily smaller in magnitude). The difference occurs with negative numbers: TRUNC(-4.3) returns -4, but INT(-4.3) returns -5 because -5 is the lower number. See also INT function.
Example
From the table below, copy the example Formula and paste it into cell A1 of a new Excel worksheet. If you do not automatically see the results, select the formula, press F2 and press Enter. Adjust column width if needed to see the full results.
Formula |
Description |
Result |
---|---|---|
=TRUNC(8.9) |
Truncates 8.9 to return the integer part (8). |
8 |
=TRUNC(-8.9) |
Truncates a negative number to return the integer part (-8). |
-8 |
=TRUNC(0.45) |
Truncates a number between 0 and 1, returning the integer part (0). |
0 |