The quasi-geostrophic response of the ocean to stochastic forcing by wind stress and atmospheric pressure is investigated using a linear, continuously stratified, β-plane oceanic model with a flat bottom. We consider a spectral representation of the forcing and response fields, and we estimate the oceanic response using a vertical normal mode expansion. Model spectra of the wind stress, wind stress curl and surface pressure fields are constructed. In the wavenumber-frequency range of quasi-geostrophic eddies, the observations suggest that because of their short correlation time scale, the forcing fields are, to a reasonable approximation, white in frequency space and symmetric in wavenumber space. Forcing by the wind stress has the dominant role. The oceanic response can be off-resonant or resonant. In the off-resonant case, we predict oceanic wavenumber-frequency response spectra. In case of resonance we estimate total energy transfer rates by integrating the oceanic response over depth and wavenumber (in the range 2π/4000 km−1–2π/50 km−1) and we distinguish between the barotropic and the total baroclinic response, the latter being obtained by summing the contribution of all baroclinic modes. The barotropic response is resonant at practically all eddy frequencies, and the baroclinic response is resonant at frequencies smaller than the maximum frequency of the first baroclinic Rossby wave. In midlatitudes, we find comparable energy input rates into barotropic and baroclinic modes, of the order of 3 × 10−4 W m−2. In high latitudes the input is comparable for barotropic Rossby waves and smaller for baroclinic ones. The total energy input rate by resonant forcing is only one order of magnitude smaller than the energy input rate from the mean atmospheric circulation into the general oceanic circulation. It is smaller, but comparable with the rate of energy conversion from the mean oceanic circulation into quasi-geostrophic eddies by barotropic and baroclinic instabilities. At medium and high frequencies, the baroclinic response is off-resonant. The model predicts red frequency spectra that are consistent with temperature observations in the central North Pacific. In particular, the seasonal variability of the observed eddy field is reproduced. A comparison with observations in the western North Atlantic also suggests that local stochastic forcing by the atmosphere is an important generating mechanism for the eddies in regions of low eddy activity.