說明
Use this function to round a number down to the nearest integer.
INT removes the fractional part of a number, always rounding down to the nearest integer. It's useful for extracting the integer part of a number or for floor division operations.
語法
INT(number)
Inputs
This function accepts the following argument:
名稱 | 必要 | 說明 | Valid input |
---|---|---|---|
數字 |
是 | The real number you want to round down to an integer. | A real number, a reference to a cell containing a real number, or a formula which results in either of these. |
範例
範例資料
A | B |
---|---|
數量 | 說明 |
3.14159 | Pi |
-2.718 | Negative e |
1234.5678 | Large number |
0.99999 | Almost one |
Sample formulas
公式 | 說明 | 結果 |
---|---|---|
=INT(A2) |
Rounds Pi down to the nearest integer. | 3 |
=INT(A3) |
Rounds negative e down to the nearest integer. | -3 |
=INT(A4) |
Rounds the large number down to the nearest integer. | 1234 |
=INT(A5) |
Rounds 0.99999 down to the nearest integer. | 0 |
=INT(4.9999) |
Rounds 4.9999 down to the nearest integer. | 4 |
附註
- INT always rounds down to the nearest integer, regardless of the decimal part of the
number
value. - For positive numbers, INT behaves the same as TRUNC.
- For negative numbers, INT rounds down (away from zero), while TRUNC rounds towards zero.
- INT(1.9999) returns 1, not 2.
- INT(-1.9999) returns -2, not -1.
提示
- Use INT when you need to find the floor value of a number.
- INT can be useful in financial calculations where you want to discard fractional parts.
- You can combine INT with other functions like MOD for more complex number manipulations.
- To round up to the nearest integer, place a negative sign (-) in front of the number. (
INT(-number)
). - Be aware of the differences between TRUNC and ROUND to choose the appropriate function for your needs.
- Consider using the other rounding functions (linked below) if you need to round numbers in a different manner.