(A more detailed version of this will be incorporated in my upcoming book: Calendars of India; Theory and Practice)
The Panchanga (pañcāṅgam) is an almanac that is based on the traditional Indian system of timekeeping. It lists the five key attributes (properties) of each day in a tabulated form (pañcāṅgam means ‘having five limbs’). The five attributes listed for the day are: The vāra (the weekday), the tithi (the phase of the moon), the nakṣatra (the constellation the moon is in), the karaṇa (the half-phase of the moon) and the yoga.
The seven-day week is a comparatively new concept in India, neither the Vedas nor the Epics talking about it. The vedas have a concept of a ṣaḍaha. ( a six day period which is used extensively in sacrificial timekeeping). The concept of the seven-day week is, however, quite ancient in the Mesopotamian cultures. The weekdays are named after the seven planets (the Sun, the Moon, Mars, Mercury, Jupiter, Venus and Saturn respectively). The week clearly is half a fortnight (which is the approximate period from a full moon [or a new moon] to the next.)There are some processes defined to figure out how each day got its name. We will not go into details here.
The use of the tithi or phase of the moon is very ancient indeed. The phases, or the changing size, of the moon is the most observable of the astronomical phenomena. The cycle of the phases (as an example, the cycle between one full moon and the next) could be seen to be around 29 to 30 days. The phase of the moon would wane from the full moon through the last quarter (half-moon during the waning phase), to the new moon, then wax through the first quarter (half-moon during the waxing phase) to the next full moon. The first 15 phases are called the dark fortnight and the second 15 phases are called the bright fortnight. Astronomically, a phase (tithi) of the moon is the period where the difference in the longitudes of the moon and the sun goes through 12°. The full moon is when the difference is exactly 180° and the new moon is when the difference is 0°. The tithis are numbered from 1 to 15 of the waxing phase and 1 to 15 of the waning phase. If the difference in longitude is between 0° and 12°, it is considered the first phase of the bright half; if it is between 12° and 24° it is called the second phase of the bright half; it it is between 180° and 192°, it is the first phase of the dark half and so on. The tithi at a particular time is what is indicated by the difference in longitude at that time.
The ancients of many cultures numbered their day based on the phase of the moon that day. A day would be marked as the number of the tithi at sunrise (there are other methods of reckoning the tithi of the day as well).
The nakṣatra at a particular time is the constellation the moon is in at that time. Our ancestors noted that the moon took approximately 27 days (plus a few hours) to go round the ecliptic. So they divided the ecliptic into 27 constellations, each constellation having a width of 13° 20′ (=360°/27). Each constellation had a name (Ashvini up to Revati). So if the moon’s longitude is between 0 and 13° 20′, it is said to be in the constellation of Ashvini, if between 13° 20′ and 26° 40′, then Bharani and so on. That is divide the longitudinal difference by 13° 20′, and quotient plus one is the number of the nakṣatra at that time. A day is labelled as a particular nakṣatra if the moon is in that nakṣatra at sunrise (there are other methods of reckoning the tithi of the day as well).
The nakṣatra and tithi are very ancient Indian concepts used from as far back as the Vedic period.
The karaṇa is half a tithi. It is the period of a six degree (6°) difference between the longitudes of the moon and the sun. I don’t clearly understand why both the the karaṇa and the tithi have to be reckoned, since one is half the other. Maybe it is based on the same logic as the concept of a week being half a fortnight. There seems to be some astrological significance to the karaṇa.
We now pass on to Yoga, which is the topic of this article. While the tithi at a particular time is reckoned as the difference between the longitudes of the moon and the sun at that time, the yoga at a particular time is the sum of the longitudes of the moon and the sun at that time. What is this thing called the Yoga? There are 27 Yogas (like the nakṣatras). So if the sum of the moon’s longitude and the sun’s longitude is between 0° and 13° 20′, it is said to be in the first Yoga, if between 13° 20′ and 26° 40′, then it is in the second Yoga and so on.That is divide the longitudinal sum by 13° 20′, and quotient plus one is the number of the Yoga at that time. These Yogas, like the nakṣatras have names and the beginning and the end of the first yoga in the sky is the same as the beginning and end of the first nakṣatra and so on, since they both start at at 0° and each have a width of 13° 20′. (The yoga is not mentioned in the Vedas etc. It seems to be a recent phenomenon that developed when astrology, as it is known now, became popular.)
What is the significance of it astronomically? While we are able to understand the astronomical significance of the other four angas of the panchanga, what is yoga? I have referred to many books and have not been able to find the answer. Yoga means ‘sum’ or ‘addition’ or ‘conjunction’ etc. So the word yoga used for the concept of adding the two longitudes is natural.
But what is the actual phenomenon represented by this? My theory is this:
Our ancestors were aware of the power of the sun and the moon. The sun gave them light and heat and seemed to be responsible for all plant and animal life on earth. The moon somehow seemed to affect such things as the level of the seas and the large lakes. The moon also seemed to be the king of the stars and the planets. Clearly these two were the largest and the most powerful of the phenomena of the sky. Also the moon, and then the sun were the fastest movers among the planets in the sky.
They may have asked this question. If these two were individually so fast and so strong, what if the strengths and the speed of these two were combined? If only there were a body that combined the two strengths! And that is what they created – a fictitious body that moves at the combined speed of these two bodies. Like the moon moves from one nakṣatra to the next, this body also moved from one nakṣatra to the next. Only, they did not call it nakṣatra, but yoga the ‘conjunction’ or the ‘combination’. So the fictitious body moving through the yogas is similar to the moon moving through the nakṣatras. They then assigned astrological significance to the body’s movement in a yoga, much like they assigned astrological significance to the moon’s movement in a nakṣatra .
Let us do some approximate calculations to see how yoga behaves:
(all values rounded off)
Sidereal period of the Sun = 365.26 days
Average degrees travelled per day by the Sun = 360/365.26 = 0°.99
Sidereal period of the Moon = 27.32 days
Average degrees travelled per day by the Moon = 360/27.32 = 13°.18
Combined speed (average sum of degrees travelled) = 13°.18 + 0°.99 = 14°.16
So sidereal period of combined body = 360/14°.16 = 25.42 days
Average time spent by the combined body in a yoga = 25.42/360*13.33*24 = 22.59 hours.
In the figure below I have shown the ecliptic, or the path of the sun round the skies, with the zodiac and the nakṣatras and the yogas marked. You can see that the yoga boundaries are the same as that of the nakṣatra (constellation).
Below is a figure depicting the phases of the moon. This shows where each phase of the moon will occur when the sun is at 0° longitude.

