During the dispatch phase of the flight, the pilots are provided data on forecast winds and temperature for normal cruise levels of the aircraft. The pilots can then input these data into the FMS and then once in the air the FMS calculates the most optimum altitude based on the input data.