This paper presents a mathematical analysis for estimating the Shannon capacity of a fifth-generation (5G) communication link established between a mobile user (MU) and a cellular base station. The analysis is carried out in a three-dimensional (3D) environment, adopting the random waypoint mobility model to statistically describe the displacement of the MUs, and including path-loss attenuation, directional antenna gains, and mid-scale fading. Closed-form expressions for the received signal power and for the channel capacity are derived for both line-of-sight (LoS) and non-LoS scenarios, assuming a noise-limited operating regime. The obtained analytical results, which are numerically validated by Monte Carlo simulations, are exploited to investigate the impact of the antenna gain and of the cell radius on the performance of the 5G link in a 3D scenario, considering both the 28 and 73 GHz millimeter-wave channels.