Abstract. Having good estimates or even bounds for the error in computing approximations to expressions of the form f(A)v is very important in practical applications. In this paper we consider the case that A is Hermitian and that f is a rational function. We assume that the Lanczos method is used to compute approximations for f(A)v and we show how to obtain a posteriori upper and lower bounds on the 2-norm of the approximation error. These bounds are computed by minimizing and maximizing a rational function whose coefficients depend on the iteration step. We use global optimization based on interval arithmetic to obtain these bounds and include a number of experimental results illustrating the quality of the error estimates.