Days between two days by month SQL
This is a situation that might benefit from use of a date table. https://www.mssqltips.com/sqlservertip/4054/creating-a-date-dimension-or-calendar-table-in-sql-server/

Then you can join on the date table for all dates between the DepartureDate and the ModelEndDate, something like this:

Select y.BlockID,
    DaysFreeJan = Sum(CASE WHEN d.MonthName = 'January' THEN 1 END),
    DaysFreeFeb = Sum(CASE WHEN d.MonthName = 'February'THEN 1 END),
    ...
  From dbo.YourTable As y
  Join dbo.DateTable On d 
    On y.DepartureDate &lt; d.DateKey
    And y.ModelEndDate &gt;= d.DateKey
  Group By y.BlockID;


So each row of your table will join to multiple rows in your date table, then this query counts how many of those rows there are in each month.