The valence as determined by the electrons lost or gained by the elements reacting to form a compound.