For the case of pulse shaping by optical fiber pulse stacker, there exists a problem that how to determine the parameters of optical fiber pulse stacker, such as time delay, attenuation, etc, to generate the temporal pulse shapes required in physical experiments. To solve this problem, the characteristics of incoherent and partially coherent pulse stacking have been analyzed quantitatively. Consequently, an inverse calculation method has been proposed, by which the parameters of optical fiber pulse stacker can be calculated simply and exactly for arbitrary temporal pulse shapes. The results show that the pulses stacked by incoherent pulse stacking are quite smooth, whereas the pulses stacked by partially coherent pulse stacking exhibit slight modulation. Furthermore, the stacked pulse shapes using the proposed inverse calculation method fit the given pulse shapes nicely.