<p>The optimization of the composition of the algae for the simultaneous production of bioethanol and biodiesel is presented. We consider two alternative technologies for the biodiesel synthesis from algae oil, enzymatic or homogeneous alkali catalyzed that are coupled with bioethanol production from algae starch. In order to determine the optimal operating conditions, we not only couple the technologies, but simultaneously optimize the production of both biofuels and heat integrate them while optimizing the water consumption. Multi-effect distillation is included to reduce the energy and cooling water consumption for ethanol dehydration. In both cases, the optimal algae composition results in 60% oil, 30% starch, and 10% protein. The best alternative for the production of biofuels corresponds to a production price of 0.35 $/gal, using enzymes, with energy and water consumption values (4.00 MJ/gal and 0.59 gal/gal).</p