# Work Function Calculation with Local Electrostatic Potential

On the Wikipedia site, it describes the work function equation as W = -e\phi - Ef, where phi is the electrostatic potential of a vacuum nearby the surface of the material. So my question is, how can I calculate the work function when there is another material in contact with the surface of the material?

If you join two solids together then they generally will have different Fermi levels. In that case the energy required to pull an electron out of solid $A$ and into solid $B$ is the difference between the Fermi levels. This is the equivalent of the work function.
In the diagram $W_A$ is the work function of material $A$ and $W_B$ is the work function for material $B$. $W_{AB}$ is the work function for transferring an electron from $A$ to $B$.
• The Fermi level (or chemical potential) is not the energy of the most energetic electron at finite temperatures. It is the term that enters the Fermi-Dirac distribution function, above the latter exist still electrons! Furthermore, as two metals contact each other, their Fermi levels align (as you explained). Your resulting $W_{AB}$ is the work function difference that is important for example for calculating the tunnelling probability. Commented Jul 31, 2015 at 18:24