I need to calculate the number of months in the intersection of two date ranges.

For instance, in Column A I have start dates of employment

```
12/1/1998, 1/1/2003, 2/1/1995
```

and in column B I have end dates of employment, ie.

```
12/31/2005, 2/28/2009, and still employed.
```

I need to calculate the number of months each employee was employed from 01/01/2000 to 05/01/2006 (total of 76, maximum).

Is there a formula I can use to calculate only the relevant period in months?

I use Excel 2013.

needto make your question clearer … but, look at`=MAX(A1,DATE(2000,1,1))`

and`=MIN(B1, DATE(2006,5,1))`

. Determining the number of months between those two dates might be what you want. And see How to calculate age in years? for ideas on how to determine the difference between two dates, and How to divide a time period into equal time periods for other considerations. – Scott Apr 9 '15 at 6:58