Equations for the calculation of pH in non-aqueous solvents are derived. The equations consider dissociation of the acid or base, formation of salt ion pairs and formation of acid-anion or base-cation homoconjugates. The effect of homoconjugation on titration curves and buffer capacities in solvents of low and high dielectric constant is investigated. Computer programs to plot titration and buffer capacity curves and to compute simultaneously dissociation and homoconjugation constants of the acid or base and the salt from potentiometric data are presented. The equations and programs are tested on data from the literature in different non-aqueous solvents.