There is a specific procedure in Vedic astrology to find out the Mahadasha period. According to it, 3 Nakshatras are proportioned out to each planet, which makes the number of Nakshatras count to 27 for all the nine planets. So, the Mahadasha of any planet depends on the position of the Moon in a particular Nakshatra.