Int() Function



The Excel INT function returns the integer part of a decimal number by rounding down to the integer. Note the INT function rounds down, so negative numbers become more negative. For example, while INT(10.8) returns 10, INT(-10.8) returns -11.


Syntax

The syntax for the INT function in Microsoft Excel is:

=INT( expression )

Parameters or Arguments

expression

A numeric expression whose integer portion is returned.

Excel Int Function Examples

The following spreadsheets show the Excel Int function applied to different numbers:

Formulas:


A
B
1

=INT(100.9)
2
5.22
=INT( A2 )
3
5.99
=INT( A3 )
4
99.5
=INT( A4 )
5
-6.1
=INT( A5 )
6
-100.9
=INT( A6 )

Results:


A
B
1

100
2
5.22
5
3
5.99
5
4
99.5
99
5
-6.1
-7
6
-100.9
-101

The above examples show how the Int function always rounds down. Even with negative numbers, the function rounds down (away from zero).

References


No comments:

Post a Comment

OR Function