We report an analytical evaluation of the mean-squared displacement (MSD) of the particles in glasses based on their coarse grained trajectories. The calculation is conducted by means of a local random configuration-tree theory that was recently proposed by one of us [C.-H. Lam, J. Stat. Mech. textbf{2018}, 023301 (2018)]. Results are compared with the numerical simulations of a lattice glass model, and good quantitative agreement has been obtained over a wide range of temperatures in the entire region of time with virtually no free parameters. To the best of our knowledge, the calculation is the first in its kind.