Work functions, Schottky barriers, and heterojunction band offsets are the subject of numerous publications. Nevertheless their theoretical description is still strongly dominated by several empirical rules and model assumptions. Thus the connection between different and sometimes controverse approximations and the relations between the three quantities are indeed not well established. Therefore here several exact relations will be formulated and discussed. For the work function it is shown that there exists a unique splitting into a surface dipole and a volume contribution including the definition of the reference energy level. The latter is most important for interfaces. For Schottky barriers exact relations are given containing the contact dipole and its splitting into interface and space charge contributions. It is emphasized that their determination cannot be decoupled in general. Finally, the corresponding exact relations for heterojunctions are used for the approximate calculation of band offsets. For 19 heterojunctions the mean deviation from the experimental values is significantly smaller than for the values of the Tersoff theory.