How tithi is calculated
A tithi is a lunar day. It changes each time the Moon’s longitude relative to the Sun increases by 12 degrees.
The calculation begins with the positions of the Moon and Sun along the zodiac, measured in degrees. Subtract the Sun's longitude from the Moon's and express the result between 0 and 360 degrees. Each successive 12-degree interval is one tithi; thirty tithis make a lunar month.
Why a tithi can change during the day
The Moon's speed varies, so tithis do not all have the same duration. A tithi can begin or end at any hour. Its ending time is therefore shown alongside its name.
The tithi shown for a date
Daily pages show the tithi present at local sunrise. If a tithi begins after one sunrise and ends before the next, it will not appear as either day's sunrise tithi. This is called a kshaya tithi. A longer tithi may be present at two successive sunrises.
Location and ayanamsha
In the geocentric calculation used here, a tithi changes at the same instant for all locations. Local sunrise decides which tithi is listed for a day.
Ayanamsha is the offset used to express positions in the sidereal zodiac. Subtracting the same offset from both longitudes leaves their difference unchanged, so it does not change the tithi.
Drik and Vakya
Almanacs that follow the Vakya tables print tithi endings later than Drik ones, often by half an hour or more. Drik and Vakya explains why.