In order to understand the Mayan calendar we must first review Mayan math.
The ancient Sumerians and Babylonians used a sexagesimal system. It is a number system with sixty as the base (base 60). It is still used by us in modern society—in modified form—for measuring time, angles, and geographic coordinates. Our clock and angular measure came originally from the Sumerian and Babylonian systems. We use 24 hours in a day, but 60 minutes per hour, and 60 seconds per minute. In angular measure we use 360 (60 X 6) degrees, with 60 minutes per degree, and 60 seconds per minute. (The angular seconds and minutes expressions were borrowed from timekeeping designations.)
The number 60, a highly composite number, has twelve factors—1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60—of which 2, 3, and 5 are prime. With so many factors, many fractions of sexagesimal numbers are simple. Sixty is the smallest number divisible by every number from 1 to 6.





Instead of ten digits like we have today, the Maya used a base number of 20 (vigesimal). In order to write their numbers they used a system of dots and bars as "shorthand" for counting. A dot stood for one and a bar stood for five. In the table to the left you can see how this works. Because the base of the number system was 20, larger numbers were written down in powers of 20. We do that in our decimal system too: for example 32 is 3*10+2. In the Maya system, this would be 1*20+12, because they used 20 as base. Numbers were written from bottom to top. To the right you can see how the number 32 was written. It was very easy to add and subtract using this number system. However, we have no documented evidence they used fractions. Below is an example of a simple addition. As you can see, adding is just a matter of adding up dots and bars! Maya merchants often used cocoa beans, which they laid out on the ground, to do these calculations. (The Maya used a symbol of a sea shell to represent their zero.) 






9 




13 
14 




18 
19 
We can see from these
examples that the ancient Maya discovered two fundamental ideas in
mathematics: positional value and the concept of zero. This feat was
accomplished by only one other great culture of antiquity, the Hindu. We
do not know how the Maya obtained this fundamental insight but they were
using it before anyone else in antiquity. These two elements, positional value and zero, might be considered simple and basic concepts nowadays. In fact, they are, and that is precisely what set them apart as a distinct stroke of genius. Greeks and Romans, with all the force of their spirit and all the strength of their institutions, did not manage to find these principles. Just try to write down a large number using the Roman notation to see how important are the notions of positional value and zero. 

A discussion of the Maya mathematical system, more fully explored, is offered in a paper entitled, Arithmetic in Maya Numerals, National Institutes of Health, April, 1969, by W. French Anderson. He shows how all basic arithmetic operations are possible, and easy, in the Maya system. Furthermore, he shows how a modified base 20 system can be used, with the value of 18 in the third position, as in the Maya calendar. He refers to this as calendrical notation rather than vigesimal notation. See:
http://www.worlddestiny.org/maya/mayaarithmetic.pdf