Calculated 'log P' is often used as a prediction of partition coefficients. There's a lot of free software that calculates that from molecular structures.
Experimentally measured 'log P' is the decimal logarithm of the partition coefficient of a substance A between 1-octanol and water.
log P = log10 ([A]oct / [A]w)
So the higher log P, the higher the lipophilicity of your substance, the higher the % of it going into the organic layer.
Another useful parameter is 'log D', which is basically log P at a given pH. For ionizable substances, log D is a function of log P, pH and the pKA of the substance. The formula is a bit complicated to write, but you can easily Google it, and it basically tells you that an acid will become much more hydrophilic when the pH raises above its pKA.
Vanillin is an acid, and making its sodium salt is equivalent to raising the pH a few units above the pKA...