The INT function in Google Sheets is a powerful tool designed to truncate decimal values by rounding them down to the nearest whole number. It is particularly useful in various mathematical applications where only integer values are required, facilitating more precise data analysis and reporting.
Syntax
INT(value)
- value: The numeric value you want to round down. This can be a direct number, a cell reference containing a number, or a formula that returns a number.
Example #1
INT(3.7)
This function call rounds 3.7 down to the nearest integer, resulting in 3.
Example #2
INT(-2.8)
Here, -2.8 is rounded down to the nearest integer, producing a result of -3.
Example #3
INT(A1)
If cell A1 contains the value 5.9, this function will round it down to 5, as it truncates the decimal portion.
Error handling
- VALUE! – This error occurs if the input is not a number or a reference to a cell that does not contain a numeric value.
- NAME? – This error happens if the function is misspelled, indicating that Google Sheets does not recognize it.
- DIV/0! – Although not common with the INT function, this may occur in scenarios where a division operation is involved and the divisor is zero.