Negative environmental consequences of fossil fuels and concerns about petroleum supplies have spurred the search for renewable transportation biofuels. To be a viable alternative, a biofuel should provide a net energy gain, have environmental benefits, be economically competitive, and be producible in large quantities without reducing food supplies. We use these criteria to evaluate, through life-cycle accounting, ethanol from corn grain and biodiesel from soybeans. Ethanol yields 25% more energy than the energy invested in its production, whereas biodiesel yields 93% more. Compared with ethanol, biodiesel releases just 1.0%, 8.3%, and 13% of the agricultural nitrogen, phosphorus, and pesticide pollutants, respectively, per net energy gain. Relative to the fossil fuels they displace, greenhouse gas emissions are reduced 12% by the production and combustion of ethanol and 41% by biodiesel. Biodiesel also releases less air pollutants per net energy gain than ethanol. These advantages of biodiesel over ethanol come from lower agricultural inputs and more eficient conversion of feedstocks to fuel. Neither biofuel can replace much petroleum without impacting food supplies. Even dedicating all U.S. corn and soybean production to biofuels would meet only 12% of gasoline demand and 6% of diesel demand. Until recent increases in petroleum prices, high production costs made biofuels unprofitable without subsidies. Biodiesel provides suficient environmental advantages to merit subsidy. Transportation biofuels such as synfuel hydrocarbons or cellulosic ethanol, if produced from low-input biomass grown on agriculturally marginal land or from waste biomass, could provide much greater supplies and environmental benefits than food-based biofuels.