We study the frequency function (introduced by Temur in [17]) in both the discrete and continuous settings. More precisely, we extend the definition of the frequency function to the higher-dimensional continuous setting and to the uncentered Hardy-Littlewood maximal function. We analyze the asymptotic behavior of the frequency function and the density of its small values for functions in \(\ell ^1(\mathbb {Z)}\) and \(L^1(\mathbb {R}^d)\) answering some questions posed by Temur in [17]. Finally, we study the size of the frequency function for functions in \(\ell ^p(\mathbb {Z})\) with \(p>1\) , showing that this case differs significantly from the case \(p=1\) .