A theoretical study of the alkylation reaction of toluene with methanol catalyzed by the acidicMordenite (Si/Al = 23) is reported. Cluster DFT as well as periodical structure DFT calculations have beenperformed. Full reaction energy diagrams of the elementary reaction steps that lead to the formation of thethree xylene isomers are given. The use of periodical structure calculations allows one to account for zeoliteframework electrostatic contributions and steric constraints that take place in zeolitic catalysts. Especially thesteric constraint energy contribution has a significant effect on the energies and bond formation paths. Theactivation energy barrier of p-xylene formation is found to be ~20 kJ/mol lower than the corresponding valuesfor the formation of its isomers. Computed host-guest binding energies according to the DFT method needa correction due to the absence of the dispersive interaction with the zeolite wall. Apparent activation energiesobtained with this correction are in good agreement with experimental data.