TRUNC Function
Removes the fractional part of a number and it to an integer
Removes the fractional part of a number and it to an integer
The TRUNC function is a Math and Trigonometry function. It removes the fractional part of a number and thus truncates a number to an integer. It was introduced in MS Excel 2007.
In financial analysis, the function can be used to truncate a number to a given precision. It is also useful for extracting dates from date and time values.
=TRUNC(number,[num_digits])
The TRUNC function uses the following arguments:
Now, if the num_digits argument is:
To understand the uses of the TRUNC function, let’s consider a few examples:
Suppose we are given the following data:
We get the results below:
The TRUNC function does not round off but simply truncates a number as specified. The function can also be used to return a set number of decimal places without rounding off using the num_digits argument. For example, =TRUNC(PI(),2) will return Pi value truncated to two decimal digits, which is 3.14, and =TRUNC(PI(),3) will return Pi value truncated to three decimal places, which is 3.141.
Suppose we are given the following dates and time from an external source:
The formula to extract the date is:
We get the result below:
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.
Click here to download the sample Excel file
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional resources:
To master the art of Excel, check out CFI’s FREE Excel Crash Course, which teaches you how to become an Excel power user. Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.
Launch CFI’s Free Excel Course now to take your career to the next level and move up the ladder!