Halacha

הלכה א
אֵין קוֹבְעִין לְעוֹלָם רֹאשׁ חֹדֶשׁ תִּשְׁרֵי לְפִי חֶשְׁבּוֹן זֶה לֹא בְּאֶחָד בְּשַׁבָּת וְלֹא בִּרְבִיעִי בְּשַׁבָּת וְלֹא בְּעֶרֶב שַׁבָּת. סִימָן לָהֶם אד''ו. אֶלָּא כְּשֶׁיִּהְיֶה מוֹלַד תִּשְׁרֵי בְּאֶחָד מִשְּׁלֹשָׁה יָמִים הָאֵלּוּ קוֹבְעִין רֹאשׁ חֹדֶשׁ בַּיּוֹם שֶׁלְּאַחֲרָיו. כֵּיצַד. הֲרֵי שֶׁהָיָה הַמּוֹלָד בְּאֶחָד בְּשַׁבָּת קוֹבְעִין רֹאשׁ חֹדֶשׁ תִּשְׁרֵי יוֹם שֵׁנִי. וְאִם הָיָה הַמּוֹלָד בִּרְבִיעִי קוֹבְעִין רֹאשׁ חֹדֶשׁ יוֹם חֲמִישִׁי. וְאִם הָיָה הַמּוֹלָד בְּשִׁשִּׁי קוֹבְעִין רֹאשׁ חֹדֶשׁ בִּשְׁבִיעִי:
כסף משנה
1.
[Rosh Chodesh is generally instituted on the day of the conjunction. Nevertheless,] Rosh Chodesh Tishrei1Which is also Rosh HaShanah. should never be established on a Sunday, a Wednesday, or a Friday - in symbols, אד"ו - although, according to these calculations, [the conjunction for the month will occur on these days]. Instead, when the conjunction for the month of Tishrei occurs on any of these three days, Rosh Chodesh should be established on the following day.2The Rambam mentions the reason for postponing Rosh Chodesh in Halachah 7.
What is implied? When the conjunction occurs on Sunday, Rosh Chodesh Tishrei should be established on Monday. When the conjunction occurs on Wednesday, Rosh Chodesh Tishrei should be established on Thursday. When the conjunction occurs on Friday, Rosh Chodesh Tishrei should be established on the Sabbath.3The first day of Rosh HaShanah is therefore celebrated frequently on Monday, Thursday, and the Sabbath, for the holiday is held on these days when the conjunction falls on the day itself or on the previous day. The first day of Rosh HaShanah is rarely celebrated on Tuesday, for the probability of the conjunction falling on that day is merely one out of seven, half that of the other days.

הלכה ב
וְכֵן אִם יִהְיֶה הַמּוֹלָד בַּחֲצִי הַיּוֹם אוֹ לְמַעְלָה מֵחֲצִי הַיּוֹם קוֹבְעִין רֹאשׁ חֹדֶשׁ בַּיּוֹם שֶׁלְּאַחֲרָיו. כֵּיצַד. הֲרֵי שֶׁהָיָה הַמּוֹלָד בְּיוֹם שֵׁנִי בְּשֵׁשׁ שָׁעוֹת בַּיּוֹם אוֹ יֶתֶר עַל שֵׁשׁ שָׁעוֹת קוֹבְעִין רֹאשׁ חֹדֶשׁ בִּשְׁלִישִׁי. וְאִם יִהְיֶה הַמּוֹלָד קֹדֶם חֲצִי הַיּוֹם אֲפִלּוּ בְּחֵלֶק אֶחָד קוֹבְעִין רֹאשׁ הַחֹדֶשׁ בְּאוֹתוֹ יוֹם הַמּוֹלָד עַצְמוֹ. וְהוּא שֶׁלֹּא יִהְיֶה אוֹתוֹ הַיּוֹם מִימֵי אד''ו:
כסף משנה
2.
Similarly, if the conjunction [for the month of Tishrei]4The principle mentioned in this halachah - and indeed, in the entire chapter - applies to Rosh Chodesh Tishrei alone, and not to the other months. takes place at noon or after noon, Rosh Chodesh should be established on the following day.5This condition is referred to as a molad zaken, literally, "an aged conjunction." The rationale for postponing Rosh HaShanah in such a situation can be explained as follows: In principle, Rosh Chodesh is dependent on the sighting of the moon, not on the conjunction. As is explained in the subsequent chapters of the text, the new moon does not become visible until several hours after the conjunction between the moon and the sun. Thus, if the conjunction takes place after noon, it is impossible for the moon to be sighted on that day. Therefore, Rosh HaShanah is celebrated on the following day. (See Rosh HaShanah 20b and commentaries.)
There is a slight difficulty in the Rambam's statements, for based on Chapter 15, Halachah 2, it would appear that at certain times it is possible to sight the moon only five hours after conjunction.

