The paper presents an analysis of influence of shape and transmissivity of a pupil of an optical system on an axial energy distribution while the optical system images axial point. Therefore, a depth of focus is studied. Specifically, the analysis is done for uniform illumination of a circular pupil, and for the circular and annular pupil in the case of Gaussian amplitude distribution. Analytical formulas for Point Spread Function and Axial Point Spread Function are described, and characteristics of properties of the depth of focus of the optical system are derived. The novel analytic formulas presented in the paper can be used for determination of the value of the depth of focus of the optical system for given threshold limit of normalized axial intensity.