To understand the autoionization of pure water and the solvation of ammonia in water, we investigated the undissociated and dissociated (ion-pair) structures of (H2O) n and NH3(H2O)n-1 (n = 5, 8, 9, 21) using density functional theory (DFT) and second order Moller-Plesset perturbation theory (MP2). The stability, thermodynamic properties, and infrared spectra were also studied. The dissociated (ion-pair) form of the clusters tends to favor the solvent-separated ion-pair of H3O+/NH4+ and OH-. As for the NH3(H2O)20 cluster, the undissociated structure has the internal conformation, in contrast to the surface conformation for the (H2O)21 cluster, whereas the dissociated structure of NH3(H2O)20 has the surface conformation. As the cluster size of (H2O)n/NH3(H2O)n-1 increases, the difference in standard free energy between undissociated and dissociated (ion-pair) clusters is asymptotically well corroborated with the experimental free energy change at infinite dilution of H3O+/NH4+ and OH-. The predicted NH and OH stretching frequencies of the undissociated and dissociated (ion-pair) clusters are discussed.