This paper presents the results of a mathematical model developed for calculating two-dimensional topography of the substrate surface when etching by a focused ion beam (FIB). A simulation of the two-dimensional relief of the substrate when irradiated by the FIB was carried out. An algorithm and software were developed making it possible to forecast the parameters of the surface relief depending on the characteristics of the ion beam and scanning system. The algorithm takes into account the redeposition of the sputtered material. The adequacy of the model is confirmed by a comparison with the results of experimental investigations.