First I want to address an inherent misconception with your question. We've no idea as to specifically when humans adopted the first formalized calendar system. We do have a cuneiform calendar from a Sumerian city called Umma (c. 2100 BC.), but the highly developed bureaucratic nature of the city-state would imply that the so-called Ummi Calendar had been in existence for some time.
So to tackle the meat of the question, and to be honest, the answer is not much. Calendars served more as a by-product of maths rather than a springboard for it. Our current calendar, the Gregorian Calendar, is not much different from its ancient predecessors. We moved away from the Julian Calendar because our methodology of observation became more accurate. But both are based on the Roman Calendar and the Babylonian Calendar to some extent. The Roman Calendar had huge intercalation problems, since it appears to be a direct adoption from a lunar calendar. The Babylonian Calendar had less of an issue but didnt have leap days. Its obvious that he further back we would go, the less accurate calendars tend to be. This is primarily because as time went on, our astronomy instruments developed better accuracy and we refined our understanding of the solar year. And so math hasnt had much to do with it, ancient philosophers would take measurements of the procession of the stars and adjust their calendar as needed.