You can't calculate the #"p"K_"a"# or #"p"K_"b"# of an unknown drug if you know nothing about it.
But the #"p"K_"a"# and #"p"K_"b"# values are important, because they determine how much of the drug is in the ionic and uncharged forms at a given pH.
You can use the Henderson-Hasselbalch Equation to calculate that
#"% ionized" = "100 %"/( 1 + 10^(q("pH" –"p"K_"a"))#
where the charge #q# = +1 for an acid and -1 for a base.
When #"pH"= "p"K_"a"#, 50% of the drug is ionized and 50% is uncharged.
When you design a new drug, you can't often predict its #"p"K_"a"#, but you can make a good guess about its solubility.
Chemists use the partition ratios to measure relative solubilities in two solvents.
The partition ratio #P# is the ratio of the concentrations of the unionized drug in two immiscible phases, such as water and octan-1-ol.
#P_"o/w" = ([S]_o)/([S]_w)#
where #P_"o/w"# is the partition ratio between octanol and water, and #[S]# represents the solubility of the drug in the two solvents.
This is usually expressed in logarithmic form:
#logP= log (([S]_o)/([S]_w))#
#logP# is a measure of the lipophilicity of the drug.
Chemists have devised computer programs from a database of up to 12 000 compounds and over 200 types of molecular "fragments" to predict #logP# values.
The programs can predict #logP# within ±0.5 units 80 % of the time.