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