On the basis of the Hohenberg‐Kohn theorem, an effective exchange and correlation potential is derived for nearly free electron metals. Using the one particle approach, derived by Kohn and Sham, on variational grounds, an expansion of the total energy with respect to deviations from the uniform density allows for calculating the effective potential.