TRUNC

Remove the fractional part of a number, or keep a set number of decimals, without rounding.

Syntax

TRUNC(number, [num_digits])
Argument Required Description
number Required The number to truncate.
num_digits Optional Decimal places to keep. Defaults to 0.

Examples

Every example below was executed against VisiGrid engine 0.51.0 — not transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.

Formula Result Notes
=TRUNC(4.789,2) 4.78 The third decimal is dropped, not rounded.
=TRUNC(-4.7) -4 Towards zero.
=INT(-4.7) -5 INT goes the other way for negative numbers.
=TRUNC(0.29,2) 0.29

TRUNC or INT

For positive numbers they agree. For negative ones, TRUNC removes the fraction and moves towards zero, while INT rounds down towards negative infinity:

=TRUNC(-4.7)  → -4
=INT(-4.7)  → -5

Use TRUNC when you want “the whole-number part” of a value regardless of its sign — whole units of a signed quantity, say. With a digit count it is the same as ROUNDDOWN.

Excel compatibility

Matches Excel.

Related functions

Last updated