# TRUNC

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function removes the specified fractional part of the specified number.

## Syntax

TRUNC(*value*,*precision*)

## Arguments

This function has these arguments:

| **Argument** | **Description** |
| -------- | ----------- |
| *value* | Number to truncate |
| *precision* | Integer representing the precision; if greater than zero, truncates to the specified number of decimal places; if zero (or not specified), truncate to the nearest whole number; if less than zero, rounds the value left of the decimal to the nearest order of tens |

## Remarks

The TRUNC and [INT](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsFtoK/FunctionINT) functions are similar in that both can return integers. Use the TRUNC function to remove the decimal portion of the number; the TRUNC function does not round up or down. Use the [INT](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsFtoK/FunctionINT) function to round numbers down to the nearest integer based decimal portion of the number.
These functions differ also when using negative numbers: TRUNC(–4.2, 0) returns –4, but INT(–4.2) returns –5 because –5 is the lower number.

## Data Types

Accepts numeric data for both arguments. Returns numeric data.

## Examples

`TRUNC(B16)`
`TRUNC(R16C2)`
`TRUNC(5.745)` gives the result 5
`TRUNC(-5.745)` gives the result -5
`TRUNC(5.745,2)` gives the result 5.74
`TRUNC(PI())` gives the result 3

## Version Available

This function is available in product version 1.0 or later.

## See Also

[CEILING](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsAtoC/FunctionCEILING) \| [EVEN](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsDtoG/FunctionEVEN) \| [FLOOR](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsDtoG/FunctionFLOOR) \| [INT](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsFtoK/FunctionINT) \| [Math and Trigonometry Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsmathtrig)