Halacha

הלכה א
הַיָּרֵחַ שְׁנֵי מַהֲלָכִים אְמְצָעיּים יֵשׁ לוֹ. הַיָּרֵחַ עַצְמוֹ מְסַבֵּב בְּגַלְגַּל קָטָן שֶׁאֵינוֹ מַקִּיף אֶת הָעוֹלָם כֻּלּוֹ. וּמַהֲלָכוֹ הָאֶמְצָעִי בְּאוֹתוֹ הַגַּלְגַּל הַקָּטָן נִקְרָא אֶמְצָעִי הַמַּסְלוּל. וְהַגַּלְגַּל הַקָּטָן עַצְמוֹ מְסַבֵּב בְּגַלְגַּל גָּדוֹל הַמַּקִּיף אֶת הָעוֹלָם. וּבְמַהֲלַךְ אֶמְצָעִי זֶה שֶׁל גַּלְגַּל הַקָּטָן בְּאוֹתוֹ הַגַּלְגַּל הַגָּדוֹל הַמַּקִּיף אֶת הָעוֹלָם הוּא הַנִּקְרָא אֶמְצַע הַיָּרֵחַ. מַהֲלַךְ אֶמְצַע הַיָּרֵחַ בְּיוֹם אֶחָד י''ג מַעֲלוֹת וְי' חֲלָקִים וְל''ה שְׁנִיּוֹת. סִימָנָם י''ג יל''ה:
כסף משנה
1.
There are two mean rates of progress [that are significant] with regard to the moon, for the moon revolves in a small orbit that does not encompass the earth. Its mean progress within this orbit is referred to as the mean within its path.
The small orbit [within which the moon revolves] itself rotates in a larger orbit that encompasses the earth.1As mentioned in Chapter 11, the rate of the advance of the sun, the moon, and the other planets does not appear to be uniform. For the sun, the deviation is relatively minor and can be resolved by postulating that the Earth is not at the center of the sun's orbit. The deviations of the moon from its mean rate of advance, however, are larger than that of the sun, and more irregular. (According to modern science, these deviations result from the gravitational pull of the sun and other celestial bodies.)
To resolve this difficulty, some ancient astronomers (Ptolemy and Aristotle, among others) postulated that with regard to the moon, two orbits were involved: One orbit encompassed the Earth, although the Earth was not at its center. Around this orbit existed one (and according to some opinions, more than one) smaller orbit, within which the moon rotated. This smaller orbit is referred to as an epicycle. Because of the moon's position in this smaller orbit, it would appear to be either ahead of or behind the mean position of the center of this orbit.
The mean progress of the small orbit within the large orbit that encompasses the earth is referred to as the moon's mean. The rate of progress for the moon's mean in one day is 13 degrees, 10 minutes and 35 seconds, in symbols 13° 10' 35".2This refers to the rate of progress that is apparent to an observer on the Earth. In theory, however, this figure is a result of two different motions. The entire orbit of the moon is moving in the heavens. (The orbit of the sun is also moving, as reflected in the movement of the sun's apogee, as mentioned in Chapter 12, Halachah 2. The sun's orbit is moving at a very slow pace, one and a half seconds a day. In contrast, the moon's orbit moves much faster, slightly more than 11 degrees each day. This movement is from east to west, opposite to the movement of the heavenly sphere.)
Within this larger orbit revolves the epicycle, the smaller orbit around which the moon revolves. The epicycle is revolving at approximately 24 1/2 degrees a day, from west to east. Thus, an observer on the Earth would see the epicycle as moving 13 degrees and a fraction (i.e., 24 1/2 - 11 1/5) forward (eastward) in the heavenly sphere every day, as the Rambam states.

הלכה ב
נִמְצָא מַהֲלָכוֹ בַּעֲשָׂרָה יָמִים קל''א מַעֲלוֹת וּמ''ה חֲלָקִים וַחֲמִשִּׁים שְׁנִיּוֹת. סִימָנָם קל''א מה''נ. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּק' יוֹם רל''ז מַעֲלוֹת וְל''ח חֲלָקִים וְכ''ג שְׁנִיּוֹת. סִימָנָם רל''ז ל''ח כ''ג. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּאֶלֶף יוֹם רי''ו מַעֲלוֹת וְכ''ג חֲלָקִים וְנ' שְׁנִיּוֹת. סִימָנָם רי''ו כג''ן. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּי' אֲלָפִים יוֹם ג' מַעֲלוֹת וְנ''ח חֲלָקִים וְכ' שְׁנִיּוֹת. סִימָנָם ג' נ''ח כ'. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּכ''ט יוֹם כ''ב מַעֲלוֹת וְשִׁשָּׁה חֲלָקִים וְנ''ו שְׁנִיּוֹת. סִימָנָם כב''ו ונ''ו. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּשָׁנָה סְדוּרָה שמ''ד מַעֲלוֹת וְכ''ו חֲלָקִים וּמ''ג שְׁנִיּוֹת. סִימָן לָהֶם שד''ם כ''ו מ''ג. וְעַל דֶּרֶךְ זוֹ תִּכְפּל לְכָל מִנְיַן יָמִים אוֹ שָׁנִים שֶׁתִּרְצֶה:
כסף משנה
2.
Thus, its progress in ten days will be 131 degrees, 45 minutes and 50 seconds, in symbols 131° 45' 50". The remainder [of the sum]3I.e., after the multiples of 360 have been subtracted.of its progress in one hundred days will be 237 degrees, 38 minutes and 23 seconds, in symbols 237° 38' 23".4It appears that the Rambam has added three seconds. This addition was made because the rate of progress also includes three thirds not mentioned in the original figure, but included in this calculation.
The remainder [of the sum] of its progress in one thousand days is 216 degrees, 23 minutes and 50 seconds, in symbols 216° 23' 50". The remainder [of the sum] of its progress in ten thousand days is 3 degrees, 58 minutes and 20 seconds, in symbols 3° 58' 20".
The remainder [of the sum] of its progress in twenty-nine days is 22 degrees, 6 minutes and 56 seconds, in symbols 22° 6' 56".5On this basis, we can understand why a lunar month is slightly longer than 29 1/2 days. The mean distance traveled by the sun in 29 days is approximately 28 1/2 degrees (Chapter 12, Halachah 1), approximately 6 1/2 degrees more than the remainder of the progress of the moon's mean. This distance (and the additional approximately almost half a degree traveled by the sun during this time) is travelled by the moon's mean in slightly longer than twelve hours on the following day.The remainder [of the sum] of its progress in a regular year is 344 degrees, 26 minutes and 43 seconds, in symbols 344° 26' 43". Following these guidelines, you can multiply these figures for any number of days or years you desire.

הלכה ג
וּמַהֲלַךְ אֶמְצַע הַמַּסְלוּל בְּיוֹם אֶחָד י''ג מַעֲלוֹת וּשְׁלֹשָׁה חֲלָקִים וְנ''ד שְׁנִיּוֹת. סִימָנָם י''ג גנ''ד. נִמְצָא מַהֲלָכוֹ בַּעֲשָׂרָה יָמִים ק''ל מַעֲלוֹת ל''ט חֲלָקִים בְּלֹא שְׁנִיּוֹת. סִימָנָם ק''ל ל''ט. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּמֵאָה יוֹם רכ''ו מַעֲלוֹת וְכ''ט חֲלָקִים וְנ''ג שְׁנִיּוֹת. סִימָנָם רכ''ו כ''ט נ''ג. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּאֶלֶף יוֹם ק''ד מַעֲלוֹת וְנ''ח חֲלָקִים וַחֲמִשִּׁים שְׁנִיּוֹת. סִימָנָם ק''ד נח''ן. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בַּעֲשֶׂרֶת אֲלָפִים יוֹם שכ''ט וּמ''ח חֲלָקִים וְעֶשְׂרִים שְׁנִיּוֹת. סִימָנָם שכ''ט מח''כ. וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּכ''ט יוֹם י''ח מַעֲלוֹת וְנ''ג חֲלָקִים וְד' שְׁנִיּוֹת. סִימָנָם י''ח נג''ד:
כסף משנה
3.
The distance travelled by the mean within its path in a single day is 13 degrees, 3 minutes and 54 seconds, in symbols 13° 3' 54".6This distance is figured east to west, opposite to the movement of the heavenly sphere. Thus, its progress in ten days will be 130 degrees, 39 minutes and no seconds, in symbols 130° 39'. The remainder [of the sum] of its progress in one hundred days will be 226 degrees, 29 minutes and 53 seconds, in symbols 226° 29' 53".7It appears that the Rambam has subtracted seven seconds. This subtraction was carried out because his figure for the rate of progress had been rounded off. In fact, the rate is seven thirds less than the figure mentioned originally. The lack of these thirds was taken into consideration in this calculation.
The remainder [of the sum] of its progress in one thousand days is 104 degrees, 58 minutes and 50 seconds, in symbols 104° 58' 50". The remainder [of the sum] of its progress in ten thousand days is 329 degrees, 48 minutes and 20 seconds, in symbols 329° 48' 20".
The remainder [of the sum] of its progress in twenty-nine days is 18 degrees, 53 minutes and 4 seconds, in symbols 18° 53' 4".

