This study developed a simple wire phantom and an algorithm to automatically measure the modulation transfer function (MTF) in computed tomography (CT) and implemented it to evaluate the effect of focal spot size and reconstruction filter type. The phantom consisted of a resin cylinder filled with water, with a tin wire of diameter 0.1 mm positioned along the center of the cylinder. The automated MTF algorithm used an axial image of the phantom and comprised several steps. The center position of a region of interest (ROI) was automatically determined at the center of the wire image. The pixels were then summed along the y-direction to obtain the profile of the pixel values at a point along the x-direction. Following this, both edges of the profile were made equal to zero. The profile curve was then normalized so that the total of all the data was equal to unity. The normalized profile curve is the line spread function (LSF), and the MTF curve was obtained by taking its Fourier transform. Our system (phantom and algorithm) is able to differentiate the MTFs of CT images from different focal sizes and reconstruction filter types.