We present a memory expansion for macroscopic transport coefficients such as the collective and tracer diffusion coefficients DC and DT, respectively. The successive terms in this expansion for DC describe rapidly decaying memory effects of the center-of-mass motion, leading to fast convergence when evaluated numerically. For DT, one obtains an expansion of similar form that contains terms describing memory effects in single-particle motion. As an example we evaluate DC and DT for three strongly interacting surface systems through Monte Carlo simulations, and for a simple model diffusion system via molecular dynamics calculations. We show that the numerical method provides a speedup of about two orders of magnitude in computational time as compared with the standard methods, when collective diffusion is concerned. For tracer diffusion, the speedup is not quite as significant. Our studies using the memory expansion provide information of the nature of memory effects in diffusion and suggest a nontrivial power-law behavior of memory terms at intermediate times. We also discuss the application of the present approach to studies of other transport coefficients.