Dipole mixed pulsation modes of consecutive radial order have been detected for thousands of low-mass red-giant stars with the NASA space telescope Kepler. Such modes have the potential to reveal information on the physics of the deep stellar interior. Different methods have been proposed to derive an observed value for the gravity-mode period spacing, the most prominent one relying on a relation derived from asymptotic pulsation theory applied to the gravity-mode character of the mixed modes. Our aim is to compare results based on this asymptotic relation with those derived from an empirical approach for three pulsating red-giant stars. We developed a data-driven method to perform frequency extraction and mode identification. Next, we used the identified dipole mixed modes to determine the gravity-mode period spacing by means of an empirical method and by means of the asymptotic relation. In our methodology, we consider the phase offset, $epsilon_{mathrm{g}}$, of the asymptotic relation as a free parameter. Using the frequencies of the identified dipole mixed modes for each star in the sample, we derived a value for the gravity-mode period spacing using the two different methods. These differ by less than 5%. The average precision we achieved for the period spacing derived from the asymptotic relation is better than 1%, while that of our data-driven approach is 3%. Good agreement is found between values for the period spacing derived from the asymptotic relation and from the empirical method. Full abstract in PDF file.