A mathematical programming model is built to analyze the economic feasibility of producing ethanol from lignocellulosic feedstocks. The optimal size of an ethanol plant is determined by the trade-off between increasing transportation costs for feedstocks versus decreasing average plant costs as the plant size increases. The ethanol plant is modeled under the assumption that it utilizes recent technological advancements in dilute acid hydrolysis. Potential feedstocks include energy crops, crop residues and woody biomass. It is found that the recent technological advancements appear to make ethanol competitive with gasoline, but only if higher valued chemicals are produced as co-products with the ethanol. The low cost and chemical composition of crop residues make them attractive as a feedstock.