The effects of a solvent on the two-photon absorption of microsolvated formaldehyde and liquid water have been studied using hybrid coupled-cluster/molecular mechanics (CC/MM) response theory. Both water and formaldehyde were considered solvated in water, where the solvent water molecules were described within the framework of molecular mechanics. Prior to the CC/MM calculations, molecular dynamics simulations were performed on the water/formaldehyde and water/water aggregates and many configurations were generated. By carrying out CC/MM response calculations on the individual configurations, it was possible to obtain statistically averaged results for both the excitation energies and two-photon absorption cross sections. For liquid water, the comparison between one- and two-photon absorption spectra is in good agreement with the experimental data available in the literature. In particular, the lowest energy transition occurring in the one-photon absorption spectrum of water only occurs with a relatively small strength in the two-photon absorption spectrum. This result is important for the interpretation of two-photon absorption data as these results show that in the absence of selection rules that determine which transitions are forbidden, the spectral profile of the two-photon absorption spectrum can be significantly different from the spectral profile of the one-photon absorption spectrum. © 2006 American Institute of Physics.