How the Moon's position is calculated
The Moon's position is computed with the lunar theory of the astronomy library. It is the most important position in Jyotish, because the nakshatra, tithi and dasha all depend on it.
What it is
The Moon moves about 13 degrees a day with considerable variation, so its position must be computed from the model rather than estimated from the average speed. The library's lunar model gives its ecliptic longitude.
How it is worked out or read
The sidereal longitude is the ecliptic longitude minus the ayanamsa. The nakshatra index is that longitude divided by 13 degrees 20 minutes, and the tithi uses the difference from the Sun.
Where it appears on this site
The Moon's position feeds the panchang, the birth chart and the dasha tool.
The hardest body to calculate
Of all the bodies used in Jyotish, the Moon is the hardest to calculate precisely. It is close to the Earth, it moves fast, and its orbit is strongly disturbed by the Sun's gravity. A simple model that treats its orbit as a fixed ellipse can be wrong by more than a degree. Accurate lunar theory was one of the great problems of astronomy for centuries, and modern lunar ephemerides use hundreds or thousands of terms.
The main inequalities
The largest correction is the equation of centre, which comes from the elliptical shape of the orbit and can reach about 6.3 degrees. Next is the evection, about 1.3 degrees, caused by the Sun stretching and squeezing the orbit; it was known to Ptolemy, and Indian astronomers handled its effects in their own ways. Then comes the variation, about 0.66 degrees, which depends on the angle between the Moon and the Sun, and the annual equation, about 0.19 degrees, which depends on the Earth's distance from the Sun. Dozens of smaller terms follow.
How modern software does it
Libraries designed for general use, including the one used on this site, compute the Moon's longitude from a series of periodic terms derived from modern lunar theory, accurate to a small fraction of an arcminute for dates within a few thousand years of the present. Light-time, aberration and nutation are then applied to give the apparent position. Subtracting the ayanamsa gives the sidereal longitude, from which the nakshatra, pada and sign follow.
Geocentric, not topocentric
Because the Moon is close, its position seen from a point on the Earth's surface differs from its position seen from the Earth's centre by up to about one degree, an effect called parallax. Jyotish charts and panchangs conventionally use the geocentric position, as seen from the Earth's centre, and so does this site. The topocentric position matters for predicting exactly when an eclipse or occultation is visible from a particular place, but not for the tithi or nakshatra.
Why precision matters here
Because the Moon moves about half an arcminute per minute of time, small errors in its position become noticeable errors in time. An error of one arcminute would shift a nakshatra end time by about two minutes, and would shift the Vimshottari dasha dates by several days. This is why older almanacs based on simplified lunar theory sometimes differ from modern ones, and why the Moon's calculation deserves the most care.