An efficient and reliable method for the prediction of outputs of interest of partial differential equations with affine parameter dependence is presented. To achieve efficiency we employ the reduced-basis method: a weighted residual Galerkin-type method, where the solution is projected onto low-dimensional spaces with certain problem-specific approximation properties. Reliability is obtained by a posteriori error estimation methods - relaxations of the standard error-residual equation that provide inexpensive but sharp and rigorous bounds for the error in outputs of interest. Special affine parameter dependence of the differential operator is exploited to develop a two-stage off-line/on-line blackbox computational procedure. In the on-line stage, for every new parameter value, we calculate the output of interest and an associated error bound. The computational complexity of the on-line stage of the procedure scales only with the dimension of the reduced-basis space and the parametric complexity of the partial differential operator; the method is thus ideally suited for the repeated and rapid evaluations required in the context of parameter estimation, design, optimization, and real-time control. The theory and corroborating numerical results are presented for: symmetric coercive problems (e.g. problems in conduction heat transfer), parabolic problems (e.g. unsteady heat transfer), noncoercive problems (e.g. the reduced-wave, or Helmholtz, equation), the Stokes problem (e.g flow of highly viscous fluids), and certain nonlinear equations (e.g. eigenvalue problems)