# Documentation/Calc Functions/TRUNC

Other languages:
English

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(Optional) is an integer specifying the precision of the truncation. The default value for Count is 0 hence function returns the integer part of the Number.

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

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

ROUND

INT

## ODF standard:

Section 6.17.8, part 2

TRUNC