We set up a formalism that can be used to calculate the power spectrum of the curvature perturbations produced during inflation up to arbitrary order in the slow-roll expansion, and explicitly calculate the power spectrum and spectral index up to second-order corrections. (C) 2001 Elsevier Science B.V. All rights reserved.