The smoothing parameters in a semiparametric model are estimated based on criteria such as generalized cross-validation or restricted maximum likelihood. As these parameters are estimated in a data-driven manner, they influence the degrees of freedom of a semiparametric model, based on Stein's lemma. This allows us to associate parts of the degrees of freedom of a semiparametric model with the smoothing parameters. A framework is introduced that enables these degrees of freedom of the smoothing parameters to be derived analytically, based on the implicit function theorem. The degrees of freedom of the smoothing parameters are efficient to compute and have a geometrical interpretation. The practical importance of this finding is highlighted by a simulation study and an application, showing that ignoring the degrees of freedom of the smoothing parameters in Akaike information criterion-based model selection leads to an increase in the post-selection prediction error.