What is implied? When the conjunction takes place on Monday, six hours after daybreak or later, Rosh Chodesh is established on Tuesday. If, however, the conjunction takes place before noon, even if only a single unit prior, Rosh Chodesh is established on the day of the conjunction, provided that day is neither Sunday, Wednesday, nor Friday.

הלכה ג
כְּשֶׁיִּהְיֶה הַמּוֹלָד בַּחֲצִי הַיּוֹם אוֹ אַחַר חֲצוֹת וְיִדָּחֶה לַיּוֹם שֶׁלְּאַחֲרָיו. אִם יִהְיֶה יוֹם שֶׁלְּאַחֲרָיו מִימֵי אד''ו הֲרֵי זֶה נִדְחֶה לְשֶׁלְּאַחֲרָיו וְיִהְיֶה רֹאשׁ הַחֹדֶשׁ קָבוּעַ בִּשְׁלִישִׁי מִיּוֹם הַמּוֹלָד. כֵּיצַד. הֲרֵי שֶׁיִּהְיֶה הַמּוֹלָד בְּשַׁבָּת בַּחֲצוֹת סִימָן זי''ח קוֹבְעִין רֹאשׁ הַחֹדֶשׁ בַּשָּׁנָה שֶׁמּוֹלָדָהּ כָּזֶה בְּשֵׁנִי בְּשַׁבָּת. וְכֵן אִם הָיָה הַמּוֹלָד בִּשְׁלִישִׁי בַּחֲצוֹת אוֹ אַחַר חֲצוֹת קוֹבְעִין רֹאשׁ הַחֹדֶשׁ בַּחֲמִישִׁי בְּשַׁבָּת:
כסף משנה
3.
When the conjunction takes place at noon or after noon, and [Rosh Chodesh Tishrei would be] postponed to the following day - if that following day is either Sunday, Wednesday, or Friday, Rosh Chodesh is postponed again, and is established on the third day after the conjunction.
What is implied? If the conjunction takes place on the Sabbath after noon (in numbers, 7 - 186I.e., after the eighteenth hour of the seventh day.), in such a year Rosh Chodesh should be established on Monday.7It should not be established on the Sabbath, because of the principle of molad zaken. Nor should it be established on Sunday, as stated in Halachah 1. Similarly, if the conjunction takes place on Tuesday at noon or after noon, Rosh Chodesh should be established on Thursday.

הלכה ד
מוֹלַד תִּשְׁרֵי שֶׁיָּצָא בְּחֶשְׁבּוֹן זֶה בְּלֵיל שְׁלִישִׁי בְּתֵשַׁע שָׁעוֹת בַּלַּיְלָה וּמָאתַיִם וְאַרְבָּעָה חֲלָקִים מִשָּׁעָה עֲשִׂירִית סִימָנָהּ ג''ט ר''ד. אוֹ יוֹתֵר עַל זֶה. אִם הָיְתָה שָׁנָה פְּשׁוּטָה דּוֹחִין אֶת רֹאשׁ הַחֹדֶשׁ וְאֵין קוֹבְעִים אוֹתוֹ בִּשְׁלִישִׁי בְּשָׁנָה זוֹ אֶלָּא בַּחֲמִישִׁי בְּשַׁבָּת:
כסף משנה
4.
In an ordinary year, when the conjunction [of the month] of Tishrei falls on the night of the third day,8I.e., the night between Monday and Tuesday. nine hours and 204 units (in numbers, 3 - 9 - 204) or more after nightfall, Rosh Chodesh is postponed, and instead of being established on Tuesday, it is established on Thursday.9The rationale for the postponement of Rosh HaShanah in such a situation can be explained as follows: As explained in the following chapter, the maximum length of a lunar year is 355 days. As mentioned previously, 4 days, 8 hours, and 876 units is the remainder of a normal year. To calculate the conjunction of Tishrei in the following year, this figure should be added to 3 - 9 - 204 (the day and the time mentioned by the Rambam above). The result is 12:00 noon on the Sabbath.
As explained above, when the conjunction takes place at 12:00 noon or later, the celebration of Rosh HaShanah is postponed to the following day. In this instance, however, the following day is Sunday, and Rosh HaShanah never begins on that day. Thus, the holiday would have to be celebrated on Monday. If Rosh HaShanah had been celebrated on Tuesday of the previous year, there would have been a six-day difference between the days on which the holiday was celebrated in these two successive years, producing a year of 356 days, one day longer than the maximum length of an ordinary year. To avoid this, Rosh HaShanah is not celebrated on Tuesday. Since it also is never celebrated on Wednesday, it is postponed until Thursday, producing a lunar year of 354 days (Tur, Orach Chayim 428).

