Hydrophobicity is a key physicochemical descriptor used to understand the biological profile of (bio)organic compounds as well as a broad variety of biochemical, pharmacological, and toxicological processes. This property is estimated from the partition coefficient between aqueous and nonaqueous environments for neutral compounds (P) and corrected for the pH-dependence of ionizable compounds as the distribution coefficient (D). Here, we have extended the parametrization of the Miertus-Scrocco-Tomasi continuum solvation model in n-octanol to nitrogen-containing heterocyclic compounds, as they are present in many biologically relevant molecules (e.g., purines and pyrimidines bases, amino acids, and drugs), to obtain accurate log P values for these molecules. This refinement also includes solvation calculations for ionic species in n-octanol with the aim of reproducing the experimental partition of ionic compounds (P). Finally, the suitability of different formalisms to estimate the distribution coefficient for a wide range of pH values has been examined for a set of small acidic and basic compounds. The results indicate that in general the simple pH-dependence model of the ionizable compound in water suffices to predict the partitioning at or around physiological pH. However, at extreme pH values, where ionic species are predominant, more elaborate models provide a better prediction of the n-octanol/water distribution coefficient, especially for amino acid analogues. Finally, the results also show that these formalisms are better suited to reproduce the experimental pH-dependent distribution curves of log D for both acidic and basic compounds as well as for amino acid analogues.