Biorefineries are facilities for the production of fuels and chemicals from biomass, which can tackle the increasing emissions of carbon dioxide. In this paper, we formulate a systematic biorefinery process synthesis problem with the goal of finding which of these products and process technologies result in a biorefinery with the highest economic potential or carbon efficiency. Our approach allows for the explicit evaluation and comparison of different biorefinery configurations. We also aim to investigate the relationship (and competition) between chemicals and fuels production. We initially develop a biorefinery superstructure and formulate a mixed integer nonlinear program which we solve for the optimal biorefinery configuration. We present sensitivity analyses with respect to changes in product prices and feedstock costs which allows us to better understand how the optimal configuration responds to changing economic conditions. We present a Monte Carlo type sampling of these parameters which indicates which technologies and products will most likely lead to profitable biorefinery configurations. We also investigate the robustness of a fixed biorefinery configuration. Finally, we perform a multiobjective optimization investigating the trade-offs between net present value and carbon efficiency. Our work suggests that the biorefinery concept is most likely to be profitable and flexible if the production of fuels and chemicals are combined in one facility.