How to Use the INT Function in Microsoft Excel

When working with financial data, inventory counts, or time-tracking spreadsheets in Microsoft Excel, you frequently encounter decimals. However, you can’t sell 4.8 laptops, and you might not want to pay out partial hours for a shift.

If you need to quickly strip the decimal portion away from a number and leave only the whole number behind, you should use the INT (Integer) function.

How the INT Function Works

The INT function is incredibly simple. It takes a number and rounds it down to the nearest integer (whole number).

Syntax: =INT(number)

For example, if you type =INT(8.9) into a cell, Excel will output 8.

Notice that it does not round up to 9, even though 8.9 is very close to 9. The INT function does not care about standard mathematical rounding rules; it simply forces the number down to the nearest whole integer beneath it.

How INT Differs from TRUNC and ROUND

It is easy to confuse INT with other rounding functions in Excel, but they behave very differently, especially when dealing with negative numbers.

  • ROUND: Follows standard math rules. =ROUND(8.9, 0) will round up to 9. INT will always go down to 8.
  • TRUNC: The TRUNC (Truncate) function simply chops off the decimals without rounding at all. For positive numbers, TRUNC and INT produce the exact same result (=TRUNC(8.9) is 8, and =INT(8.9) is 8).

However, when you use negative numbers, INT and TRUNC diverge.

If you use =TRUNC(-8.9), Excel just chops off the decimal, leaving -8.

If you use =INT(-8.9), Excel must round down to the nearest integer. Because -9 is smaller (lower) than -8, the INT function will output -9.

A Practical Example: Calculating Age

A very common use case for the INT function is calculating someone’s exact age in years based on today’s date.

If Cell A2 contains a birthdate (e.g., 1/1/1990), you can calculate the number of days they have been alive by subtracting the birthdate from today: =(TODAY()-A2).

To convert those days into years, you divide by 365.25 (accounting for leap years): =(TODAY()-A2)/365.25.

However, this will output a messy decimal like 34.6 years. You don’t say you are 34.6 years old; you are simply 34 until your next birthday. To fix this, wrap the entire formula in the INT function.

=INT((TODAY()-A2)/365.25)

The INT function strips away the .6, leaving a perfectly clean whole number of 34.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.

Receive our best articles and tips delivered straight to your inbox.