Subject of study. We present a computer simulation of laser radiation propagation using the Zemax program. Aim of study. We develop a macro written in the Zemax programming language designed to obtain the intensity distribution in the longitudinal section of a focused laser beam. Method. The developed macro uses Zemax functions based on integral transformations, making it possible to obtain the results of the modeling of radiation propagation through optical systems. Main results. A macro for analyzing the intensity distribution in the longitudinal section of a laser beam has been developed using the Zemax programming language. The presented macro is used to analyze the propagation of a laser beam affected by different aberrational distortions. The results of the macro operation and their analysis are presented. Practical significance. The proposed macro expands the standard capabilities of Zemax and can be used for analyzing laser radiation propagation. The presented results of the macro demonstrate the possibility of its application in analyzing the effect of various aberrational distortions on the parameters of a laser beam focused in the bulk of a transparent material subjected to laser processing. Therefore, the macro can facilitate the control of the spatial distribution of intensity in a focused laser beam with high accuracy to ensure maximum processing efficiency of the material being modified.