A theoretical study of the alkylation reaction of toluene with methanol catalyzed by the acidic Mordenite (Si/Al = 23) is reported. Cluster DFT as well as periodical structure DFT calculations have been performed. Full reaction energy diagrams of the elementary reaction steps that lead to the formation of the three xylene isomers are given. The use of periodical structure calculations allows one; to account for zeolite framework electrostatic contributions and steric constraints that take place in zeolitic catalysts. Especially the steric constraint energy contribution has a significant effect on the energies and bond formation paths. The activation energy barrier of p-xylene formation is found to be similar to 20 kJ/mol lower than the corr...