INT Function (OpenOffice Calc)
The INT function in OpenOffice Calc rounds a number down to the nearest integer. Learn syntax, behavior with negative numbers, examples, and best practices.
Compatibility
βΎ| Excel | β |
| Gnumeric | β |
| Google_sheets | β |
| Libreoffice | β |
| Numbers | β |
| Onlyoffice | β |
| Openoffice | β |
| Wps | β |
| Zoho | β |
What the INT Function Does βΎ
- Rounds a number down to the nearest integer
- Always rounds toward negative infinity
- Works with positive and negative numbers
- Useful for indexing, grouping, and integer math
- Works across sheets
INT is ideal when you need consistent downward rounding.
Syntax βΎ
INT(number)
Arguments:
- number β Any numeric value or formula result
INT always rounds down, not toward zero.
This is the key difference between INT and TRUNC.
This is the key difference between INT and TRUNC.
Behavior With Positive and Negative Numbers βΎ
| Input | INT Result | Explanation |
|---|---|---|
| 7.9 | 7 | Rounded down |
| 7.1 | 7 | Rounded down |
| -7.1 | -8 | Rounded down (toward ββ) |
| -7.9 | -8 | Rounded down (toward ββ) |
This makes INT especially important when working with negative values.
Basic Examples βΎ
Round down to nearest integer
=INT(7.9)
Result: 7
Round down a negative number
=INT(-7.1)
Result: -8
Remove decimals from a formula result
=INT(A1 / B1)
INT with cell reference
=INT(A1)
Advanced Examples βΎ
Extract the integer part of a division
=INT(A1 / 12)
Useful for converting months to years, items to boxes, etc.
INT for binning or grouping
Group values into buckets of 10:
=INT(A1 / 10) * 10
INT for date/time calculations
Extract whole days from a datetime:
=INT(A1)
INT across sheets
=INT(Sheet1.A1)
INT for indexing arrays
=INDEX(Data; INT(A1))
INT for pagination logic
Page number from row:
=INT((ROW()-1) / 50) + 1
INT for random integer ranges
=INT(RAND() * 100)
Returns 0β99.
Comparison: INT vs TRUNC vs FLOOR βΎ
| Function | Rounds Toward | Example: -7.1 | Notes |
|---|---|---|---|
| INT | ββ | -8 | Always down |
| TRUNC | 0 | -7 | Removes decimals without rounding |
| FLOOR | ββ | -8 | Rounds down to a multiple |
INT is the simplest of the three.
Common Errors and Fixes βΎ
INT returns Err:502 (Invalid argument)
Occurs when:
- Input is text
- Input is empty
- A malformed reference is used
INT returns unexpected values
Possible causes:
- Negative numbers rounding further down than expected
- Text numbers not converted to numeric
- Hidden spaces in cells
INT ignores values you expected it to include
INT ignores:
- Text numbers (
"123") - Empty cells
- Logical values
- Errors
INT includes values you expected it to ignore
INT includes:
- Dates
- Times
- Numeric results of formulas
Err:508 β Missing parenthesis
Usually caused by:
- Missing
) - Using commas instead of semicolons
Best Practices βΎ
- Use INT when rounding must go downward
- Use TRUNC when rounding must go toward zero
- Use FLOOR when rounding to a multiple
- Convert imported text numbers to real numbers
- Use named ranges for cleaner formulas
INT is perfect for indexing, binning, and pagination β anywhere you need predictable downward rounding.