The dissociation constant (pK a ) of a drug is a key parameter in drug discovery and pharmaceutical formulation. The hydroxy substituent has a significant effect on the acidity of hydroxycinnamic acid. In this work, the acidic constants of coumaric acids are obtained experimentally by spectrophotometry using the chemometric method and calculated theoretically using ab initio quantum mechanical method at the HF/6-31G* level of theory in combination with the SMD continuum solvation method. Rank annihilation factor analysis (RAFA) is an efficient chemometric technique based on the elimination of the contribution of one of the chemical components from the data matrix. RAFA cannot be performed because the pure spectrum of HA − is not available. So, two-rank annihilation factor analysis (TRAFA) is proposed for the determination of the pK a OF H 2 A. A comparison between the pK a values obtained previously by TRAFA for the molecules o-coumaric acid (4. 13, 9.58), m-coumaric acid (4.48, 10.35), and p-coumaric acid (4.65, 9.92) makes it clear that there is good agreement between the results obtained by TRAFA and ab initio quantum mechanical method.