TRUNC function
TRUNC chops extra digits off a number without rounding, so 8.97 becomes 8.9 at one decimal place. For negative numbers it differs from INT, which rounds down.
Example
Read it as a sentence: cut -8.97 down to 1 decimal place without rounding, which gives -8.9.
A
B
C
D
1
-8.9
2
3
Syntax
TRUNC(number, [num_digits])
Arguments in [square brackets] are optional.
-
number(required) - The value to cut.
-
num_digits(optional) - Decimal places to keep. Default 0; negative cuts left of the point.
Returns: The number with extra digits chopped off, no rounding.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=TRUNC(2.9) | 2 | 2.9 |
=TRUNC(-2.9) | -2 | -2.9 |
=TRUNC(2.345,1) | 2.3 | Digits 1 |
=TRUNC(1234,-1) | 1230 | Digits -1 |
=TRUNC("2.9") | 2 | Text number |
=TRUNC(TRUE) | 1 | TRUE |
=TRUNC({1.5,-1.5}) | 1 | Spill |
=TRUNC("abc") | #VALUE! | Text |
Watch out for
- TRUNC(-8.9) is -8 but INT(-8.9) is -9.
Where it works
- Excel
- TRUNC is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Math and trig functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .