# 8. Excel How to calculate days between 2 dates ?

Excel stores dates as numbers. The number related to a date is called the Serial Number.

To calculate the number of days between two dates, simply write :

= end_date - start_date

## Example

For example, the following extract:

In cell C2 I simply wrote the formula :

= B2-A2

Small problem with this difference if one or both values are date-time, then the difference gives a value with decimal part :

An alternative is to use the DAYS function.

*DAYS Function*

The DAYS function returns the number of days between two dates.

The DAYS function ignores the time and always returns an integer value.

For information on how Excel handles Date Times and the Excel Date functions, see Date functions.