הלכה ה
וְכֵן אִם יָצָא מוֹלַד תִּשְׁרֵי בְּיוֹם שֵׁנִי בְּשָׁלֹשׁ שָׁעוֹת בְּיוֹם וְתקפ''ט חֲלָקִים מִשָּׁעָה רְבִיעִית. סִימָנָהּ בט''ו תקפ''ט. אוֹ יֶתֶר עַל כֵּן. אִם הָיְתָה אוֹתָהּ הַשָּׁנָה מוֹצָאֵי הַמְעֻבֶּרֶת שֶׁהָיְתָה הַשָּׁנָה הַסְּמוּכָה לָהּ שֶׁעָבְרָה מְעֻבֶּרֶת. אֵין קוֹבְעִין רֹאשׁ הַחֹדֶשׁ בְּשֵׁנִי בְּשָׁנָה זוֹ אֶלָּא בִּשְׁלִישִׁי:
כסף משנה
5.
A similar situation [may arise] in a year that follows a leap year: If the conjunction for Tishrei takes place on Monday, three hours and 589 units or more after daybreak (in numbers, 2 - 1510For three hours after daybreak is 15 hours after the beginning of the day. - 589), Rosh Chodesh is not established on Monday, but on Tuesday.11The rationale for the postponement of Rosh HaShanah in such a situation can be explained as follows: As explained in the following chapter, the minimum length of a lunar leap year is 383 days. As mentioned previously, the remainder of a leap year is five days, twenty-one hours, and 589 units. When, in an effort to calculate the time of the conjunction of the leap year, this figure is subtracted from 2 - 15 - 589 (the day and the time mentioned by the Rambam), the result is Tuesday at noon.
As mentioned, when the conjunction takes place at 12:00 noon or later, the celebration of Rosh HaShanah is postponed to the following day. In this instance, however, the following day is Wednesday, and Rosh HaShanah never begins on that day. Thus, in the leap year, Rosh HaShanah began on Thursday. If Rosh HaShanah were celebrated on Monday in the year after the leap year, this would produce only a four-day difference between the days on which the holiday was celebrated in these two successive years, causing the length of the year to be only 382 days. To avoid this, in the year following the leap year Rosh HaShanah is celebrated on Tuesday, rather than on Monday, causing the leap year to be 383 days long (Tur, Orach Chayim 428).