הלכה ד
וְנִמְצָא שְׁאֵרִית מַהֲלָכוֹ בְּשָׁנָה סְדוּרָה ש''ה מַעֲלוֹת וְי''ג שְׁנִיּוֹת בְּלֹא חֲלָקִים. סִימָנָם ש''ה י''ג. מְקוֹם אֶמְצַע הַיָּרֵחַ הָיָה בִּתְחִלַּת לֵיל חֲמִישִׁי שֶׁהוּא הָעִקָּר לְחֶשְׁבּוֹנוֹת אֵלּוּ בְּמַזַּל שׁוֹר מַעֲלָה אַחַת וְי''ד חֲלָקִים וּמ''ג שְׁנִיּוֹת. סִימָנָם (א') [ל''א] י''ד מ''ג. וְאֶמְצַע הַמַּסְלוּל הָיָה בְּעִקָּר זֶה פ''ד מַעֲלוֹת וְכ''ח חֲלָקִים וּמ''ב שְׁנִיּוֹת. סִימָנָם פ''ד כ''ח מ''ב. מֵאַחֵר שֶׁתֵּדַע מַהֲלַךְ אֶמְצַע הַיָּרֵחַ וְהָאֶמְצַע שֶׁהוּא הָעִקָּר שֶׁעָלָיו תּוֹסִיף. תֵּדַע מְקוֹם אֶמְצַע הַיָּרֵחַ בְּכָל יוֹם שֶׁתִּרְצֶה עַל דֶּרֶךְ שֶׁעָשִׂיתָ בְּאֶמְצַע הַשֶּׁמֶשׁ. וְאַחַר שֶׁתּוֹצִיא אֶמְצַע הַיָּרֵחַ לִתְחִלַּת הַלַּיְלָה שֶׁתִּרְצֶה הִתְבּוֹנֵן בַּשֶּׁמֶשׁ וְדַע בְּאֵי זֶה מַזָּל הוּא:
כסף משנה
4.
The remainder [of the sum] of its progress in a regular year is 305 degrees, no minutes and 13 seconds, in symbols 305° 13".8Although we have followed the standard printed text of the Mishneh Torah and included this paragraph in Halachah 4, it is clearly part of the previous halachah.
The position of the moon's mean on Wednesday night, [the third of Nisan, 4938,] the starting point for these calculations, was 1 degree, 14 minutes and 43 seconds, in figures 1° 14' 43", in the constellation of Taurus. The mean within its path at this date was 84 degrees, 28 minutes and 42 seconds, in symbols 84° 28' 42".
Since you know the mean rate of progress for the moon's mean, and you know its position on the date of the starting point, you [will be able to calculate] the position of the moon's mean on any date that you desire, as you did with regard to the mean position of the sun.
After calculating [the position of] the moon's mean on the beginning of the night that you desire, [the next step in calculating where the moon can be sighted] is to focus on the sun and see the constellation in which it will be located [at that time].9As mentioned in Chapter 12, Halachah 2, and notes, the sun does not always reach its mean position at sunset. In the summer, when the days are longer, it reaches its mean position slightly earlier, and in the winter slightly later. In the following halachah, the Rambam states the values that allow us to compensate for these differences.

הלכה ה
אִם הָיְתָה הַשֶּׁמֶשׁ מֵחֲצִי מַזַּל דָּגִים עַד חֲצִי מַזַּל טָלֶה. תָּנִיחַ אֶמְצַע הַיָּרֵחַ כְּמוֹת שֶׁהוּא. וְאִם תִּהְיֶה הַשֶּׁמֶשׁ מֵחֲצִי מַזַּל טָלֶה עַד תְּחִלַּת מַזַּל תְּאוֹמִים. תּוֹסִיף עַל אֶמְצַע הַיָּרֵחַ ט''ו חֲלָקִים. וְאִם תִּהְיֶה הַשֶּׁמֶשׁ מִתְּחִלַּת מַזַּל תְּאוֹמִים עַד תְּחִלַּת מַזַּל אַרְיֵה. תּוֹסִיף עַל אֶמְצַע הַיָּרֵחַ ט''ו חֲלָקִים. וְאִם תִּהְיֶה הַשֶּׁמֶשׁ מִתְּחִלַּת מַזַּל אַרְיֵה עַד חֲצִי מַזַּל בְּתוּלָה תּוֹסִיף עַל אֶמְצַע הַיָּרֵחַ ט''ו חֲלָקִים. וְאִם תִּהְיֶה הַשֶּׁמֶשׁ מֵחֲצִי מַזַּל בְּתוּלָה עַד חֲצִי מֹאזְנַיִם. הָנַח אֶמְצַע הַיָּרֵחַ כְּמוֹת שֶׁהוּא. וְאִם תִּהְיֶה הַשֶּׁמֶשׁ מֵחֲצִי מֹאזְנַיִם עַד תְּחִלַּת מַזַּל קֶשֶׁת. תִּגְרַע מֵאֶמְצַע הַיָּרֵחַ ט''ו חֲלָקִים. וְאִם תִּהְיֶה הַשֶּׁמֶשׁ מִתְּחִלַּת מַזַּל קֶשֶׁת עַד תְּחִלַּת מַזַּל דְּלִי. תִּגְרַע מֵאֶמְצַע הַיָּרֵחַ ל' חֲלָקִים. וְאִם תִּהְיֶה הַשֶּׁמֶשׁ מִתְּחִלַּת מַזַּל דְּלִי עַד חֲצִי מַזַּל דָּגִים. תִּגְרַע מֵאֶמְצַע הַיָּרֵחַ ט''ו חֲלָקִים:
כסף משנה
5.
If the sun is located between midway in the constellation of Pisces and midway in the constellation of Aries, the moon's mean should be left without emendation.10This corresponds to the month of Nisan, the time of the vernal equinox, when the sun sets at approximately 6 PM. Hence, there is no need to adjust the position of the moon's mean. If the sun is located between midway in the constellation of Aries and the beginning of the constellation of Gemini, 15 minutes should be added to the moon's mean.11This corresponds to the beginning of the summer, when the days are longer. Since the moon is moving slightly more than thirteen degrees per day away from the sun, its rate of progress per hour is thus slightly more than 30 minutes. When the sun's rate of progress per hour - for it is moving (eastward) in the same direction as the moon - is also taken into consideration, it is proper to consider the moon's progress as thirty minutes per hour. Thus, the Rambam is saying that in these months, the sun will set approximately half an hour after 6 PM. If the sun is located between the beginning of the constellation of Gemini and the beginning of the constellation of Leo, 30 minutes should be added to the moon's mean.12This corresponds to the middle of the summer, the longest days of the year. To compensate for the further delay in the setting of the sun, an additional fifteen minutes should be added to the moon's mean. [It must be noted that the number 30 in our translation is based on authentic manuscripts of the Mishneh Torah. Most of the standard published texts mention 15 minutes in this clause as well.] If the sun is located between the beginning of the constellation of Leo and midway in the constellation of Virgo, 15 minutes should be added to the moon's mean.13At this time of year, the summer days are beginning to become shorter. Hence, an adjustment of only fifteen minutes is necessary.
If the sun is located between midway in the constellation of Virgo and midway in the constellation of Libra, the moon's mean should be left without emendation.14This corresponds to the month of Tishrei, the time of the autumnal equinox, when the sun sets at approximately 6 PM. Hence, there is no need to adjust the position of the moon's mean. If the sun is located between midway in the constellation of Libra and the beginning of the constellation of Sagittarius, 15 minutes should be subtracted from the moon's mean.15This represents the beginning of the winter, when the sun sets at an earlier time. Hence, rather than add minutes to the moon's mean, we subtract them. If the sun is located between the beginning of the constellation of Sagittarius and the beginning of the constellation of Aquarius, 30 minutes should be subtracted from the moon's mean.16This period represents the middle of the winter, the shortest days of the year. To compensate for the further precipitance of the setting of the sun, an additional fifteen minutes should be subtracted from the moon's mean. [It must be noted that, in this instance as well, the number 30 in our translation is a deviation from the standard published texts, based on authentic manuscripts of the Mishneh Torah.] If the sun is located between the beginning of the constellation of Aquarius and midway in the constellation of Pisces, 15 minutes should be subtracted from the moon's mean.17At this point, the days are beginning to get longer. Therefore, only a fifteen-minute adjustment is necessary.

הלכה ו
וּמַה שֶּׁיִּהְיֶה הָאֶמְצַע אַחַר שֶׁתּוֹסִיף עָלָיו אוֹ תִּגְרַע מִמֶּנּוּ אוֹ תָּנִיחַ אוֹתוֹ כְּמוֹת שֶׁהוּא. הוּא אֶמְצַע הַיָּרֵחַ לְאַחַר שְׁקִיעַת הַחַמָּה בִּכְמוֹ שְׁלִישׁ שָׁעָה בְּאוֹתוֹ הַזְּמַן שֶׁתּוֹצִיא הָאֶמְצַע לוֹ. וְזֶה הוּא הַנִּקְרָא אֶמְצַע הַיָּרֵחַ לִשְׁעַת הָרְאִיָּה:
כסף משנה
6.
The figure that remains after these additions or subtractions have been made, or when the mean was left without emendation, is the mean of the moon approximately 20 minutes after the setting of the sun18This is the time when the stars begin to appear in Eretz Yisrael. for the time when this mean was calculated. This is referred to as the mean of the moon at the time of the sighting.

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