Analytically extended function (AEF) for modeling measured electrostatic discharge (ESD) currents is presented in this paper. This function is used for the IEC 61000-4-2 Standard current and AEF parameters are calculated using least-squares method. Procedure of obtaining function parameters is simple for experimentally measured multi-peaked functions, such as lightning and other ESD currents. Simulation of ESD currents is done by simple electric circuits and using MATLAB.