הלכה ו
הָיָה מוֹלַד הַשָּׁנָה הַפְּשׁוּטָה שֶׁאָמַרְנוּ שֶׁתִּדָּחֶה לַחֲמִישִׁי פָּחוֹת חֵלֶק אֶחָד. כְּגוֹן שֶׁיָּצָא סִימָנָהּ ג''ט ר''ג אוֹ פָּחוֹת מִזֶּה. קוֹבְעִין אוֹתָהּ בִּשְׁלִישִׁי. וְכֵן אִם הָיָה מוֹלַד מוֹצָאֵי הָעִבּוּר בְּיוֹם שֵׁנִי פָּחוֹת חֵלֶק. כְּגוֹן שֶׁהָיָה סִימָנָהּ בט''ו תקפ''ח אוֹ פָּחוֹת מִזֶּה. קוֹבְעִין אוֹתָהּ בְּשֵׁנִי. נִמְצָא דֶּרֶךְ קְבִיעַת רֹאשׁ חֹדֶשׁ תִּשְׁרֵי לְפִי חֶשְׁבּוֹן זֶה כָּךְ הוּא. תַּחְשֹׁב וְתֵדַע הַמּוֹלָד בְּאֵי זֶה יוֹם יִהְיֶה וּבְכַמָּה שָׁעוֹת מִן הַיּוֹם אוֹ מִן הַלַּיְלָה וּבְכַמָּה חֲלָקִים מִן הַשָּׁעָה. וְיוֹם הַמּוֹלָד הוּא יוֹם הַקְּבִיעָה לְעוֹלָם. אֶלָּא אִם כֵּן הָיָה בְּאֶחָד בְּשַׁבָּת אוֹ בִּרְבִיעִי אוֹ בְּעֶרֶב שַׁבָּת. אוֹ אִם הָיָה הַמּוֹלָד בַּחֲצוֹת הַיּוֹם אוֹ אַחַר חֲצוֹת. אוֹ אִם הָיָה בר''ד חֲלָקִים מִשָּׁעָה עֲשִׂירִית מִלֵּיל שְׁלִישִׁי אוֹ יוֹתֵר עַל זֶה וְהָיְתָה שָׁנָה פְּשׁוּטָה. אוֹ שֶׁהָיָה הַמּוֹלָד בתקפ''ט חֲלָקִים מִשָּׁעָה רְבִיעִית מִיּוֹם שֵׁנִי וְהָיְתָה הַשָּׁנָה פְּשׁוּטָה שֶׁאַחַר הַמְעֵבֶּרֶת. שֶׁאִם יֶאֱרַע בְּאֶחָד מֵאַרְבָּעָה דְּבָרִים הָאֵלּוּ אֵין קוֹבְעִין בְּיוֹם הַמּוֹלָד אֶלָּא בַּיּוֹם שֶׁלְּאַחֲרָיו אוֹ שֶׁלְּאַחַר אַחֲרָיו כַּדֶּרֶךְ שֶׁבֵּאַרְנוּ:
כסף משנה
6.
If, however, the conjunction of an ordinary year occurs [even] one unit earlier - i.e., were it to be 3 - 9 - 203 or earlier - [Rosh Chodesh] should be established on Tuesday, [rather than postponed until Thursday as mentioned above].
Similarly, if the conjunction of a year following a leap year occurs [even] one unit earlier - i.e., were it to be 2 - 15 - 588 or earlier - [Rosh Chodesh] should be established on Monday.
Thus, the way to determine [the day on which] Rosh Chodesh Tishrei will be established according to these calculations is as follows: One should first determine the day [of the week], the hour of the day - or night - and the number of units of the hour when the conjunction takes place. The day of the conjunction will be the day of Rosh Chodesh, except in the following instances:
a) [The conjunction] takes place on Sunday, Wednesday, or Friday;
b) The conjunction takes place at noon or after noon;
c) In an ordinary year, [the conjunction] takes place on the night of the third day, after 204 units of the tenth hour have passed, or later [that day];
d) In an ordinary year that follows a leap year, the conjunction takes place on Monday past 589 units of the fourth hour after daybreak has passed or later [that day].
If the conjunction occurs in one of these four instances, [Rosh Chodesh] is not established on the day of the conjunction, but rather on the day that follows, or on the day following that, as explained.

