The generating gear grinding with grinding worm is a high efficiency gear tooth form finishing process by continuous indexing generating. Mathematical model for the generation of the gear grinding machine is established according to the real gear grinder in this thesis. The motion of each axis in the mathematical model is derived according to the electronic gear box (EGB) function in the controller of grinder. Four specialized curve tables, which are used to make tooth flank modification, are also included in the mathematical model. The developed simulation software can be applied to obtain the simulated ground surface which is generated with the machine settings of the real gear grinder. The result of this study is the basis of further study on the tooth profile modification.