For a route to be profitable, of course, the revenue must be more than the cost. Here is how airlines can calculate the fare for a route.
An airline has a CASM of 9 (CASM is Cost per Available Seat Mile--meaning how much it costs an airline to fly one seat one mile)
So, say on an 800 mile flight, multiply 800 times 9, and you get the cost of the trip. And if you wanted to make sure you make money on a flight with a 50% load factor, multiply 800 times 18. Of course, the CASM is just an average, and is higher on short flights, and lower on longer flights, because takeoffs and climbs cost more than level flight. A good load factor is usually about 62-67% for an average.
Hope this helps.