Rank annihilation factor analysis (RAFA) was used to investigate the effects of inclusion of eriochrome black T (EBT) on its complexation reaction with Ca2+ and Mg2+ at different pH values. Addition of β-cyclodextrin (β-CD) to Ca-EBT or Mg-EBT caused decomposition of the 1:1 metal complex and increase in EBT concentration in solution due to the formation of EBT-β-CD inclusion complex. In order to perform RAFA, concentration profiles were calculated by optimizing the value of the conditional stability constant and inclusion constant. The rank of original data matrix reduces by one by removing the information from the complex form (Ca-EBT or Mg-EBT). The performance of the method was evaluated by using synthetic data as well as experimental data and good results were obtained. The proposed method is capable of the simultaneous spectrophotometric determination of formation constant of a complex and the equilibrium constant of the competing reaction in solution.