The TRUNC function truncates a number to a specified number of decimal places. The key factor that makes TRUNC different from other functions that remove decimal places is that the TRUNC function does not round values. If you use TRUNC to remove all the decimals from the value 4.68, the result is 4.
Syntax: =TRUNC (number, [num_digits])
The TRUNC function syntax has the following arguments:
- Number (required argument) – This is the number we wish to truncate.
- Num_digits (optional argument) – This is a number that specifies the precision of the truncation. If kept blank, it will take 0 as the default value.
Example: Let’s look at some Excel TRUNC function examples and explore how to use the TRUNC function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following TRUNC examples would return:
- TRUNC and INT are similar functions because they both return the integer part of a number. The difference is that TRUNC merely truncates a number, but INT rounds off a number.
However, for positive numbers, as well as when TRUNC uses 0 as the default for num_digits, both functions will return the same results.
With negative numbers, the results can be different. =INT(-2.1) returns -3, because INT rounds down to the lower integer. =TRUNC(-2.1) returns -2.