The computational work and storage of numerically solving the time fractional PDEs are generally huge for the traditional direct methods since they require total $\mathcal{O}$($N_S$$N_T$) memory and $\mathcal{O}$(($N_S$$N^2_T$) work, where $N_T$ and $N_S$ represent the total number of time steps and grid points in space, respectively. To overcome this difficulty, we present an efficient algorithm for the evaluation of the Caputo fractional derivative $^C_0$$D^α_t$$f(t)$ of order α∈(0,1). The algorithm is based on an efficient sum-of-exponentials (SOE) approximation for the kernel $t^{−1−α}$ on the interval [∆t,T] with a uniform absolute error ε. We give the theoretical analysis to show that the number of exponentials $N_{exp}$ needed is of order $\mathcal{O}$($log$$N_T$) for T≫1 or $\mathcal{O}$($log^2N_T$) for T≈1 for fixed accuracy ε. The resulting algorithm requires only $\mathcal{O}$($N_SN_{exp}$) storage and $\mathcal{O}$($N_SN_TN_{exp}$) work when numerically solving the time fractional PDEs. Furthermore, we also give the stability and error analysis of the new scheme, and present several numerical examples to demonstrate the performance of our scheme.