Once the vacuum levels are aligned it is possible to use the
electron affinity and
band gap values for each semiconductor to calculate the
conduction band and
valence band offsets. The electron affinity (usually given by the symbol \chi in
solid state physics) gives the energy difference between the lower edge of the conduction band and the
vacuum level of the semiconductor. The band gap (usually given the symbol E_{\rm g}) gives the energy difference between the lower edge of the conduction band and the upper edge of the valence band. Each semiconductor has different electron affinity and band gap values. For semiconductor
alloys it may be necessary to use
Vegard's law to calculate these values. Once the relative positions of the conduction and valence bands for both semiconductors are known, Anderson's rule allows the calculation of the
band offsets of both the valence band (\Delta E_{\rm v}) and the conduction band (\Delta E_{\rm c}). After applying Anderson's rule and discovering the bands' alignment at the junction,
Poisson’s equation can then be used to calculate the shape of the
band bending in the two semiconductors.
Example: straddling gap Consider a heterojunction between semiconductor 1 and semiconductor 2. Suppose the conduction band of semiconductor 2 is closer to the vacuum level than that of semiconductor 1. The conduction band offset would then be given by the difference in electron affinity (energy from upper conducting band to vacuum level) of the two semiconductors: :\Delta E_{\rm c} = (\chi_{2} - \chi_{1})\, Next, suppose that the band gap of semiconductor 2 is large enough that the valence band of semiconductor 1 lies at a higher energy than that of semiconductor 2. Then the valence band offset is given by: :\Delta E_{\rm v} = (\chi_{\rm 1} + E_{\rm g1}) - (\chi_{\rm 2} + E_{\rm g2})\, ==Limitations of Anderson's rule==