Combined Poisson's-Boltzmann equations of hydrostatic equilibrium were set up and solved numerically for different baryonic components to obtain the molecular scale height as defined by the half width at half maximum (HWHM) in the spiral galaxy NGC 7331. The scale height of the molecular gas was found to vary between ∼100 pc and 200 pc depending on the radius and assumed velocity dispersion. The solutions of the hydrostatic equation and the observed rotation curve were used to produce a dynamical model and consequently a simulated column density map of the molecular disc. The modelled molecular disc was found to match the observed one reasonably well except in the outer disc regions. The molecular disc of NGC 7331 was projected to an inclination of 90° to estimate its observable edge-on thickness (HWHM), which was found to be ∼500 pc. With an HWHM of ∼500 pc, the observed edge-on extent of the molecular disc was seen to be ∼1 kpc from the mid-plane. This indicates that in a typical galaxy, hydrostatic equilibrium, in fact, can produce a few kiloparsecs thick observable molecular disc, which was previously thought to be difficult to explain.