The basic method is that the valence V of an atom is the sum of the individual bond valences v surrounding the atom:
The individual bond valences in turn are calculated from the observed bond lengths.
R is the observed bond length, R is a tabulated parameter expressing the (ideal) bond length when the element i has exactly valence 1, and b is an empirical constant, typically 0.37 Å.
Another formula for  has also been used: