Context. Transiting planets around stars are discovered mostly through photometric surveys. Unlike radial velocity surveys, photometric surveys do not tend to target slow rotators, inactive or metal-rich stars. Nevertheless, we suspect that observational biases could also impact transiting-planet hosts. Aims. This paper aims to evaluate how selection effects reflect on the evolutionary stage of both a limited sample of transiting-planet host stars (TPH) and a wider sample of planet-hosting stars detected through radial velocity analysis. Then, thanks to uniform derivation of stellar ages, a homogeneous comparison between exoplanet hosts and field star age distributions is developed. Methods. Stellar parameters have been computed through our custom-developed isochrone placement algorithm, according to Padova evolutionary models. The notable aspects of our algorithm include the treatment of element diffusion, activity checks in terms of log R HK and v sin i, and the evaluation of the stellar evolutionary speed in the Hertzsprung-Russel diagram in order to better constrain age. Working with TPH, the observational stellar mean density ρ allows us to compute stellar luminosity even if the distance is not available, by combining ρ with the spectroscopic log g. Results. The median value of the TPH ages is ∼5 Gyr. Even if this sample is not very large, however the result is very similar to what we found for the sample of spectroscopic hosts, whose modal and median values are [3, 3.5) Gyr and ∼4.8 Gyr, respectively. Thus, these stellar samples suffer almost the same selection effects. An analysis of MS stars of the solar neighbourhood belonging to the same spectral types bring to an age distribution similar to the previous ones and centered around solar age value. Therefore, the age of our Sun is consistent with the age distribution of solar neighbourhood stars with spectral types from late F to early K, regardless of whether they harbour planets or not. We considered the possibility that our selected samples are older than the average disc population.