Let \hbox{$\mathbb{F}^{}_{}$} be a filtration and τ be a random time. Let \hbox{$\mathbb{G}^{}_{}$} be the progressive enlargement of \hbox{$\mathbb{F}^{}_{}$} with τ. We study the following formula, called the optional splitting formula: For any \hbox{$\mathbb{G}^{}_{}$}-optional process Y, there exists an \hbox{$\mathbb{F}^{}_{}$}-optional process Y′ and a function Y′′ defined on [0,∞] × (ℝ+ × Ω) being \hbox{$\mathcal{B}[0,\infty]\otimes\mathcal{O}(\mathbb{F}^{}_{})$} measurable, such that \hbox{$Y=Y'\mathds{1}^{}_{[0,\tau)}+Y''(\tau)\mathbb{1}^{}_{[\tau,\infty)}.$} (This formula can also be formulated for multiple random times τ1,...,τk). We are interested in this formula because of its fundamental role in many recent papers on credit risk modeling, and also because of the fact that its validity is limited in scope and this limitation is not sufficiently underlined. In this paper we will determine the circumstances in which the optional splitting formula is valid. We will then develop practical sufficient conditions for that validity. Incidentally, our results reveal a close relationship between the optional splitting formula and several measurability questions encountered in credit risk modeling. That relationship allows us to provide simple answers to these questions.