This paper presents an improved automated method for calculating the MTF (Modulation Transfer Function) of an optical system. The paper presents the theoretical background and describes various techniques for calculating the edge response and MTF. An improved method is proposed and it is shown to be more accurate and robust. An additional advantage of the proposed method is that it can be fully automated. The proposed method is valid for various optical imaging systems. The results are compared and conclusions are made regarding the validity of the technique.