Excel TRUNC Function



Basic Description

The Excel Trunc function truncates a supplied number, to a specified number of decimal places.

The syntax of the function is:

TRUNC( number, [num_digits] )

Where the arguments are listed in the table below:


number - The initial number that is to be truncated.
[num_digits] -

An optional argument that specifies the number of decimal places to truncate the supplied number to. The default value is 0.

Note that:
  • a positive [num_digits] value specifies a number of digits to the right of the decimal point
  • if [num_digits] is omitted or has a value of 0, this specifies rounding to an integer
  • a negative [num_digits] value specifies a number of digits to the left of the decimal point


Trunc Function Examples

The following spreadsheet shows the Excel Trunc function used with different argument values:

 Formulas:
  A B
1   =TRUNC( 99.999, 1 )
2 99.999 =TRUNC( A2, 2 )
3 99.999 =TRUNC( A3 )
4 99.999 =TRUNC( A4, -1 )
5 -99.999 =TRUNC( A5, 2 )
6 -99.999 =TRUNC( A6, -1 )
 Results:
  A B
1   99.9
2 99.999 99.99
3 99.999 99
4 99.999 90
5 -99.999 -99.99
6 -99.999 -90

The example in cell B3 of the above spreadsheet shows that, when the [num_digits] argument is omitted, it takes the default of 0. i.e. the supplied number is truncated to an integer.

Further information on the Excel Trunc Function is provided on the Microsoft Office website.

Return to the Excel Math Functions Page

Return to the List of All Built-In Excel Functions

Valid XHTML 1.0 Transitional Valid CSS!
Disclaimer   Privacy Policy
Copyright © 2008-2013 ExcelFunctions.net