הלכה ז
וּמִפְּנֵי מָה אֵין קוֹבְעִין בְּחֶשְׁבּוֹן זֶה בִּימֵי אד''ו. לְפִי שֶׁהַחֶשְׁבּוֹן הַזֶּה הוּא לְקִבּוּץ הַיָּרֵחַ וְהַשֶּׁמֶשׁ בְּהִלּוּכָהּ הָאֶמְצָעִי לֹא בַּמָּקוֹם הָאֲמִתִּי כְּמוֹ שֶׁהוֹדַעְנוּ. לְפִיכָךְ עָשׂוּ יוֹם קְבִיעָה וְיוֹם דְּחִיָּה כְּדֵי לִפְגֹּעַ בְּיוֹם קִבּוּץ הָאֲמִתִּי. כֵּיצַד. בִּשְׁלִישִׁי קוֹבְעִין בִּרְבִיעִי דּוֹחִין. בַּחֲמִישִׁי קוֹבְעִין בְּשִׁשִּׁי דּוֹחִין. בְּשַׁבָּת קוֹבְעִין אֶחָד בְּשַׁבָּת דּוֹחִין. בְּשֵׁנִי קוֹבְעִין:
כסף משנה
7.
Why is [Rosh HaShanah] not established [on the day of the conjunction] when it falls on Sunday, Wednesday, or Friday? Because these calculations determine the conjunction of the sun and the moon only according to their mean [rate of] progress, and do not [necessarily] reflect the true position [of the sun and the moon in the celestial sphere], as explained. Therefore, they instituted that [on] one day [Rosh Chodesh] would be established and on the following day it would be postponed, so that they would ascertain the day when the true conjunction takes place.12The Rambam's statements have stirred the attention - and often the indignation - of the Ra'avad and other commentaries, because they appear to ignore the explanations given by Rosh HaShanah 20a why Rosh HaShanah never begins on these days. The Talmud states that if Rosh HaShanah falls on either Wednesday or Friday, Yom Kippur will fall on either Friday or Sunday, and thus there would be two consecutive days, Yom Kippur and the Sabbath, when it would be forbidden to bury the dead. In the Talmudic era, this could have caused a corpse to deteriorate, detracting from its honor and respect.
Alternatively, the Sages state that if Rosh HaShanah fell on any of these three days, there would be two successive days when it would be forbidden to pick fresh vegetables, and the people would be unable to celebrate the festivals or the Sabbath properly.
Sukkah 43a gives another reason why Rosh HaShanah is not held on Sunday: were this to be the case, Hoshana Rabbah, the seventh day of Sukkot, would fall on the Sabbath. In such an instance, restrictions were placed on the willow ritual in the Temple. (See Hilchot Shofar, Sukkah V'Lulav 7:21-22.) To avoid such an instance, the Sages structured the calendar so that Rosh HaShanah never falls on Sunday.
In defense of the Rambam's position, it must be noted that both earlier (Rabbenu Chanan'el) and subsequent (the P'nei Yehoshua) Talmudic commentaries understood the reasons given by the Talmud as being merely the external dimension of the rationale for the calendar's adjustment, while the inner meaning is associated with the actual position of the sun and the moon in the heavenly sphere.
Even according to this perspective, there is, however, a difficulty with the Rambam's statements. Although it is correct that the true positions of the sun and the moon often differ from the position determined by calculating their mean movement, the concept of postponing the celebration of Rosh HaShanah on these three days appears arbitrary and without any obvious connection to the movement of these bodies in the celestial sphere. The commentaries note that explanations why Rosh HaShanah is not celebrated on these days are found in the Kabbalah.

What is implied? [When according to our calculations, the conjunction occurs on] Tuesday, we establish [Rosh Chodesh]. [When it occurs] on Wednesday, we postpone it. [When it occurs] on Thursday, we establish [Rosh Chodesh]. [When it occurs] on Friday, we postpone it. [When it occurs] on the Sabbath, we establish [Rosh Chodesh]. [When it occurs] on Sunday, we postpone it. [When it occurs] on Monday, we establish [Rosh Chodesh].

הלכה ח
וְעִקַּר שְׁאָר הָאַרְבַּע דְּחִיּוֹת אֵלּוּ הוּא זֶה הָעִקָּר שֶׁאָמַרְנוּ שֶׁהַחֶשְׁבּוֹן הַזֶּה בְּמַהֲלָךְ אֶמְצָעִי. וּרְאָיָה לַדָּבָר שֶׁהַמּוֹלָד יִהְיֶה בְּלֵיל שְׁלִישִׁי וְיִדָּחֶה לַחֲמִישִׁי פְּעָמִים רַבּוֹת לֹא יֵרָאֶה יָרֵחַ בְּלֵיל חֲמִישִׁי וְלֹא בְּלֵיל שִׁשִּׁי מִכְּלַל שֶׁלֹּא נִתְקַבְּצוּ הַשֶּׁמֶשׁ וְהַיָּרֵחַ קִבּוּץ אֲמִתִּי אֶלָּא בַּחֲמִישִׁי:
כסף משנה
8.
This same principle, that the calculations are based on the mean rate of progress, is also the motivating factor for the other four reasons for the postponement [of Rosh Chodesh]. As proof of this, there are times when [according to the calculations] the conjunction takes place on Tuesday, and [Rosh Chodesh] is postponed until Thursday,13The instance mentioned in Halachah 4. and yet the moon will not be seen Thursday night, nor even Friday night. This indicates that the true conjunction of the sun and the moon did not take place until Thursday.

זמנים הלכות קידוש החודש פרק ז
Zemanim Kiddush HaChodesh Chapter 7