Numerical simulations of metallic foil electrically exploding provide the feasibility to analyze the process better and then to suggest new ideas to optimize the design of experiments and some other applications. Incorporating with a tabular equation of state and Burgess resistivity model in which multiphases are covered and a unified set of modified resistivity coefficients for aluminum (or copper) is used, a 1-D code [namely, electrically exploding program (EEP)] based on magnetohydrodynamics has been developed to calculate the exploding process of metallic foil used in electric guns and the evolution of correlative parameters. Calculated results are widely compared with our experimental data and those reported in literatures in the past decades; good agreements indicate that this model can be applied universally in the range of aluminum or copper bridge foil size from 0.76 × 0.76 mm2 to 30 × 30 mm2, burst current from 7.8 kA to 1 MA, and plastic flyer velocity from 2 to 18 km/s. Utilizing the EEP code, burst and ionization of metallic foils, movement of plastic flyers, and effects of foil materials on the final velocities of plastic flyers, as well as the contributions of Lorentz force to plastic flyer velocity, are discussed. The process of metallic foil electrical explosion to generate planar plasma jet is calculated, and the temporal and spatial distributions of related parameters are given also. Comparisons of calculated and experimental results indicate that a thin layer with high density is ejected out followed by low-density high-speed plasma and the speed of plasma jet front can be up to several tens of kilometers per second.