The paper is of pedagogical nature and is aimed mainly at students. It presents a detailed proof of the well-known fact that if the boundary of an open set in ${R}^n$ is of class $C^k$, $k\geq 2$, so is the signed distance to the boundary function. This function plays an important role in problems of Analysis and Geometry. The presented proof could give a teacher a good opportunity to discuss important theorems in Calculus.