The octanol−water partition coefficient (K OW ) is a measure of the relative hydrophobicity and hydrophilicity of a chemical. Knowledge regarding how this value changes with the acidity (pH value) in the aqueous phase is important for understanding many biological activities. In this work, we develop a computational method to predict the effect of pH on the partition coefficient of ionizable drugs. In particular, three dissociation mechanisms were examined based on four relevant properties: the acid dissociation constant (pK a ), and the octanol−water partition coefficient of the molecule in the neutral form (K OW,N ), in the form of free ions (K OW,I ) and in the form of an ion pair (K OW,IP ). The values of K OW,N , K OW,I , and K OW,IP are predicted based on the COSMO-SAC activity coefficient model, and the value of pK a is determined using the SMD solvation model. The root-mean-square (RMS) error in the predicted log K OW,N , log K OW,IP , and pK a for 41 pharmaceuticals are found to be 0.636, 0.816, and 2.59, respectively. The predicted overall partition coefficient, as a function of pH, is also compared to experimental values whenever available. Our results show that the proposed method can provide satisfactory a priori prediction of pH dependency of K OW without input of any experimental data. This method can serve as a useful tool for modern drug delivery.