In this paper, least squares approximation method is developed for solving a class of linear fractional integro-differential equations comprising Volterra and Fredhlom cases. This method is based on a polynomial of degree n to compute an approximate solution of these equations. The convergence analysis of the proposed method is proved. In addition, to show the accuracy and the efficiency of the proposed method, some examples are presented