1. Another formula also can help you to calculate the days in a month, please apply this formula: =DAY(EOMONTH(A2,0)). 2. In the above formulas, A2 is the date cell that you want to get the number of days in a month based on.