The calculated straight line flying distance from YYC airport to MAD airport is 5,390 miles, or 8,675 kilometers.