The Boltzmann factor gives the unnormalised relative probability for a state of energy $\epsilon_i$ of being occupied at temperature $\displaystyle T$.

The partition function is the proportional factor between the probability (for a state of energy $\epsilon_i$ of being occupied at temperature $T$) and the Boltzmann factor:

$\displaystyle P(\epsilon_i)=\frac{\exp\{-\epsilon_i/k_BT\}}{Z(T)}$

equivalently:

$\displaystyle \frac{N(\epsilon_i)}{N}=\frac{\exp\{-\epsilon_i/k_BT\}}{Z(T)}$

If the system can exchange particles, it is necessary to introduce the chemical potential $\mu$ by which it is possible to define the Boltzmann distribution function that represents the classical limit* (high energies) of the Fermi-Dirac and the Bose-Einsten distributions:

$\displaystyle f(\epsilon_i)=\frac{1}{\exp\{(\epsilon_i-\mu)/k_BT\}}$

*in despite of the term “classical” the Boltzmann distribution is valid for quantum particles.