Export (0) Print
Expand All
Expand Minimize

TRUNC Function

Last modified: June 17, 2011

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example 1
Example 2
Example 3

Returns a number truncated to the specified number of digits.

TRUNC(number,numberofdigits)

Parameters

Name

Required/Optional

Data Type

Description

number

Required

Numeric

The number to truncate.

numberofdigits

Required

Numeric

The number of digits to which to truncate number.

Return Value

Numeric.

If numberofdigits is greater than 0, number is truncated to numberofdigits to the right of the decimal. If numberofdigits is 0, number is truncated to an integer. If numberofdigits is less than 0, number is truncated to numberofdigits to the left of the decimal.

TRUNC(123.654,2)

Returns 123.65.

TRUNC(123.654,0)

Returns 123.

TRUNC(123.654,-1)

Returns 120.

Show:
© 2015 Microsoft