# Documentation/Calc Functions/TRUNC

Jump to navigation Jump to search
Other languages:
English • ‎dansk

TRUNC

Mathematical

## Summary:

Truncates a number by removing decimal places.

## Syntax:

TRUNC(Number; Count)

## Returns:

Returns Number with at most Count decimal places. Excess decimal places are simply removed, irrespective of sign.

## Arguments:

Number is a real number or a reference to the cell containing that number which you want to truncate.

Count is an integer specifying the precision of the truncation. The default value for Count is 0 hence the function returns the integer part of the Number.

If Count is a non-integer value then the function takes the floor of it, i.e. truncates it to an integer.

## Additional details:

TRUNC(Number; 0) behaves as INT(Number) for positive numbers, but effectively rounds towards zero for negative numbers. Warning: The visible decimal places of the result are specified in Tools > Options > LibreOffice Calc > Calculate.

## Examples:

Formula Description Returns
=TRUNC(1.239;2) truncates 1.239 to 2 decimal places 1.23
=TRUNC(-1.234999;3) truncates -1.234999 to 3 decimal places -1.234

TRUNC