We can see that when the sun is at 0° longitude (that is beginning of the nakṣatra aśvinī
or the rāśi [zodiac sign] meṣa), the waning crescent happens at 45° longitude when the moon is in the nakṣatra rohinī. Similarly, the full moon happens when the moon is in citrā. Of course, the new moon happens when the moon is also at 0°. (As we said before, the nakṣatra at a particular time is the nakṣatra the moon is in at the time. Similarly the rāśi [zodiac sign] at a particular time is the sign the sun is in at that moment. ). It is easy to understand that when the sun is at say 40° longitude (that is the sun is in vr̥ṣabha), the phases get correspondingly shifted 40°.
(Note that in this picture we have assumed that the sun is stationary at 0°, while in actuality, the sun moves around 1° every day. So, by the time the moon goes from 0° back to 360°/ 0°, a period of around 27.3 days, the sun would have moved forward by around 27 degrees. Therefore, the next new moon will not happen at 0° but later at around that many degrees as the sun has moved over this time. This actually takes a little over 2 extra days. This is why the synodic period of the moon is 29.5 days [That is though the moon goes round the earth in 27.3 days, the time taken from one new moon to the next or one full moon to the next is 29.5 days]
Let us look at yoga now. We said that the longitude of the fictitious body having the strength of the sun and the moon is the sum of the longitudes of the sun and the moon. Let us say that the sun is at 40°(vr̥ṣabha) and the moon is at 85° (punarvasu). The longitude of the fictitious combined body is then 40° + 85° = 125°. We can see that this falls within the yoga gaṇḍa. So the yoga at that time is gaṇḍa. (Note that the addition is modulo 360°. That is if the sum of the two longitudes is, say, 372°, it has to be reduced to [372-360 =] 12°).

These are my initial remarks. I am happy that at my age of 64, I came to kn9w the concept of Yoga wrt Panchanga. Fairly clearly explained.