The calculated distance (air line) between Cardiff and Fareham is approximately 97 miles respectively 156 kilometers.
By car or train, the actual journey to Fareham is certainly longer, as only the direct route (as the crow flies) between Cardiff and Fareham has been calculated here.