Pulsar timing arrays ( PTAs ) measure nHz frequency gravitational waves ( GWs ) generated by orbiting massive black hole binaries ( MBHBs ) with periods between 0.1 – 10 yr . Previous studies on the nHz GW background assumed that the inspiral is purely driven by GWs . However , torques generated by a gaseous disk can shrink the binary much more efficiently than GW emission , reducing the number of binaries at these separations . We use simple disk models for the circumbinary gas and for the binary-disk interaction to follow the orbital decay of MBHBs through physically distinct regions of the disk , until GWs take over their evolution . We extract MBHB cosmological merger rates from the Millennium simulation , generate Monte Carlo realizations of a population of gas driven binaries , and calculate the corresponding GW amplitudes of the most luminous individual binaries and the stochastic GW background . For steady–state \alpha –disks with \alpha > 0.1 we find that the nHz GW background can be significantly modified . The number of resolvable binaries is however not changed by the presence of gas ; we predict 1–10 individually resolvable sources to stand above the noise for a 1–50 ns timing precision . Gas driven migration reduces predominantly the number of small total mass or unequal mass ratio binaries , which leads to the attenuation of the mean stochastic GW–background , but increases the detection significance of individually resolvable binaries . The results are sensitive to the model of binary–disk interaction . The GW background is not attenuated significantly for time-dependent models of Ivanov , Papaloizou , & Polnarev ( 27 ) .