TRUNC

TRUNC(number [,num_digits])

Returns the number rounded towards zero and truncated to a certain number of decimal places or digits.

numberThe number you want to truncate.
num_digits(Optional) The number of decimal places or digits (0):
(= 0) no decimal places
(> 0) the number of decimal places
(< 0) the number of digits to the left of the decimal point.

REMARKS
* For an illustrated example refer to the Rounding Functions page.
* Positive decimal numbers are rounded down.
* Negative decimal numbers are rounded up.
* If the "num_digits" is left blank then 0 is used.
* If "num_digits" is greater than the number of digits, then "number" is returned without any modification.
* You can use the ROUND function to round to a certain number of decimal places or digits.
* You can use the ROUNDDOWN function to round towards zero to a certain number of decimal places or digits.
* You can use the ROUNDUP function to round away from zero to a certain number of decimal places or digits.
* You can use the INT function to return a number rounded down to the nearest integer.
* You can use the EVEN function to round up to the nearest even integer.
* You can use the ODD function to round up to the nearest odd integer.
* You can use the CEILING.MATH function to round up by default to a certain multiple.
* You can use the FLOOR.MATH function to round down by default to a certain multiple.
* For the Microsoft documentation refer to support.microsoft.com

 A
1=TRUNC(1.1) = 1
2=TRUNC(1.9) = 1
3=TRUNC(-1.1) = -1
4=TRUNC(-1.9) = -1
5=TRUNC(1234, 3) = 1234.000
6=TRUNC(1234, -1) = 1230
7=TRUNC(1234, -3) = 1000
8=TRUNC(1234.567, 1) = 1234.5
9=TRUNC(1234.567, -1) = 1230
10=TRUNC(1234.567, -5) = 0
11=TRUNC(PI(), 3) = 3.141
12=TRUNC("text") = #VALUE!

1 - What is the number 1.1 rounded down and truncated to 0 decimal places.
2 - What is the number 1.9 rounded down and truncated to 0 decimal places.
3 - What is the number -1.1 rounded up and truncated to 0 decimal places.
4 - What is the number -1.9 rounded up and truncated to 0 decimal places.
5 - What is the number 1234 rounded down and truncated to 3 decimal places.
6 - What is the number 1234 rounded down and truncated to -1 digits.
7 - What is the number 1234 rounded down and truncated to -3 digits.
8 - What is the number 1234.567 rounded down and truncated to 1 decimal place.
9 - What is the number 1234.567 rounded down and truncated to -1 digits.
10 - What is the number 1234.567 rounded down and truncated to -5 digits.
11 - What is the number PI rounded down and truncated to 3 decimal places.
12 - When number is not numeric.

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top