MCNP program counts the energy deposition of photon and electron by the *F8 method.The computational efficiency of *F8 is very low.With a high cutoff energy of electron,the efficiency of *F8 will be greatly increased,but the precision may be decreased.And the appropriate cutoff energy is unknown.A new calculation method and speedup technique of photon and electron energy deposition are introduced in this paper.The new method merely counts the energy loss of electron collision,whether a electron will be cutoff or not rest with the electron energy and position in the speedup technique.Compared to the method used in MCNP program,the calculation efficiency is increased and the precision is very high in our new method.It is the most important character that the cutoff energy of electron is selected automatically in the speedup technique.