In this paper, we present an arc based fan-beam computed tomography (CT) reconstruction algorithm by applying Katsevich's helical CT image reconstruction formula to 2D fan-beam CT scanning data. Specifically, we propose a new weighting function to deal with the redundant data. Our weighting function ϖ(x_,λ) is an average of two characteristic functions, where each characteristic function indicates whether the projection data of the scanning angle contributes to the intensity of the pixel x_. In fact, for every pixel x_, our method uses the projection data of two scanning angle intervals to reconstruct its intensity, where one interval contains the starting angle and another contains the end angle. Each interval corresponds to a characteristic function. By extending the fan-beam algorithm to the circle cone-beam geometry, we also obtain a new circle cone-beam CT reconstruction algorithm. To verify the effectiveness of our method, the simulated experiments are performed for 2D fan-beam geometry with straight line detectors and 3D circle cone-beam geometry with flat-plan detectors, where the simulated sinograms are generated by the open-source software "ASTRA toolbox." We compare our method with the other existing algorithms. Our experimental results show that our new method yields the lowest root-mean-square-error (RMSE) and the highest structural-similarity (SSIM) for both reconstructed 2D and 3D fan-beam CT images.