This document presents a modified numerical algorithm for solving fractional diffusion equations using a tau method with shifted Legendre and Chebyshev polynomials. The proposed method reduces the problem to solving a system of linear algebraic equations, and its efficiency is demonstrated through various numerical examples. The paper also provides definitions and analyses of fractional derivatives and polynomials used in the method.