What is TRUNC in Excel

TRUNC Function TRUNC Function

  • 2 minutes to read

Returns a number truncated to the specified number of digits.

Syntax syntax

TRUNC (** number **, ** numberofdigits **) TRUNC (** number **, ** numberofdigits ** )

ParameterParameters

SurnameSurnameRequired / OptionalRequired / OptionalData typeData typedescriptionDescription
numbernumber
Required
NumericNumeric
The number to truncate.
numberofdigitsnumberofdigits
Required
NumericNumeric
The number of digits to which the number will be truncated should.The number of digits to which to truncate number.

Return value

Numeric. Numeric.

NotesRemarks

If numberofdigits is greater than 0, will numberon numberofdigits truncated to the right of the decimal point If numberofdigits is greater than 0, number is truncated to numberofdigits to the right of the decimal. If numberofdigits 0 is will number truncated to an integer If numberofdigits is 0, number is truncated to an integer numberofdigits is less than 0, will numberleft on numberofdigits truncated from the decimal separator If numberofdigits is less than 0, number is truncated to numberofdigits to the left of the decimal.

Example 1

TRUNC (123,654.2) TRUNC (123,654.2)

Returns 123.65. Returns 123.65.

Example 2

TRUNC (123,654.0) TRUNC (123,654.0)

Returns 123, returns 123.

Example 3

TRUNC (123.654, -1) TRUNC (123.654, -1)

Returns 120, returns 120.