For problems governed by a non-normal operator, the leading eigenvalue of the operator is of limited interest and a more relevant measure of the stability is obtained by considering the harmonic forcing causing the largest system response. Various methods for determining this so-called optimal forcing exist, but they all suffer from great computational expense and are hence not practical for large-scale problems. In the present paper a new method is presented, which is applicable to problems of arbitrary size. The method does not rely on timestepping, but on the solution of linear systems, in which the inverse Laplacian acts as a preconditioner. By formulating the problem of finding the optimal forcing as an eigenvalue problem based on the resolvent operator, repeated system solves amount to power iterations, in which the dominant eigenvalue is seen to correspond to the energy amplification in a system for a given frequency, and the eigenfunction to the optimal forcing function. Implementation of the method requires only minor modifications of an existing time-stepping code, and is applicable to any partial differential equation containing the Laplacian, such as the Navier-Stokes equations. We discuss it in the context of the linear Ginzburg-Landau equation.