1,283. Why Some Months Have Two Days of Rosh Chodesh

Hilchos Kiddush HaChodesh 8:3

If a lunar month were exactly 29 and a half days, a year would be made of six malei months and six chaseir months, totaling exactly 354 days in a lunar year. It is the chalakim of each month beyond that half day that add up, making some years have more chaseir months and others have more malei months.

Hilchos Kiddush HaChodesh 8:4

Based on this, the 30th day of a month is always Rosh Chodesh. If the month is chaseir, the 30th day is Rosh Chodesh of the next month. If the month is malei, there will be two days of Rosh Chodesh; the 30th day will be Rosh Chodesh because part of it is Rosh Chodesh but it is counted as the last day of the previous month. The 31st day is also Rosh Chodesh, from which the days of the new month are counted. This is why some months have one day of Rosh Chodesh while others have two.