how to use excel trunc functionTruncate Decimals with Trunc Function

TRUNC Function can be helpful to remove fractional part of a number.

In simple words, it will remove decimals from a number to a specific precision and then return integer part in the result.

In below example, I have used this excel function to truncate decimals and it has returned the integer part of the number without decimals as I have specified precision to zero.

Definition of Excel Trunc Function

Syntax

TRUNC(number, [num_digits])

number Number you want to truncate

[num_digits] A number to specify precision to truncate a number.

More Information for Excel TRUNC Function

  • TRUNC is similar to INT in work.
  • The difference is that trunc only remove decimals from a number where INT remove decimals by rounding down the number to the nearest integer.

Examples

In below example, I have used this function to truncate data for removing time from the dates.

As you know, excel dates are numbers in actual and time is in decimals. To convert above data into dates I have used trunc formula.

Examples To Understand Excel Trunc Function

Sample File
download sample file to learn about excel trunc function

What’s Next?

To learn more about Excel TRUNC Function you can check Microsoft’s Help Section. And, if you have a unique idea to use the trunc function, I would love to hear from you.

There is also you have INT  function which is highly useful like trunc function. Apart from this, I have a list of excel functions and some real life formulas examples.