Density functional quantum chemical calculations have been used to compare the acid strengths of phosphotungstic and phosphomolybdic acids by computing the adsorption energy of ammonia on model clusters of each heteropolyacid. The adsorption of ammonia on a phosphotungstic acid cluster was stronger than the adsorption on a phosphomolybdic acid cluster. The predicted adsorption energies were near -150 and -106 kJ mol- for phosphotungstic and phosphomolybdic acid, respectively. This compares well with the experimental heats of ammonia sorption determined from microcalorimetry. An analysis of different adsorption modes of ammonia on phosphotungstic acid showed that bidentate adsorption of ammonia on the heteropolyacid clusters aided in proton transfer and yielded stronger adsorption energies than did a monodentate adsorption mode. In addition, we report the computed adsorption energies of pyridine on a heteropolyacid cluster.