TRUNC()

Syntax. TRUNC(number,num_digits)

Definition. This function truncates the decimal places of a number and returns an integer.

Arguments

  • number (required) The number you want to truncate.

  • num_digits (optional) A number indicating the precision of the truncation. The default value for num_digits is 0. You can specify positive and negative values for the num_digits argument.

Background. The TRUNC() function removes the fractional part of a number up to the decimal places specified in num_digits. If num_digits is omitted, the number is truncated to the integer.

The TRUNC() and ROUND() functions return the same result. The difference between both functions is that specifying the number of digits to truncate is optional for TRUNC(), but for ROUND() ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.