A critical strategy to sustainably satisfy the growing global demand for chemicals is to replace fuel-based products with bio-based-ones. The 5-hydroxymethylfurfural (HMF) is a bio-based versatile building block capable of substitute several chemicals; however, its production is not economically feasible yet. A promising technology is based on a biphasic reactor followed by an extractor and evaporator. It is a complex system for which it is not trivial to choose the best-operating conditions. The present study assessed the conditions that minimize the operating cost by modeling the process using a mixed-integer linear programming problem with economic objective function. The results showed that the minimum production cost (US$ 141.10) tended to minimize the reactor residence time (0.49 min) and makeup solvent (0.155 kmol/min), and maximize the total yield (0.807) and selectivity (0.871). However, technically these conditions are not feasible since they do not allow the reactor phase separation. The shortest residence time that allows this separation (2.65 min) resulted in a more expensive production cost (US$ 173.50), smaller total yield and selectivity (0.622 and 0.637) and greater makeup solvent demand (0.247 kmol/min).